diff options
author | Vinicius Jose Latorre <[email protected]> | 2007-08-17 18:58:32 +0000 |
---|---|---|
committer | Vinicius Jose Latorre <[email protected]> | 2007-08-17 18:58:32 +0000 |
commit | 05927f8c8b1ea6bd82c077783ebece2ac70d32ec (patch) | |
tree | 669a2f1648baf4895e5b07db8769670f8154b005 /lisp/progmodes/cperl-mode.el | |
parent | b9c2e294883dd15ac0bea63d8f046da505a73c3a (diff) |
Fix s{a}{b} parsing
Diffstat (limited to 'lisp/progmodes/cperl-mode.el')
-rw-r--r-- | lisp/progmodes/cperl-mode.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index cd7dabb882..5a91141db6 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3736,8 +3736,12 @@ Should be called with the point before leading colon of an attribute." (set-syntax-table reset-st)))) (defsubst cperl-look-at-leading-count (is-x-REx e) - (if (re-search-forward (concat "\\=" (if is-x-REx "[ \t\n]*" "") "[{?+*]") - (1- e) t) ; return nil on failure, no moving + (if (and (> (point) e) + ;; return nil on failure, no moving + (re-search-forward (concat "\\=" + (if is-x-REx "[ \t\n]*" "") + "[{?+*]") + (1- e) t)) (if (eq ?\{ (preceding-char)) nil (cperl-postpone-fontification (1- (point)) (point) @@ -3750,7 +3754,7 @@ If `cperl-pod-here-fontify' is not-nil after evaluation, will fontify the sections using `cperl-pod-head-face', `cperl-pod-face', `cperl-here-face'." (interactive) - (or min (setq min (point-min) + (or min (setq min (point-min) cperl-syntax-state nil cperl-syntax-done-to min)) (or max (setq max (point-max))) @@ -4785,7 +4789,8 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (progn (cperl-postpone-fontification (1- e1) e1 'face my-cperl-delimiters-face) - (if (assoc (char-after b) cperl-starters) + (if (and (not (eobp)) + (assoc (char-after b) cperl-starters)) (progn (cperl-postpone-fontification b1 (1+ b1) 'face my-cperl-delimiters-face) |