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

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

bug#45443: 28.0.50; Can't find definition of compilation--message->loc


From: Daniel Martín
Subject: bug#45443: 28.0.50; Can't find definition of compilation--message->loc
Date: Sun, 27 Dec 2020 01:51:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)

Drew Adams <drew.adams@oracle.com> writes:

>> It's a general problem with uses of cl-defstruct and similar
>> constructs: they generate functions and macros that the Help functions
>> are unable to find.
>
> Yep.  It's a big doc/help problem, IMO.  And
> we've moved more and more stuff to things like
> `cl-defstruct' (which in itself is fine).
>
> I don't see a good general solution to this
> problem.  But it is, I think, something
> important for the quintessential
> "self-documenting" editor.  I truly hope that
> some smart and ambitious hacker tackles this.

One possible approach is, if the regular expression code fails to find a
location, we can fall back to expand macros until we find the definition
(a defalias in the case of a function, or a defvar in the case of a
variable), or we reach the end of the file.

I attach a first implementation of this approach, with some tests for
the function definition that Richard wanted to find.  I'm sure there are
still missing cases that are interesting (closures?).  Give it a try and
see if there are still relevant symbols whose definition Emacs is unable
to locate.  I'm also open to feedback about the macro expansion logic.
Could it be more efficient?  Thanks.

Attachment: 0001-Improve-find-definition-in-Help-buffers.patch
Description: Text Data


reply via email to

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