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

From: Juri Linkov <[email-masked]>
Date: Fri, 23 Aug 2024 09:27:17 +0300

>>> 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...  ]

Interesting, I didn't notice this difference.

>> 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.

Thanks, this looks like the right thing to do.