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: Andrea Corallo
Subject: bug#45443: 28.0.50; Can't find definition of compilation--message->loc
Date: Sun, 27 Dec 2020 19:40:47 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@gnu.org> writes:
>
>>>
>>> Why do we need to expand macros? isn't it enough to find the defstruct
>>> itself, by looking for a partial match?
>>
>> I haven't look at the patch, but I think the approach of macro expanding
>> is more general as should be able to track any function definition that
>> is synthesized by any macro.
>>
>
> Yes, my patch tried a more general approach, which would not only find
> function definitions, but also defvars like the hooks that are
> synthesized by define-major-mode, for example.
>
> There's some opportunities to do less work, though.  For example, I
> think it does not make sense to expand defuns because those were handled
> in a previous step.  I think that'd reduce the search space
> significantly.
>
> Another possible approach for this problem is to search textually for
> just the things that we're typically interested in (like, cl-defstruct
> or define-derived-mode), and expand only those to see if they synthesize
> the symbol we are looking for.  It will be a less general solution, but
> it will be faster.  We may add more cases in the future, if needed.
>
> Thoughts?

I personally like the generic approach.  Also considered should be
running only when the regexp based one is failing and therefore with no
performance hit in most cases but only fixing the broken ones.

  Andrea





reply via email to

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