# HG changeset patch # User Stefan Monnier # Date 1259588631 0 # Node ID 233d17a2b6f037f748887f3dd869a5e7aff8aaac # Parent da01d19630f43646febde01b84e940f295e6226d (perl-font-lock-special-syntactic-constructs): Don't signal an error when bumping into EOB in tr, s, or y. diff -r da01d19630f4 -r 233d17a2b6f0 lisp/ChangeLog --- a/lisp/ChangeLog Sun Nov 29 23:57:18 2009 +0000 +++ b/lisp/ChangeLog Mon Nov 30 13:43:51 2009 +0000 @@ -1,3 +1,8 @@ +2009-11-30 Stefan Monnier + + * 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 * 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 diff -r da01d19630f4 -r 233d17a2b6f0 lisp/progmodes/perl-mode.el --- a/lisp/progmodes/perl-mode.el Sun Nov 29 23:57:18 2009 +0000 +++ b/lisp/progmodes/perl-mode.el Mon Nov 30 13:43:51 2009 +0000 @@ -273,8 +273,8 @@ ;; (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 @@ '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)