]> code.delx.au - gnu-emacs/commitdiff
Some cleanups for the buffer menu and electric buffer menu.
authorChong Yidong <cyd@gnu.org>
Sun, 6 May 2012 08:43:46 +0000 (16:43 +0800)
committerChong Yidong <cyd@gnu.org>
Sun, 6 May 2012 08:43:46 +0000 (16:43 +0800)
* lisp/buff-menu.el (list-buffers): Move C-x C-b binding from
buff-menu.el to bindings.el.

* lisp/ebuff-menu.el (Electric-buffer-menu-undefined): Use the
:advertised-binding feature.

lisp/ChangeLog
lisp/bindings.el
lisp/buff-menu.el
lisp/ebuff-menu.el

index b925e47880bb3fefb918b6b7185245e223835f50..929451a85edd7eada2e309a8ddb1ddf8cf91c87a 100644 (file)
        functions.
        (tabulated-list-sort-column): New command (Bug#11337).
 
+       * buff-menu.el (list-buffers): Move C-x C-b binding from
+       buff-menu.el to bindings.el.
+
+       * ebuff-menu.el (Electric-buffer-menu-undefined): Use the
+       :advertised-binding feature.
+
 2012-05-06  Troels Nielsen  <bn.troels@gmail.com>  (tiny change)
 
        * progmodes/compile.el (compilation-internal-error-properties):
index f04ee7232202e382e72bf9923d56181f2e901d2c..69d96ab68894ec3e97f23621ed5418922f7ac635 100644 (file)
@@ -40,7 +40,7 @@ corresponding to the mode line clicked."
   (interactive "e")
   (save-selected-window
     (select-window (posn-window (event-start event)))
-    (toggle-read-only)
+    (with-no-warnings (toggle-read-only))
     (force-mode-line-update)))
 
 
@@ -1190,6 +1190,7 @@ if `inhibit-field-text-motion' is non-nil."
 ;; (define-key ctl-x-map "\-" 'inverse-add-global-abbrev)
 (define-key esc-map "'" 'abbrev-prefix-mark)
 (define-key ctl-x-map "'" 'expand-abbrev)
+(define-key ctl-x-map "\C-b" 'list-buffers)
 
 (define-key ctl-x-map "z" 'repeat)
 
index e17937116073a5fdd3a60332fbd7f79f632da40f..105ee50958e26f97d8b308e256e107791b3a1c55 100644 (file)
@@ -640,9 +640,6 @@ The current window remains selected."
   (view-buffer-other-window (Buffer-menu-buffer t)))
 \f
 
-;;;###autoload
-(define-key ctl-x-map "\C-b" 'list-buffers)
-
 ;;;###autoload
 (defun list-buffers (&optional files-only)
   "Display a list of names of existing buffers.
index dcde6449d2283b04c4c51bf744449599fa346f72..50a75c1aa57799f117bfb7cc9d034851b3c0ba1e 100644 (file)
     (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
     map))
 
+(put 'Electric-buffer-menu-quit :advertised-binding "\C-c\C-c")
+(put 'Electric-buffer-menu-select :advertised-binding " ")
+(put 'Helper-help :advertised-binding (char-to-string help-char))
+(put 'Helper-describe-bindings :advertised-binding "?")
+
 (defvar electric-buffer-menu-mode-hook nil
   "Normal hook run by `electric-buffer-list'.")
 
@@ -251,15 +256,10 @@ Skip execution of select, save, and delete commands."
   (interactive)
   (ding)
   (message "%s"
-          (if (and (eq (key-binding "\C-c\C-c") 'Electric-buffer-menu-quit)
-                   (eq (key-binding " ") 'Electric-buffer-menu-select)
-                   (eq (key-binding (char-to-string help-char)) 'Helper-help)
-                   (eq (key-binding "?") 'Helper-describe-bindings))
-              (substitute-command-keys "Type C-c C-c to exit, Space to select, \\[Helper-help] for help, ? for commands")
-            (substitute-command-keys "\
+          (substitute-command-keys "\
 Type \\[Electric-buffer-menu-quit] to exit, \
 \\[Electric-buffer-menu-select] to select, \
-\\[Helper-help] for help, \\[Helper-describe-bindings] for commands.")))
+\\[Helper-help] for help, \\[Helper-describe-bindings] for commands."))
   (sit-for 4))
 
 (defun Electric-buffer-menu-mode-view-buffer ()