diff options
| author | Stefan Monnier | 2009-11-30 13:43:51 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-11-30 13:43:51 +0000 |
| commit | 7a9547ca154a37fdb68e953adecbd87b4953b65c (patch) | |
| tree | 51796cb008ef19d2c4644c421e4cc8856790a50c | |
| parent | 29a483ace468fdb0487c12d7b5644386351ef230 (diff) | |
| download | emacs-7a9547ca154a37fdb68e953adecbd87b4953b65c.tar.gz emacs-7a9547ca154a37fdb68e953adecbd87b4953b65c.zip | |
(perl-font-lock-special-syntactic-constructs):
Don't signal an error when bumping into EOB in tr, s, or y.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/progmodes/perl-mode.el | 19 |
2 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af32716c2fc..e35cdf99fa2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-11-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/perl-mode.el (perl-font-lock-special-syntactic-constructs): | ||
| 4 | Don't signal an error when bumping into EOB in tr, s, or y. | ||
| 5 | |||
| 1 | 2009-11-29 Juri Linkov <juri@jurta.org> | 6 | 2009-11-29 Juri Linkov <juri@jurta.org> |
| 2 | 7 | ||
| 3 | * startup.el (fancy-about-text): Fix wording of Guided Tour. | 8 | * startup.el (fancy-about-text): Fix wording of Guided Tour. |
| @@ -10,8 +15,7 @@ | |||
| 10 | 15 | ||
| 11 | * ediff-util.el (ediff-minibuffer-with-setup-hook): | 16 | * ediff-util.el (ediff-minibuffer-with-setup-hook): |
| 12 | New compatibility macro. | 17 | New compatibility macro. |
| 13 | (ediff-read-file-name): Use it instead of | 18 | (ediff-read-file-name): Use it instead of `minibuffer-with-setup-hook'. |
| 14 | `minibuffer-with-setup-hook'. | ||
| 15 | 19 | ||
| 16 | 2009-11-29 Juri Linkov <juri@jurta.org> | 20 | 2009-11-29 Juri Linkov <juri@jurta.org> |
| 17 | 21 | ||
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 2dedda4fcfa..eaa9bbc6af1 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -273,8 +273,8 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 273 | ;; (or some similar separator), or by one of the special keywords | 273 | ;; (or some similar separator), or by one of the special keywords |
| 274 | ;; corresponding to builtin functions that can take their first arg | 274 | ;; corresponding to builtin functions that can take their first arg |
| 275 | ;; without parentheses. Of course, that presume we're looking at the | 275 | ;; without parentheses. Of course, that presume we're looking at the |
| 276 | ;; *opening* slash. We can mis-match the closing ones, because they are | 276 | ;; *opening* slash. We can afford to mis-match the closing ones |
| 277 | ;; treated separately later in | 277 | ;; here, because they will be re-treated separately later in |
| 278 | ;; perl-font-lock-special-syntactic-constructs. | 278 | ;; perl-font-lock-special-syntactic-constructs. |
| 279 | (,(concat "\\(?:\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" | 279 | (,(concat "\\(?:\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" |
| 280 | (regexp-opt '("split" "if" "unless" "until" "while" "split" | 280 | (regexp-opt '("split" "if" "unless" "until" "while" "split" |
| @@ -381,13 +381,14 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 381 | 'font-lock-multiline t) | 381 | 'font-lock-multiline t) |
| 382 | ;; | 382 | ;; |
| 383 | (unless | 383 | (unless |
| 384 | (save-excursion | 384 | (or (eobp) |
| 385 | (with-syntax-table | 385 | (save-excursion |
| 386 | (perl-quote-syntax-table (char-after)) | 386 | (with-syntax-table |
| 387 | (forward-sexp 1)) | 387 | (perl-quote-syntax-table (char-after)) |
| 388 | (put-text-property pos (line-end-position) | 388 | (forward-sexp 1)) |
| 389 | 'jit-lock-defer-multiline t) | 389 | (put-text-property pos (line-end-position) |
| 390 | (looking-at "\\s-*\\sw*e")) | 390 | jit-lock-defer-multiline t) |
| 391 | (looking-at "\\s-*\\sw*e"))) | ||
| 391 | (put-text-property (point) (1+ (point)) | 392 | (put-text-property (point) (1+ (point)) |
| 392 | 'syntax-table | 393 | 'syntax-table |
| 393 | (if (assoc (char-after) | 394 | (if (assoc (char-after) |