[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a property "definition-type" would help find macro-defined tests
From: |
Eshel Yaron |
Subject: |
Re: a property "definition-type" would help find macro-defined tests |
Date: |
Mon, 13 Jan 2025 10:03:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi there,
Stephen Gildea <stepheng+emacs@gildea.com> writes:
> Eli Zaretskii <eliz@gnu.org> wrote:
>
>> This LGTM, thanks.
>
> Pushed:
> c98d9e -- better indexing of symbol properties
> e6591b -- new symbol property 'definition-type'
Thanks for working on this! While I understand the motivation for this
feature, ISTM that the design/implementation is not completely coherent:
a symbol in ELisp can name multiple things of different types, the same
symbol can have definitions as a function, variable, face, feature, etc.
It doesn't make sense to talk about "the definition type" of a symbol,
because it can have multiple types.
The implementation makes this issue clear:
find-function-search-for-symbol now just ignores the TYPE argument for
symbols with a specified definition-type property. So if we want to
find the definition of foo as a face, but someone happened to give foo a
definition-type of, say, a feature, then we're out of luck: we'll get
the wrong results from find-function-search-for-symbol, and we might not
even know it, since it silently ignores the requested TYPE. Right?
So, unless I'm missing something, instead of a "definition-type", I'd
suggest to give such symbols that need special handling a
symbol-specific association between types and methods for finding
definitions as a symbol property. So the value of the property would
look like find-function-regexp-alist, just specific to the given symbol,
overriding the "default" associations of find-function-regexp-alist.
I hope this makes sense, sorry for not chiming in earlier.
Regards,
Eshel
- Re: a property "definition-type" would help find macro-defined tests, (continued)
- Re: a property "definition-type" would help find macro-defined tests, Eli Zaretskii, 2025/01/08
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/08
- Re: a property "definition-type" would help find macro-defined tests, Eli Zaretskii, 2025/01/09
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/09
- Re: a property "definition-type" would help find macro-defined tests, Eli Zaretskii, 2025/01/10
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/11
- Re: a property "definition-type" would help find macro-defined tests, Eli Zaretskii, 2025/01/12
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/12
- Re: a property "definition-type" would help find macro-defined tests, Eli Zaretskii, 2025/01/12
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/12
- Re: a property "definition-type" would help find macro-defined tests,
Eshel Yaron <=
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/13
- Re: a property "definition-type" would help find macro-defined tests, Eshel Yaron, 2025/01/14
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/14
- Re: a property "definition-type" would help find macro-defined tests, Eshel Yaron, 2025/01/15
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/15
- Re: a property "definition-type" would help find macro-defined tests, Eli Zaretskii, 2025/01/16
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/16
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/16
- Re: a property "definition-type" would help find macro-defined tests, Eli Zaretskii, 2025/01/17
- Re: a property "definition-type" would help find macro-defined tests, Stephen Gildea, 2025/01/22