all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#28729: 26.0.60; Incorrect Edebug spec for gv-define-setter
@ 2017-10-07 13:51 Gemini Lasswell
  2019-07-15  9:16 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Gemini Lasswell @ 2017-10-07 13:51 UTC (permalink / raw)
  To: 28729

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".





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-15  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-07 13:51 bug#28729: 26.0.60; Incorrect Edebug spec for gv-define-setter Gemini Lasswell
2019-07-15  9:16 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.