changeset 86291:c92242b4fd11

(occur-mode-map): Add a major mode menu with entries for all occur operations.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 22 Nov 2007 03:01:36 +0000
parents 9ddedad1a7b2
children caa8713ae325
files lisp/ChangeLog lisp/replace.el
diffstat 2 files changed, 32 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Nov 22 01:17:41 2007 +0000
+++ b/lisp/ChangeLog	Thu Nov 22 03:01:36 2007 +0000
@@ -1,5 +1,8 @@
 2007-11-22  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	* replace.el (occur-mode-map): Add a major mode menu with entries
+	for all occur operations.
+
 	* international/titdic-cnv.el (dos-8+3-filename):
 	* obsolete/fast-lock.el (msdos-long-file-names):
 	* frame.el (msdos-mouse-p):
--- a/lisp/replace.el	Thu Nov 22 01:17:41 2007 +0000
+++ b/lisp/replace.el	Thu Nov 22 03:01:36 2007 +0000
@@ -734,6 +734,35 @@
     (define-key map "q" 'quit-window)
     (define-key map "z" 'kill-this-buffer)
     (define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
+    (define-key map [menu-bar] (make-sparse-keymap))
+    (define-key map [menu-bar occur]
+      (cons "Occur" map))
+    (define-key map [next-error-follow-minor-mode]
+      (menu-bar-make-mm-toggle next-error-follow-minor-mode
+			       "Auto Occurrence Display"
+			       "Display another occurrence when moving the cursor"))
+    (define-key map [separator-1] '("--"))
+    (define-key map [kill-this-buffer] 
+      '("Kill occur buffer" . kill-this-buffer))
+    (define-key map [quit-window] 
+      '("Quit occur window" . quit-window))
+    (define-key map [revert-buffer] 
+      '("Revert occur buffer" . revert-buffer))
+    (define-key map [clone-buffer] 
+      '("Clone occur buffer" . clone-buffer))
+    (define-key map [occur-rename-buffer] 
+      '("Rename occur buffer" . occur-rename-buffer))
+    (define-key map [separator-2] '("--"))
+    (define-key map [occur-mode-goto-occurrence-other-window]
+      '("Go To Occurrence Other Window" . occur-mode-goto-occurrence-other-window))
+    (define-key map [occur-mode-goto-occurrence]
+      '("Go To Occurrence" . occur-mode-goto-occurrence))
+    (define-key map [occur-mode-display-occurrence]
+      '("Display Occurrence" . occur-mode-display-occurrence))
+    (define-key map [occur-next] 
+      '("Move to next match" . occur-next))
+    (define-key map [occur-prev] 
+      '("Move to previous match" . occur-prev))
     map)
   "Keymap for `occur-mode'.")