]> git.eshelyaron.com Git - emacs.git/commitdiff
(occur-mode): Undo 2001-5-20 change.
authorRichard M. Stallman <rms@gnu.org>
Tue, 20 Nov 2001 23:28:57 +0000 (23:28 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 20 Nov 2001 23:28:57 +0000 (23:28 +0000)
lisp/ChangeLog
lisp/replace.el

index ec70de201ed72cea425d85b37c1f095e3b0c95e3..f41664569b4ccdb9da14ec372ce181775b9e9182 100644 (file)
@@ -1,10 +1,12 @@
+2001-11-20  Richard M. Stallman  <rms@gnu.org>
+
+       * replace.el (occur-mode): Undo 2001-5-20 change.
+
 2001-11-20  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * play/landmark.el: Mark lm-mode as special.  Suggested by Klaus
-       Straubinger <ksnetz@arcor.de>.
+       * play/landmark.el: Mark lm-mode as special.
 
-       * play/gomoku.el: Mark gomoku-mode as special.  Suggested by Klaus
-       Straubinger <ksnetz@arcor.de>.
+       * play/gomoku.el: Mark gomoku-mode as special.
 
 2001-11-20  Juanma Barranquero  <lektu@terra.es>
 
index 1082caadc7bc55989b5d0b65f90242931245506b..ee0c2ba7a85a3625aaa7aeb0ed0ca28eaeac7f2f 100644 (file)
@@ -445,17 +445,24 @@ end of the buffer."
 
 (put 'occur-mode 'mode-class 'special)
 
-(define-derived-mode occur-mode nil "Occur"
+(defun occur-mode ()
   "Major mode for output from \\[occur].
 \\<occur-mode-map>Move point to one of the items in this buffer, then use
 \\[occur-mode-goto-occurrence] to go to the occurrence that the item refers to.
 Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
 
 \\{occur-mode-map}"
+  (kill-all-local-variables)
+  (use-local-map occur-mode-map)
+  (setq major-mode 'occur-mode)
+  (setq mode-name "Occur")
+  (make-local-variable 'revert-buffer-function)
+  (setq revert-buffer-function 'occur-revert-function)
   (set (make-local-variable 'revert-buffer-function) 'occur-revert-function)
   (make-local-variable 'occur-buffer)
   (make-local-variable 'occur-nlines)
-  (make-local-variable 'occur-command-arguments))
+  (make-local-variable 'occur-command-arguments)
+  (run-hooks 'occur-mode-hook))
 
 (defun occur-revert-function (ignore1 ignore2)
   "Handle `revert-buffer' for *Occur* buffers."