Subject: Re: bug#65347: 29.1; Underscore in query replace prevents case-matching

From: Eli Zaretskii <[email-masked]>
Date: Thu, 17 Aug 2023 16:26:35 +0300

> From: Spencer Baugh <[email-masked]>
> Cc: [email-masked]
> Date: Thu, 17 Aug 2023 08:42:35 -0400
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > These subtleties come up from time to time, so I think it's high time
> > we documented that (in the hope this will stop this from popping up),
> > so I've now done so on the emacs-29 branch.
> >
> > I think this is all we should do here, as the behavior is correct and
> > justified, has been like that since time immemoriam, and we should not
> > change it, therefore.
> 
> Ah, that makes sense!  I have no further complaint then and we should be
> able to close the bug.

Done now.

> Although, a further relevant question: is there some way to make _ not
> be a word separator, in this specific context?  Without changing the
> syntax table of the buffer overall?  So that foo_bar is interpreted as
> one word?
> 
> Maybe some kind of escaping?

I'm not aware of any such way.  The code explicitly checks the syntax
to be 'word' or not 'word'.  But maybe Stefan has some insights?

You could, of course, make a wrapper command that would modify the
syntax table before invoking the real thing.