GNU bug report logs - #28729
26.0.60; Incorrect Edebug spec for gv-define-setter

Previous Next

Package: emacs;

Reported by: Gemini Lasswell <gazally <at> runbox.com>

Date: Sat, 7 Oct 2017 13:53:01 UTC

Severity: normal

Tags: confirmed

Found in version 26.0.60

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gemini Lasswell <gazally <at> runbox.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.60; Incorrect Edebug spec for gv-define-setter
Date: Sat, 07 Oct 2017 06:51:25 -0700
The Edebug spec for gv-define-setter is incorrect. It should use
:name, so Edebug doesn't confuse it with the getter, and it should use
def-body instead of body. To reproduce the problem, put this bit of
code into *scratch*:

(defun obo-ref (a idx)
  (aref a (1- idx)))

(gv-define-setter obo-ref (val a idx)
  `(aset ,a (1- ,idx) ,val))

(defvar my-array [ 10 20 30 40 ])

(defun set-first-elem (n)
  (setf (obo-ref my-array 1) n))

Then:

M-x edebug-all-defs RET
M-x eval-buffer RET

Result: Eager macro-expansion failure: (wrong-type-argument consp nil)

M-: (obo-ref my-array 3) RET
SPC SPC

Result: Edebug starts stepping through the setter, then quits with
"Source has changed - reevaluate definition of obo-ref".




This bug report was last modified 5 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.