# HG changeset patch # User Juanma Barranquero # Date 1030656944 0 # Node ID 356bbdda5f67d9922f0f2173ee69005cb9b0b19a # Parent ce17d4a1d32e019b77be1a48232edb53a174b2c9 (occur-mode-hook): New hook. (occur-mode): Use it. (occur-hook): Set default to nil. diff -r ce17d4a1d32e -r 356bbdda5f67 lisp/replace.el --- a/lisp/replace.el Thu Aug 29 17:26:47 2002 +0000 +++ b/lisp/replace.el Thu Aug 29 21:35:44 2002 +0000 @@ -464,8 +464,13 @@ "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 @@ (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."