unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49592: 28.0.50; lisp-current-defun-name and non-standard defuns
@ 2021-07-16  2:53 Michael Heerdegen
  2022-08-04 16:31 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 16+ messages in thread
From: Michael Heerdegen @ 2021-07-16  2:53 UTC (permalink / raw)
  To: 49592


Hello,

consider a top-level expression like this (you might want to insert this
snipped into *scratch* for testing):

(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.

The reason: `lisp-current-defun-name' doesn't check for whether the
second subexpression of a top-level expression is still on the same line
- it just returns a string including everything (i.e. all comments) in
between.

Dunno what the best fix is.  In the above case returning something like
"(progn ...)" would be best, since the second subexpression is not even
a name (a symbol).


TIA,

Michael.


In GNU Emacs 28.0.50 (build 38, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-07-16 built on drachen
Repository revision: c5d6d45b48b2a4799ad1d27a2e7551113801b097
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB






^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-08-24 10:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).