Subject: Re: bug#72757: No symbols in etc/NEWS

From: Visuwesh <[email-masked]>
Date: Thu, 22 Aug 2024 20:21:23 +0530

[வியாழன் ஆகஸ்ட் 22, 2024] Eli Zaretskii wrote:

>> From: Juri Linkov <[email-masked]>
>> Date: Thu, 22 Aug 2024 09:22:34 +0300
>> 
>> 0. emacs -Q
>> 1. Open etc/NEWS
>> 2. Move point to a symbol enclosed in single quotes
>> 3. Type 'C-h o'
>> 4. No default is proposed, so need to type the symbol manually
>>    instead of typing RET

[ I can only seem to reproduce if the symbol is in the heading.  If the
  symbol enclosed in quotes is in the "body" text, then the DEFAULT
  argument is picked up by C-h o as expected...  ]

> That's because thing-at-point--beginning-of-symbol allows the
> apostrophe as part of the symbol's name, and so "C-h o" thinks the
> symbol at point is 'foo-bar', with the quotes.
>
> I don't see any better solution than providing a NEWS-specific version
> of thing-at-point--beginning-of-symbol.

Would it not be simpler to change the syntax-table of
emacs-news-(view-)mode?

I did

    M-: (modify-syntax-entry ?' "\"") RET

in the NEWS buffer and C-h o seems to work everywhere.  I am not sure if
we want ' to be "string quote" or punctuation like " already is, or
something else.