changeset 47087:756de7be303c

(occur-hook): Renamed from `occur-mode-hook'. (occur-mode): Remove call to `occur-mode-hook'. (occur-rename-buffer): Fix reference to `occur-mode-hook' in docstring. (occur-1): Add call to `occur-hook'.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 28 Aug 2002 15:20:50 +0000
parents 527c24dbb2b1
children d4f9e484db41
files lisp/replace.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Wed Aug 28 15:12:00 2002 +0000
+++ b/lisp/replace.el	Wed Aug 28 15:20:50 2002 +0000
@@ -464,7 +464,7 @@
   "Arguments to pass to `occur-1' to revert an Occur mode buffer.
 See `occur-revert-function'.")
 
-(defcustom occur-mode-hook '(turn-on-font-lock)
+(defcustom occur-hook '(turn-on-font-lock)
   "Hooks run when `occur' is called."
   :type 'hook
   :group 'matching)
@@ -482,8 +482,7 @@
   (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)
-  (run-hooks 'occur-mode-hook))
+  (make-local-variable 'occur-revert-arguments))
 
 (defun occur-revert-function (ignore1 ignore2)
   "Handle `revert-buffer' for Occur mode buffers."
@@ -631,7 +630,7 @@
 Here `original-buffer-name' is the buffer name were occur was originally run.
 When given the prefix argument, the renaming will not clobber the existing
 buffer(s) of that name, but use `generate-new-buffer-name' instead.
-You can add this to `occur-mode-hook' if you always want a separate *Occur*
+You can add this to `occur-hook' if you always want a separate *Occur*
 buffer for each buffer where you invoke `occur'."
   (interactive "P")
   (with-current-buffer
@@ -749,7 +748,8 @@
 	      buffer-read-only t)
 	(if (> count 0)
 	    (display-buffer occur-buf)
-	  (kill-buffer occur-buf))))))
+	  (kill-buffer occur-buf)))
+      (run-hooks 'occur-hook))))
 
 (defun occur-engine-add-prefix (lines)
   (mapcar