bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#49592: 28.0.50; lisp-current-defun-name and non-standard defuns


From: Michael Heerdegen
Subject: bug#49592: 28.0.50; lisp-current-defun-name and non-standard defuns
Date: Sat, 06 Aug 2022 02:17:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> > I don't follow - edebug-spec of what, in the above case?
>
> I was suggesting that we could use the edebug spec (instead of
> heuristics) if it exists,

You want to find out the correct NAME of the thing being defined by
looking up the edebug-spec of the current top-level form instead of
simply assuming that the NAME is just the first argument of the call?

Makes sense - but I don't know if it's a big win and Edebug specs help
out in enough cases (lots of macros don't have one, even in Emacs
itself, e.g. `defvar-keymap').

Anyway, it wouldn't harm and motivate people even more to write Edebug
specs.  Or do you intent to give up the heuristic of using the first
argument completely?  I don't think that would be a good idea.  Because
this heuristic works very well in practice IME.  AFAIR, most of the
time, or every time, when I saw the heuristic of
`lisp-current-defun-name' failed, the top-level expression was not a
defining form (like in my example) and `lisp-current-defun-name'
returned the complete sexp - and treating this case specially would
already give quite good results I think.

Michael.





reply via email to

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