emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r111958: * lisp/progmodes/ruby-mo


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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



reply via email to

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