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: Alan Mackenzie
Subject: bug#67455: (Record source position, etc., in doc strings, and use this in *Help* and backtraces.)
Date: Sat, 30 Mar 2024 09:53:37 +0000

Hello, Stefan.

On Thu, Mar 28, 2024 at 12:25:11 -0400, Stefan Monnier wrote:

[ .... ]

> >> >> My crystal ball suggests that "currently" may be the wrong way to think
> >> >> about it: maybe instead of thinking of "when" (as in "during the
> >> >> definition of function FOO") what you're looking for might be "where"
> >> >> (as in "within the body of FOO").
> >> >> [ That's the same difference as the difference between dynamic and
> >> >>   static scoping.  ]
> >> > I'm having trouble understanding what you're saying, here.
> >> Is it because you don't understand the difference between dynamic
> >> scoping and static scoping, or because you don't see the relationship
> >> with that and your notion of "currently being defined"?
> > The latter, I think.  defining-symbol is entirely dynamically scoped.

> We're still miscommunicating.  You're talking about how your code is
> implemented, apparently, whereas I'm asking about what is the
> intended behavior.

I am still mystified by your failure to understand "currently being
defined", a phrase that to me could hardly be clearer.

> It's like I'm asking what the C spec says and you're answering me by
> telling me how GCC works.

OK, let's try again.  defining-symbol records the symbol currently being
defined.  It's used to set the defining symbol and buffer offset fields
in the position structure in that symbol's doc string, and also in the
doc strings of contained lambda forms.

> > I'm convinced it does.  Can you suggest a scenario where the
> > defining-symbol mechanism (outlined above) might fail?

> Without knowing what it is intended to do, the only thing we can say is
> that it does what it does, so no indeed it won't fail to do what it
> does, since that's what it does. 🙂

Is my previous paragraph sufficiently clear?  If so, can you envisage a
scenario where a symbol being defined would fail to get the two fields
correctly set in its doc string or a lambda form's doc string?

[ .... ]

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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