bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67455: (Record source position, etc., in doc strings, and use this i


From: Stefan Monnier
Subject: bug#67455: (Record source position, etc., in doc strings, and use this in *Help* and backtraces.)
Date: Sun, 07 Apr 2024 22:19:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> The definition starts when the reader reads (defun foo ...).  It ends
> when that Fdefalias has been evaluated.  Between those two events,
> defining-symbol is bound to foo.

When the code is compiled, years can pass between those two events.

> The critical thing here is the variable defining-symbol.  I think you're
> suggesting that its value could accidentally find its way into other
> symbols' position structures.  When are those other symbols getting
> defined?  Surely if a secondary defun, defmacro, defvar, ... happens
> during the main defun, its defining symbol is that of the main defun?

That secondary symbol might be defined by the macro for its own use,
rather than for the use of the returned code.

> Well, m-a-e is defined too late.

According to your self-imposed rule 🙂

> Even if it weren't, how would it solve any of these problems you see?
> It's just swapping one dynamically bound variable for another.

Indeed, m-a-e has to fight the same issues, in theory, but in practice,
those issues have already been addressed over the years.  It's rebound
to nil "all the time" to try and make sure its effect doesn't leak.

BTW, it would be nice to separate your patches into some that add
position info to lambda's docstring, and then others that add
"defining symbol" to the available position info.


        Stefan






reply via email to

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