bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21922: Fwd: Patch for fixing "straigh-quote" case


From: Noam Postavsky
Subject: bug#21922: Fwd: Patch for fixing "straigh-quote" case
Date: Tue, 22 Oct 2019 19:59:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Luis Henriquez-Perez <luishenriquezperez@gmail.com> writes:

> I replied to your personal email instead of this thread. I thought maybe my
> replies had not been seen (and also that this should be recorded in the
> thread). So this is what I had said:

I did you see your messages, just haven't had so much time for handling
Emacs bugs recently.  I was going to forward it to the list before
replying, so thanks for doing that.

> question 1:
> I get an `unknown posix character class` error when I try (looking-at-p
> "[[:whitespace:]\n]*quote\_>").  Did you mean to use [[:space:]] instead?
> Did you mean:  (looking-at-p "[[:space:]]*quote\\>")?

I mixed things up a bit, I meant to say

    (looking-at-p "[[:space:]\n]*quote\\_>")

The "\n" is needed because it typically has comment-ender syntax instead
of space syntax.  "\\>" matches end of word, "\\_>" is end of symbol.

> question 2:
> The reason I used explicit whitespace character is because matches for
> character classes like [[:space:]] are dependent on the active syntax table
> in the buffer (see this issue
> <https://emacs.stackexchange.com/questions/40911/why-do-regexp-that-matches-text-in-buffer-does-not-necessarily-match-same-text>).
> Not sure if this will be a problem though, what do you think?

I think relying on the mode's syntax table makes sense, though it
probably doesn't matter a whole lot either way.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]