]> git.eshelyaron.com Git - emacs.git/commitdiff
(cperl-find-pods-heres): Don't gratuitously
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 29 Jun 2005 07:59:36 +0000 (07:59 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 29 Jun 2005 07:59:36 +0000 (07:59 +0000)
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.

lisp/progmodes/cperl-mode.el

index d95c0294c4d9a71ee0cc9496cd822b4b804f55be..63b7ceb6ed0c1709d5a863960a269da01caea231 100644 (file)
@@ -1516,7 +1516,8 @@ or as help on variables `cperl-tips', `cperl-problems',
         (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 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
       (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)