GNU bug report logs - #49592
28.0.50; lisp-current-defun-name and non-standard defuns

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Fri, 16 Jul 2021 02:55:02 UTC

Severity: normal

Found in version 28.0.50

Full log


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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 49592 <at> debbugs.gnu.org
Subject: Re: bug#49592: 28.0.50; lisp-current-defun-name and non-standard
 defuns
Date: Sat, 06 Aug 2022 02:17:50 +0200
Lars Ingebrigtsen <larsi <at> 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.




This bug report was last modified 2 years and 325 days ago.

Previous Next


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