aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pfeiffer2004-11-13 20:23:38 +0000
committerDaniel Pfeiffer2004-11-13 20:23:38 +0000
commit1aaf8a45eea127b3213868db2d2cbb75e5c0e4b0 (patch)
tree6f55781cadf7dc2fb45b0b341d0af5f5a976c04f
parentaf89e8710242b29ea53a150143df30207382891f (diff)
downloademacs-1aaf8a45eea127b3213868db2d2cbb75e5c0e4b0.tar.gz
emacs-1aaf8a45eea127b3213868db2d2cbb75e5c0e4b0.zip
(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.
-rw-r--r--lisp/progmodes/cc-mode.el24
1 files changed, 7 insertions, 17 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 7c2ef9f93bd..6cd0d1b31ca 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -491,7 +491,6 @@ that requires a literal mode spec at compile time."
491 491
492 ;; Install the functions that ensure that various internal caches 492 ;; Install the functions that ensure that various internal caches
493 ;; don't become invalid due to buffer changes. 493 ;; don't become invalid due to buffer changes.
494 (make-local-hook 'after-change-functions)
495 (add-hook 'after-change-functions 'c-after-change nil t)) 494 (add-hook 'after-change-functions 'c-after-change nil t))
496 495
497(defun c-after-font-lock-init () 496(defun c-after-font-lock-init ()
@@ -517,8 +516,6 @@ This does not load the font-lock package. Use after
517 c-beginning-of-syntax 516 c-beginning-of-syntax
518 (font-lock-mark-block-function 517 (font-lock-mark-block-function
519 . c-mark-function))) 518 . c-mark-function)))
520
521 (make-local-hook 'font-lock-mode-hook)
522 (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t)) 519 (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t))
523 520
524(defun c-setup-doc-comment-style () 521(defun c-setup-doc-comment-style ()
@@ -669,8 +666,7 @@ Key bindings:
669 (c-common-init 'c-mode) 666 (c-common-init 'c-mode)
670 (easy-menu-add c-c-menu) 667 (easy-menu-add c-c-menu)
671 (cc-imenu-init cc-imenu-c-generic-expression) 668 (cc-imenu-init cc-imenu-c-generic-expression)
672 (run-hooks 'c-mode-common-hook) 669 (run-mode-hooks 'c-mode-common-hook 'c-mode-hook)
673 (run-hooks 'c-mode-hook)
674 (c-update-modeline)) 670 (c-update-modeline))
675 671
676 672
@@ -733,8 +729,7 @@ Key bindings:
733 (c-common-init 'c++-mode) 729 (c-common-init 'c++-mode)
734 (easy-menu-add c-c++-menu) 730 (easy-menu-add c-c++-menu)
735 (cc-imenu-init cc-imenu-c++-generic-expression) 731 (cc-imenu-init cc-imenu-c++-generic-expression)
736 (run-hooks 'c-mode-common-hook) 732 (run-mode-hooks 'c-mode-common-hook 'c++-mode-hook)
737 (run-hooks 'c++-mode-hook)
738 (c-update-modeline)) 733 (c-update-modeline))
739 734
740 735
@@ -798,8 +793,7 @@ Key bindings:
798 (c-common-init 'objc-mode) 793 (c-common-init 'objc-mode)
799 (easy-menu-add c-objc-menu) 794 (easy-menu-add c-objc-menu)
800 (cc-imenu-init nil 'cc-imenu-objc-function) 795 (cc-imenu-init nil 'cc-imenu-objc-function)
801 (run-hooks 'c-mode-common-hook) 796 (run-mode-hooks 'c-mode-common-hook 'objc-mode-hook)
802 (run-hooks 'objc-mode-hook)
803 (c-update-modeline)) 797 (c-update-modeline))
804 798
805 799
@@ -869,8 +863,7 @@ Key bindings:
869 (c-common-init 'java-mode) 863 (c-common-init 'java-mode)
870 (easy-menu-add c-java-menu) 864 (easy-menu-add c-java-menu)
871 (cc-imenu-init cc-imenu-java-generic-expression) 865 (cc-imenu-init cc-imenu-java-generic-expression)
872 (run-hooks 'c-mode-common-hook) 866 (run-mode-hooks 'c-mode-common-hook 'java-mode-hook)
873 (run-hooks 'java-mode-hook)
874 (c-update-modeline)) 867 (c-update-modeline))
875 868
876 869
@@ -928,8 +921,7 @@ Key bindings:
928 (c-common-init 'idl-mode) 921 (c-common-init 'idl-mode)
929 (easy-menu-add c-idl-menu) 922 (easy-menu-add c-idl-menu)
930 ;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO 923 ;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO
931 (run-hooks 'c-mode-common-hook) 924 (run-mode-hooks 'c-mode-common-hook 'idl-mode-hook)
932 (run-hooks 'idl-mode-hook)
933 (c-update-modeline)) 925 (c-update-modeline))
934 926
935 927
@@ -991,8 +983,7 @@ Key bindings:
991 (c-common-init 'pike-mode) 983 (c-common-init 'pike-mode)
992 (easy-menu-add c-pike-menu) 984 (easy-menu-add c-pike-menu)
993 ;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO 985 ;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO
994 (run-hooks 'c-mode-common-hook) 986 (run-mode-hooks 'c-mode-common-hook 'pike-mode-hook)
995 (run-hooks 'pike-mode-hook)
996 (c-update-modeline)) 987 (c-update-modeline))
997 988
998 989
@@ -1084,8 +1075,7 @@ Key bindings:
1084 ;; in cc-engine.el, just before (defun c-fast-in-literal ... 1075 ;; in cc-engine.el, just before (defun c-fast-in-literal ...
1085 (defalias 'c-in-literal 'c-slow-in-literal) 1076 (defalias 'c-in-literal 'c-slow-in-literal)
1086 1077
1087 (run-hooks 'c-mode-common-hook) 1078 (run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
1088 (run-hooks 'awk-mode-hook)
1089 (c-update-modeline)) 1079 (c-update-modeline))
1090) ;; closes the (if (not (memq 'syntax-properties c-emacs-features)) 1080) ;; closes the (if (not (memq 'syntax-properties c-emacs-features))
1091 1081