]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-special-constructs):
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 15 Mar 2012 03:09:26 +0000 (23:09 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 15 Mar 2012 03:09:26 +0000 (23:09 -0400)
Fix up parsing of multiline twoarg non-paired elements.

Fixes: debbugs:11014
lisp/ChangeLog
lisp/progmodes/perl-mode.el

index 083d58b8e8fd883f1272367d97ccc6ed96e05bc1..f19d5e8ab79d37ae017d1079442146ae9d695fc6 100644 (file)
@@ -1,5 +1,8 @@
 2012-03-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * progmodes/perl-mode.el (perl-syntax-propertize-special-constructs):
+       Fix up parsing of multiline twoarg non-paired elements (bug#11014).
+
        * imenu.el: Fix multiple inheritance breakage (bug#9199).
        (imenu-add-to-menubar): Don't add a redundant index.
        (imenu-update-menubar): Handle a dynamically composed keymap.
index e7afd0e0e6707ceda7fef7b8215a6f5ca37da5d4..de728da236dede4fbc8a5683fb0d21922d1ea863 100644 (file)
@@ -388,7 +388,11 @@ The expansion is entirely correct because it uses the C preprocessor."
                       ;; In case of error, make sure we don't move backward.
                      (scan-error (goto-char startpos) nil))
                  (not (or (nth 8 (parse-partial-sexp
-                                  (point) limit nil nil state 'syntax-table))
+                                  ;; Since we don't know if point is within
+                                  ;; the first or the scond arg, we have to
+                                  ;; start from the beginning.
+                                  (if twoargs (1+ (nth 8 state)) (point))
+                                  limit nil nil state 'syntax-table))
                           ;; If we have a self-paired opener and a twoargs
                           ;; command, the form is s/../../ so we have to skip
                           ;; a second time.