GNU bug report logs -
#28729
26.0.60; Incorrect Edebug spec for gv-define-setter
Previous Next
To reply to this bug, email your comments to 28729 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28729
; Package
emacs
.
(Sat, 07 Oct 2017 13:53:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gemini Lasswell <gazally <at> runbox.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 07 Oct 2017 13:53:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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".
Added tag(s) confirmed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 15 Jul 2019 09:06:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28729
; Package
emacs
.
(Mon, 15 Jul 2019 09:17:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 28729 <at> debbugs.gnu.org (full text, mbox):
Gemini Lasswell <gazally <at> runbox.com> 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
> SPC SPC
>
> 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
This bug report was last modified 5 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.