(perl-font-lock-special-syntactic-constructs):

Don't signal an error when bumping into EOB in tr, s, or y.
This commit is contained in:
Stefan Monnier 2009-11-30 13:43:51 +00:00
parent 29a483ace4
commit 7a9547ca15
2 changed files with 16 additions and 11 deletions

View 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> 2009-11-29 Juri Linkov <juri@jurta.org>
* startup.el (fancy-about-text): Fix wording of Guided Tour. * startup.el (fancy-about-text): Fix wording of Guided Tour.
@ -10,8 +15,7 @@
* ediff-util.el (ediff-minibuffer-with-setup-hook): * ediff-util.el (ediff-minibuffer-with-setup-hook):
New compatibility macro. New compatibility macro.
(ediff-read-file-name): Use it instead of (ediff-read-file-name): Use it instead of `minibuffer-with-setup-hook'.
`minibuffer-with-setup-hook'.
2009-11-29 Juri Linkov <juri@jurta.org> 2009-11-29 Juri Linkov <juri@jurta.org>

View 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 ;; (or some similar separator), or by one of the special keywords
;; corresponding to builtin functions that can take their first arg ;; corresponding to builtin functions that can take their first arg
;; without parentheses. Of course, that presume we're looking at the ;; without parentheses. Of course, that presume we're looking at the
;; *opening* slash. We can mis-match the closing ones, because they are ;; *opening* slash. We can afford to mis-match the closing ones
;; treated separately later in ;; here, because they will be re-treated separately later in
;; perl-font-lock-special-syntactic-constructs. ;; perl-font-lock-special-syntactic-constructs.
(,(concat "\\(?:\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" (,(concat "\\(?:\\(?:\\(?:^\\|[^$@&%[:word:]]\\)"
(regexp-opt '("split" "if" "unless" "until" "while" "split" (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) 'font-lock-multiline t)
;; ;;
(unless (unless
(or (eobp)
(save-excursion (save-excursion
(with-syntax-table (with-syntax-table
(perl-quote-syntax-table (char-after)) (perl-quote-syntax-table (char-after))
(forward-sexp 1)) (forward-sexp 1))
(put-text-property pos (line-end-position) (put-text-property pos (line-end-position)
'jit-lock-defer-multiline t) jit-lock-defer-multiline t)
(looking-at "\\s-*\\sw*e")) (looking-at "\\s-*\\sw*e")))
(put-text-property (point) (1+ (point)) (put-text-property (point) (1+ (point))
'syntax-table 'syntax-table
(if (assoc (char-after) (if (assoc (char-after)