all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master bc2a93d: Fix more regular expression typos
Date: Wed, 20 Mar 2019 09:14:53 -0400	[thread overview]
Message-ID: <jwvimwdpu4n.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: DA636990-3B43-44BF-9CC1-861916CBC013@acm.org

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




  reply	other threads:[~2019-03-20 13:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190319000234.5983.14812@vcs0.savannah.gnu.org>
     [not found] ` <20190319000239.D3DC7209E0@vcs0.savannah.gnu.org>
2019-03-20 12:26   ` [Emacs-diffs] master bc2a93d: Fix more regular expression typos Stefan Monnier
2019-03-20 13:01     ` Mattias Engdegård
2019-03-20 13:14       ` Stefan Monnier [this message]
2019-03-20 13:33         ` Mattias Engdegård
2019-03-20 16:24           ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvimwdpu4n.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.