Subject: Re: bug#63708: 29.0.60; rust-ts-mode not properly handling apostrophe

From: Randy Taylor <[email-masked]>
Date: Thu, 25 May 2023 12:52:18 +0000

On Thursday, May 25th, 2023 at 01:30, Eli Zaretskii <[email-masked]> wrote:
> 
> > Date: Wed, 24 May 2023 21:40:30 +0000
> 
> > From: yordanm--- via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" [email-masked]
> > 
> > In Rust (rust-ts-mode) apostrophe-doublequote-apostrophe break many
> > parsing functions (scan-lists being the core one) as the apostrophe
> > character is parsed as punctuation, not as a string (as it is in
> > c-ts-mode for example).
> 
> 
> Randy, can you please look into this?

Thanks for the patch Yordan.

Apostrophes are also used to denote lifetimes in Rust, so I'm not sure this is the right fix. They are also used for loop labels, too.

We probably need to augment rust-ts-mode--syntax-propertize where we apply the string syntax property to any char_literal nodes. It would probably be too late for emacs-29 though.