Subject: Re: bug#44418: 28.0.50; Spliced variable not matched as symbol in isearch

From: Stefan Monnier <[email-masked]>
Date: Tue, 07 Jun 2022 08:05:31 -0400

>> 0. emacs -Q
>> 1. (let (x) `(,@x))
>> 2. M-s _ x
>>
>> This highlights the bound x, but not the spliced x.  The same happens
>> with 'M-s .' or the equivalent 'C-M-s'.
>>
>> This is because lisp--mode-syntax-table gives 'prefix' syntax to ?, and
>> 'symbol' syntax to ?@.  Is it possible to give 'prefix' syntax to ",@"
>> as a whole, and in general?
>
> (This is still present in Emacs 29.)
>
> I'm not sure whether that is possible or not -- perhaps Stefan knows;
> added to the CCs.

`@x` is a valid symbol, which is why `?@` is given symbol syntax.
If we want to fix the above search we need to use
`syntax-propertize-function` to change the syntax of those `@` that
follow a comma.

        Stefan