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: Fri, 05 Aug 2022 04:11:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> > (progn
> >   ;; comment
> >   ;; about that
> >   (define-key ...)
> >   )
> >
> > With `which-function-mode' enabled, more or less the complete expression
> > is shown in the mode-line (with newlines escaped) when moving into the
> > expression.

> This function is documented as:
>
> (defun lisp-current-defun-name ()
>   "Return the name of the defun at point, or nil."
>
> There is no defun at point in this situation, so perhaps it would make
> sense to return nil here?

Isn't "defun" synonymous with "top-level-form" in such cases
(e.g. `end-of-defun')?

>  But this is also used by add-log, so perhaps
> which-func should just use something completely different and more
> strict.  I.e., skip back to the top-level form, and then use the edebug
> spec to pick out the name?

I don't follow - edebug-spec of what, in the above case?

Michael.





reply via email to

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