From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r111958: * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Only
Date: Fri, 08 Mar 2013 20:41:18 -0500 [thread overview]
Message-ID: <jwv62118icg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1UDJq5-0007SO-Pc@vcs.savannah.gnu.org> (Dmitry Gutov's message of "Wed, 06 Mar 2013 22:56:29 +0400")
> ;; The regular expression itself.
> "\\(/\\)[^/\n\\\\]*\\(?:\\\\.[^/\n\\\\]*\\)*\\(/\\)")
> - (2 (string-to-syntax "\"/"))
> - (3 (string-to-syntax "\"/")))
> + (3 (unless (nth 3 (syntax-ppss (match-beginning 2)))
> + (put-text-property (match-beginning 2) (match-end 2)
> + 'syntax-table (string-to-syntax "\"/"))
> + (string-to-syntax "\"/"))))
If match n°2 is not inside a string, I think we should not skip all
that's matched by the regexp (since it's not a string and may hence
contain other things that need to be syntax-propertized). I.e. The
`unless' should be turned into an `if' and in the non-string case it
should move point back to (match-end 2).
Stefan
next parent reply other threads:[~2013-03-09 1:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1UDJq5-0007SO-Pc@vcs.savannah.gnu.org>
2013-03-09 1:41 ` Stefan Monnier [this message]
2013-03-09 1:45 ` [Emacs-diffs] /srv/bzr/emacs/trunk r111958: * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Only Dmitry Gutov
2013-03-09 3:22 ` Stefan Monnier
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=jwv62118icg.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dgutov@yandex.ru \
--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.