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

From: Michael Heerdegen <[email-masked]>
Date: Fri, 05 Aug 2022 05:01:35 +0200

Michael Heerdegen <[email-masked]> writes:

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

`add-log-current-defun-function' tells "[...] should return the
function's name as a string, or nil if point is outside a function." -
but here "function" is also meta language - for something like
"(top-level) defining form" probably.

But I don't use add-log.  In my which-function example, returning nil is
better than the current behavior.  `which-function-mode' is for
orientation, so saying "(progn ...)" would also make sense to me and
provide a bit more help than staying silent.

Michael.