unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 49592@debbugs.gnu.org
Subject: bug#49592: 28.0.50; lisp-current-defun-name and non-standard defuns
Date: Fri, 05 Aug 2022 04:11:47 +0200	[thread overview]
Message-ID: <87wnbnigm4.fsf@web.de> (raw)
In-Reply-To: <87edxwezs5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 04 Aug 2022 18:31:22 +0200")

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	other threads:[~2022-08-05  2:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  2:53 bug#49592: 28.0.50; lisp-current-defun-name and non-standard defuns Michael Heerdegen
2022-08-04 16:31 ` Lars Ingebrigtsen
2022-08-05  2:11   ` Michael Heerdegen [this message]
2022-08-05  3:01     ` Michael Heerdegen
2022-08-05 11:57     ` Lars Ingebrigtsen
2022-08-06  0:17       ` Michael Heerdegen
2022-08-06 12:15         ` Lars Ingebrigtsen
2022-08-07  2:09           ` Michael Heerdegen
2022-08-08 12:32             ` Lars Ingebrigtsen
2022-08-09  2:12               ` Michael Heerdegen
2022-08-09 15:29                 ` Lars Ingebrigtsen
2022-08-12  5:28                   ` Michael Heerdegen
2022-08-12 15:06                     ` Lars Ingebrigtsen
2022-08-23 10:27                       ` Lars Ingebrigtsen
2022-08-23 22:57                         ` Michael Heerdegen
2022-08-24 10:23                           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnbnigm4.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=49592@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).