;; 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 ()
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 ()
(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))
\f
(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))
\f
(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))
\f
(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))
\f
(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))
\f
(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))
\f
;; 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))