[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master bc2a93d: Fix more regular expression typos
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] master bc2a93d: Fix more regular expression typos |
Date: |
Wed, 20 Mar 2019 09:14:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>>> (progn
>>> - (skip-chars-forward "^ \t\n\\")
>>> + (skip-chars-forward "^ \t\n")
>>> (when (eq (char-after) ?\\)
>>> (forward-char 1)
>>> (unless (eolp)
>>
>> Hmm... no this needs to be
[...]
> Are you sure? Trailing backslashes in skip-sets have no effect, and
> semantically the backslash cannot reasonably be included because of the
> condition that follows.
Notice it's a negated skip, so with (skip-chars-forward "^ \t\n") we'll
happily skip over a backslash, and hence the subsequent (eq (char-after) ?\\)
can never be true.
The skip+when do the equivalent of a regexp "[^ \t\n\\]\\|\\\\.".
Stefan