changeset 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 98c693a81ce6
children 51976224295a
files lisp/progmodes/cperl-mode.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cperl-mode.el	Wed Jun 29 07:42:54 2005 +0000
+++ b/lisp/progmodes/cperl-mode.el	Wed Jun 29 07:59:36 2005 +0000
@@ -1516,7 +1516,8 @@
 	 (t
 	  '((cperl-load-font-lock-keywords
 	     cperl-load-font-lock-keywords-1
-	     cperl-load-font-lock-keywords-2)))))
+	     cperl-load-font-lock-keywords-2)
+            nil nil ((?_ . "w"))))))
   (make-local-variable 'cperl-syntax-state)
   (if cperl-use-syntax-table-text-property
       (progn
@@ -3840,7 +3841,11 @@
       (and (buffer-modified-p)
 	   (not modified)
 	   (set-buffer-modified-p nil))
-      (set-syntax-table cperl-mode-syntax-table))
+      ;; I do not understand what this is doing here.  It breaks font-locking
+      ;; because it resets the syntax-table from font-lock-syntax-table to
+      ;; cperl-mode-syntax-table.
+      ;; (set-syntax-table cperl-mode-syntax-table)
+      )
     (car err-l)))
 
 (defun cperl-backward-to-noncomment (lim)