changeset 58198:3d3304742b88

(c-basic-common-initc-font-lock-init, c-font-lock-init): Eliminate obsolete make-local-hook. (c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode, awk-mode): Use run-mode-hooks.
author Daniel Pfeiffer <occitan@esperanto.org>
date Sat, 13 Nov 2004 20:23:38 +0000
parents 6c24ca598cb1
children 3cbfe7441f96
files lisp/progmodes/cc-mode.el
diffstat 1 files changed, 7 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el	Sat Nov 13 20:18:21 2004 +0000
+++ b/lisp/progmodes/cc-mode.el	Sat Nov 13 20:23:38 2004 +0000
@@ -491,7 +491,6 @@
 
   ;; Install the functions that ensure that various internal caches
   ;; don't become invalid due to buffer changes.
-  (make-local-hook 'after-change-functions)
   (add-hook 'after-change-functions 'c-after-change nil t))
 
 (defun c-after-font-lock-init ()
@@ -517,8 +516,6 @@
 	  c-beginning-of-syntax
 	  (font-lock-mark-block-function
 	   . c-mark-function)))
-
-  (make-local-hook 'font-lock-mode-hook)
   (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t))
 
 (defun c-setup-doc-comment-style ()
@@ -669,8 +666,7 @@
   (c-common-init 'c-mode)
   (easy-menu-add c-c-menu)
   (cc-imenu-init cc-imenu-c-generic-expression)
-  (run-hooks 'c-mode-common-hook)
-  (run-hooks 'c-mode-hook)
+  (run-mode-hooks 'c-mode-common-hook 'c-mode-hook)
   (c-update-modeline))
 
 
@@ -733,8 +729,7 @@
   (c-common-init 'c++-mode)
   (easy-menu-add c-c++-menu)
   (cc-imenu-init cc-imenu-c++-generic-expression)
-  (run-hooks 'c-mode-common-hook)
-  (run-hooks 'c++-mode-hook)
+  (run-mode-hooks 'c-mode-common-hook 'c++-mode-hook)
   (c-update-modeline))
 
 
@@ -798,8 +793,7 @@
   (c-common-init 'objc-mode)
   (easy-menu-add c-objc-menu)
   (cc-imenu-init nil 'cc-imenu-objc-function)
-  (run-hooks 'c-mode-common-hook)
-  (run-hooks 'objc-mode-hook)
+  (run-mode-hooks 'c-mode-common-hook 'objc-mode-hook)
   (c-update-modeline))
 
 
@@ -869,8 +863,7 @@
   (c-common-init 'java-mode)
   (easy-menu-add c-java-menu)
   (cc-imenu-init cc-imenu-java-generic-expression)
-  (run-hooks 'c-mode-common-hook)
-  (run-hooks 'java-mode-hook)
+  (run-mode-hooks 'c-mode-common-hook 'java-mode-hook)
   (c-update-modeline))
 
 
@@ -928,8 +921,7 @@
   (c-common-init 'idl-mode)
   (easy-menu-add c-idl-menu)
   ;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO
-  (run-hooks 'c-mode-common-hook)
-  (run-hooks 'idl-mode-hook)
+  (run-mode-hooks 'c-mode-common-hook 'idl-mode-hook)
   (c-update-modeline))
 
 
@@ -991,8 +983,7 @@
   (c-common-init 'pike-mode)
   (easy-menu-add c-pike-menu)
   ;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO
-  (run-hooks 'c-mode-common-hook)
-  (run-hooks 'pike-mode-hook)
+  (run-mode-hooks 'c-mode-common-hook 'pike-mode-hook)
   (c-update-modeline))
 
 
@@ -1084,8 +1075,7 @@
     ;; in cc-engine.el, just before (defun c-fast-in-literal ...
     (defalias 'c-in-literal 'c-slow-in-literal)
 
-    (run-hooks 'c-mode-common-hook)
-    (run-hooks 'awk-mode-hook)
+    (run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
     (c-update-modeline))
 ) ;; closes the (if (not (memq 'syntax-properties c-emacs-features))