From: Dan Nicolaescu Date: Thu, 15 Jan 2009 15:12:32 +0000 (+0000) Subject: (Buffer-menu-mode): Derive from special-mode. X-Git-Tag: emacs-pretest-23.0.90~436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa9d0f3824ca79b4e9fc529af664d379f979f940;p=emacs.git (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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 512d2de278e..081844833a0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2009-01-15 Dan Nicolaescu + + * 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 * emacs-lisp/lisp-mode.el (lisp-mode-variables): Doc fix. diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 0cb23920526..f9975098b5a 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -120,7 +120,6 @@ Auto Revert Mode.") (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 @@ Auto Revert Mode.") (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 @@ Auto Revert Mode.") ;; 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 @@ Letters do not insert themselves; instead, they are commands. 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 @@ Letters do not insert themselves; instead, they are commands. (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))