]> git.eshelyaron.com Git - emacs.git/commitdiff
(perl-font-lock-special-syntactic-constructs):
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 30 Nov 2009 13:43:51 +0000 (13:43 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 30 Nov 2009 13:43:51 +0000 (13:43 +0000)
Don't signal an error when bumping into EOB in tr, s, or y.

lisp/ChangeLog
lisp/progmodes/perl-mode.el

index af32716c2fc19e8577615d9775928e2481718308..e35cdf99fa29de885240919895cdfceec1e5c121 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-30  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/perl-mode.el (perl-font-lock-special-syntactic-constructs):
+       Don't signal an error when bumping into EOB in tr, s, or y.
+
 2009-11-29  Juri Linkov  <juri@jurta.org>
 
        * startup.el (fancy-about-text): Fix wording of Guided Tour.
@@ -10,8 +15,7 @@
 
        * ediff-util.el (ediff-minibuffer-with-setup-hook):
        New compatibility macro.
-       (ediff-read-file-name): Use it instead of
-       `minibuffer-with-setup-hook'.
+       (ediff-read-file-name): Use it instead of `minibuffer-with-setup-hook'.
 
 2009-11-29  Juri Linkov  <juri@jurta.org>
 
index 2dedda4fcfa74649669cd3da5f57971c3d45b023..eaa9bbc6af13d0f2271041b592a01ba64cc3fa52 100644 (file)
@@ -273,8 +273,8 @@ The expansion is entirely correct because it uses the C preprocessor."
     ;; (or some similar separator), or by one of the special keywords
     ;; corresponding to builtin functions that can take their first arg
     ;; without parentheses.  Of course, that presume we're looking at the
-    ;; *opening* slash.  We can mis-match the closing ones, because they are
-    ;; treated separately later in
+    ;; *opening* slash.  We can afford to mis-match the closing ones
+    ;; here, because they will be re-treated separately later in
     ;; perl-font-lock-special-syntactic-constructs.
     (,(concat "\\(?:\\(?:\\(?:^\\|[^$@&%[:word:]]\\)"
               (regexp-opt '("split" "if" "unless" "until" "while" "split"
@@ -381,13 +381,14 @@ The expansion is entirely correct because it uses the C preprocessor."
                            'font-lock-multiline t)
                           ;;
                           (unless
-                              (save-excursion
-                                (with-syntax-table
-                                    (perl-quote-syntax-table (char-after))
-                                  (forward-sexp 1))
-                                (put-text-property pos (line-end-position)
-                                                   'jit-lock-defer-multiline t)
-                                (looking-at "\\s-*\\sw*e"))
+                              (or (eobp)
+                                  (save-excursion
+                                    (with-syntax-table
+                                        (perl-quote-syntax-table (char-after))
+                                      (forward-sexp 1))
+                                    (put-text-property pos (line-end-position)
+                                                    jit-lock-defer-multiline t)
+                                    (looking-at "\\s-*\\sw*e")))
                             (put-text-property (point) (1+ (point))
                                                'syntax-table
                                                (if (assoc (char-after)