Mercurial > emacs
comparison lisp/progmodes/cperl-mode.el @ 82431:36aa5fc31532
Fix s{a}{b} parsing
author | Vinicius Jose Latorre <viniciusjl@ig.com.br> |
---|---|
date | Fri, 17 Aug 2007 18:57:47 +0000 |
parents | 419c5c316b51 |
children | 5c8d5235a4ac a22a8a63b26d aaccdab0ee26 |
comparison
equal
deleted
inserted
replaced
82430:5c17a56b467b | 82431:36aa5fc31532 |
---|---|
3734 (modify-syntax-entry ?\) "." st))) | 3734 (modify-syntax-entry ?\) "." st))) |
3735 (if reset-st | 3735 (if reset-st |
3736 (set-syntax-table reset-st)))) | 3736 (set-syntax-table reset-st)))) |
3737 | 3737 |
3738 (defsubst cperl-look-at-leading-count (is-x-REx e) | 3738 (defsubst cperl-look-at-leading-count (is-x-REx e) |
3739 (if (re-search-forward (concat "\\=" (if is-x-REx "[ \t\n]*" "") "[{?+*]") | 3739 (if (and (> (point) e) |
3740 (1- e) t) ; return nil on failure, no moving | 3740 ;; return nil on failure, no moving |
3741 (re-search-forward (concat "\\=" | |
3742 (if is-x-REx "[ \t\n]*" "") | |
3743 "[{?+*]") | |
3744 (1- e) t)) | |
3741 (if (eq ?\{ (preceding-char)) nil | 3745 (if (eq ?\{ (preceding-char)) nil |
3742 (cperl-postpone-fontification | 3746 (cperl-postpone-fontification |
3743 (1- (point)) (point) | 3747 (1- (point)) (point) |
3744 'face font-lock-warning-face)))) | 3748 'face font-lock-warning-face)))) |
3745 | 3749 |
3748 "Scans the buffer for hard-to-parse Perl constructions. | 3752 "Scans the buffer for hard-to-parse Perl constructions. |
3749 If `cperl-pod-here-fontify' is not-nil after evaluation, will fontify | 3753 If `cperl-pod-here-fontify' is not-nil after evaluation, will fontify |
3750 the sections using `cperl-pod-head-face', `cperl-pod-face', | 3754 the sections using `cperl-pod-head-face', `cperl-pod-face', |
3751 `cperl-here-face'." | 3755 `cperl-here-face'." |
3752 (interactive) | 3756 (interactive) |
3753 (or min (setq min (point-min) | 3757 (or min (setq min (point-min) |
3754 cperl-syntax-state nil | 3758 cperl-syntax-state nil |
3755 cperl-syntax-done-to min)) | 3759 cperl-syntax-done-to min)) |
3756 (or max (setq max (point-max))) | 3760 (or max (setq max (point-max))) |
3757 (let* ((cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend | 3761 (let* ((cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend |
3758 face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb | 3762 face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb |
4783 'syntax-subtype 'x-REx))) | 4787 'syntax-subtype 'x-REx))) |
4784 (if i2 | 4788 (if i2 |
4785 (progn | 4789 (progn |
4786 (cperl-postpone-fontification | 4790 (cperl-postpone-fontification |
4787 (1- e1) e1 'face my-cperl-delimiters-face) | 4791 (1- e1) e1 'face my-cperl-delimiters-face) |
4788 (if (assoc (char-after b) cperl-starters) | 4792 (if (and (not (eobp)) |
4793 (assoc (char-after b) cperl-starters)) | |
4789 (progn | 4794 (progn |
4790 (cperl-postpone-fontification | 4795 (cperl-postpone-fontification |
4791 b1 (1+ b1) 'face my-cperl-delimiters-face) | 4796 b1 (1+ b1) 'face my-cperl-delimiters-face) |
4792 (put-text-property b1 (1+ b1) | 4797 (put-text-property b1 (1+ b1) |
4793 'REx-part2 t))))) | 4798 'REx-part2 t))))) |