[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28729: 26.0.60; Incorrect Edebug spec for gv-define-setter

From: Lars Ingebrigtsen
Subject: bug#28729: 26.0.60; Incorrect Edebug spec for gv-define-setter
Date: Mon, 15 Jul 2019 11:16:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Gemini Lasswell <address@hidden> writes:

> 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)

I can confirm that changing `body' to `def-body' fixes this bug.

> M-: (obo-ref my-array 3) RET
> Result: Edebug starts stepping through the setter, then quits with
> "Source has changed - reevaluate definition of obo-ref".

This is till a problem.  I'm not sure what you mean by "It should use
:name" -- how does that work in edebug specs?  (I'm not particularly
familiar with edebug internals.)

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]