Mercurial > emacs
comparison lisp/progmodes/cperl-mode.el @ 63836:e6973993a720
(cperl-find-pods-heres): Don't gratuitously
reset the syntax-table to cperl-mode-syntax-table.
(cperl-mode): Make _ into word-syntax during font-locking so "print" in
"foo_print_bar" is not matched as a reserved keyword.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 29 Jun 2005 07:59:36 +0000 |
parents | 475955d58ad4 |
children | 123dae8639ec |
comparison
equal
deleted
inserted
replaced
63835:98c693a81ce6 | 63836:e6973993a720 |
---|---|
1514 cperl-font-lock-keywords-1 | 1514 cperl-font-lock-keywords-1 |
1515 cperl-font-lock-keywords-2))) | 1515 cperl-font-lock-keywords-2))) |
1516 (t | 1516 (t |
1517 '((cperl-load-font-lock-keywords | 1517 '((cperl-load-font-lock-keywords |
1518 cperl-load-font-lock-keywords-1 | 1518 cperl-load-font-lock-keywords-1 |
1519 cperl-load-font-lock-keywords-2))))) | 1519 cperl-load-font-lock-keywords-2) |
1520 nil nil ((?_ . "w")))))) | |
1520 (make-local-variable 'cperl-syntax-state) | 1521 (make-local-variable 'cperl-syntax-state) |
1521 (if cperl-use-syntax-table-text-property | 1522 (if cperl-use-syntax-table-text-property |
1522 (progn | 1523 (progn |
1523 (make-local-variable 'parse-sexp-lookup-properties) | 1524 (make-local-variable 'parse-sexp-lookup-properties) |
1524 ;; Do not introduce variable if not needed, we check it! | 1525 ;; Do not introduce variable if not needed, we check it! |
3838 (or non-inter | 3839 (or non-inter |
3839 (message "Scanning for \"hard\" Perl constructions... done")))) | 3840 (message "Scanning for \"hard\" Perl constructions... done")))) |
3840 (and (buffer-modified-p) | 3841 (and (buffer-modified-p) |
3841 (not modified) | 3842 (not modified) |
3842 (set-buffer-modified-p nil)) | 3843 (set-buffer-modified-p nil)) |
3843 (set-syntax-table cperl-mode-syntax-table)) | 3844 ;; I do not understand what this is doing here. It breaks font-locking |
3845 ;; because it resets the syntax-table from font-lock-syntax-table to | |
3846 ;; cperl-mode-syntax-table. | |
3847 ;; (set-syntax-table cperl-mode-syntax-table) | |
3848 ) | |
3844 (car err-l))) | 3849 (car err-l))) |
3845 | 3850 |
3846 (defun cperl-backward-to-noncomment (lim) | 3851 (defun cperl-backward-to-noncomment (lim) |
3847 ;; Stops at lim or after non-whitespace that is not in comment | 3852 ;; Stops at lim or after non-whitespace that is not in comment |
3848 (let (stop p pr) | 3853 (let (stop p pr) |