From c9ae8cbb2119d512853e977427275009cb8a11ba Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 29 Aug 2002 21:40:28 +0000 Subject: [PATCH] (occur-mode-hook): New hook. (occur-mode): Use it. (occur-hook): Set default to nil. --- lisp/ChangeLog | 6 ++++++ lisp/replace.el | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4babcec6a42..377d317760c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-08-29 Juanma Barranquero + + * replace.el (occur-mode-hook): New hook. + (occur-mode): Use it. + (occur-hook): Set default to nil. + 2002-08-29 Richard M. Stallman * emacs-lisp/bytecomp.el (byte-compile-log-file): Use \f. diff --git a/lisp/replace.el b/lisp/replace.el index 7cfe1947f50..bd686e81f40 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -464,8 +464,13 @@ end of the buffer." "Arguments to pass to `occur-1' to revert an Occur mode buffer. See `occur-revert-function'.") -(defcustom occur-hook '(turn-on-font-lock) - "Hooks run when `occur' is called." +(defcustom occur-mode-hook '(turn-on-font-lock) + "Hook run when entering Occur mode." + :type 'hook + :group 'matching) + +(defcustom occur-hook nil + "Hook run when `occur' is called." :type 'hook :group 'matching) @@ -482,7 +487,8 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. (setq major-mode 'occur-mode) (setq mode-name "Occur") (set (make-local-variable 'revert-buffer-function) 'occur-revert-function) - (make-local-variable 'occur-revert-arguments)) + (make-local-variable 'occur-revert-arguments) + (run-hooks 'occur-mode-hook)) (defun occur-revert-function (ignore1 ignore2) "Handle `revert-buffer' for Occur mode buffers." -- 2.39.2