changeset 101208:fe8f14e36526

(Buffer-menu-mode): Derive from special-mode. Refer to revert-buffer, not Buffer-menu-revert. (Buffer-menu-revert): Remove function, unused. (Buffer-menu-mode-map): Don't bind keys already bound by special-mode.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 15 Jan 2009 15:12:32 +0000
parents 0dbba2a00904
children 8abf39c667b5
files lisp/ChangeLog lisp/buff-menu.el
diffstat 2 files changed, 10 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jan 15 15:03:15 2009 +0000
+++ b/lisp/ChangeLog	Thu Jan 15 15:12:32 2009 +0000
@@ -1,3 +1,11 @@
+2009-01-15  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* buff-menu.el (Buffer-menu-mode): Derive from special-mode.
+	Refer to revert-buffer, not Buffer-menu-revert.
+	(Buffer-menu-revert): Remove function, unused.
+	(Buffer-menu-mode-map): Don't bind keys already
+	bound by special-mode.
+
 2009-01-15  Stephen Eglen  <stephen@gnu.org>
 
 	* emacs-lisp/lisp-mode.el (lisp-mode-variables): Doc fix.
--- a/lisp/buff-menu.el	Thu Jan 15 15:03:15 2009 +0000
+++ b/lisp/buff-menu.el	Thu Jan 15 15:12:32 2009 +0000
@@ -120,7 +120,6 @@
 (defvar Buffer-menu-mode-map
   (let ((map (make-keymap)))
     (suppress-keymap map t)
-    (define-key map "q" 'quit-window)
     (define-key map "v" 'Buffer-menu-select)
     (define-key map "2" 'Buffer-menu-2-window)
     (define-key map "1" 'Buffer-menu-1-window)
@@ -140,13 +139,11 @@
     (define-key map "p" 'previous-line)
     (define-key map "\177" 'Buffer-menu-backup-unmark)
     (define-key map "~" 'Buffer-menu-not-modified)
-    (define-key map "?" 'describe-mode)
     (define-key map "u" 'Buffer-menu-unmark)
     (define-key map "m" 'Buffer-menu-mark)
     (define-key map "t" 'Buffer-menu-visit-tags-table)
     (define-key map "%" 'Buffer-menu-toggle-read-only)
     (define-key map "b" 'Buffer-menu-bury)
-    (define-key map "g" 'Buffer-menu-revert)
     (define-key map "V" 'Buffer-menu-view)
     (define-key map "T" 'Buffer-menu-toggle-files-only)
     (define-key map [mouse-2] 'Buffer-menu-mouse-select)
@@ -159,7 +156,7 @@
 ;; Buffer Menu mode is suitable only for specially formatted data.
 (put 'Buffer-menu-mode 'mode-class 'special)
 
-(define-derived-mode Buffer-menu-mode nil "Buffer Menu"
+(define-derived-mode Buffer-menu-mode special-mode "Buffer Menu"
   "Major mode for editing a list of buffers.
 Each line describes one of the buffers in Emacs.
 Letters do not insert themselves; instead, they are commands.
@@ -190,7 +187,7 @@
   With prefix argument, also move up one line.
 \\[Buffer-menu-backup-unmark] -- back up a line and remove marks.
 \\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line.
-\\[Buffer-menu-revert] -- update the list of buffers.
+\\[revert-buffer] -- update the list of buffers.
 \\[Buffer-menu-toggle-files-only] -- toggle whether the menu displays only file buffers.
 \\[Buffer-menu-bury] -- bury the buffer listed on this line."
   (set (make-local-variable 'revert-buffer-function)
@@ -203,13 +200,6 @@
 (define-obsolete-variable-alias 'buffer-menu-mode-hook
   'Buffer-menu-mode-hook "23.1")
 
-;; This function exists so we can make the doc string of Buffer-menu-mode
-;; look nice.
-(defun Buffer-menu-revert ()
-  "Update the list of buffers."
-  (interactive)
-  (revert-buffer))
-
 (defun Buffer-menu-revert-function (ignore1 ignore2)
   (or (eq buffer-undo-list t)
       (setq buffer-undo-list nil))