emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108140: Some cleanups for the buffer


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108140: Some cleanups for the buffer menu and electric buffer menu.
Date: Sun, 06 May 2012 16:43:46 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 108140
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2012-05-06 16:43:46 +0800
message:
  Some cleanups for the buffer menu and electric buffer menu.
  
  * 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.
modified:
  lisp/ChangeLog
  lisp/bindings.el
  lisp/buff-menu.el
  lisp/ebuff-menu.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-05-06 08:32:37 +0000
+++ b/lisp/ChangeLog    2012-05-06 08:43:46 +0000
@@ -15,6 +15,12 @@
        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  <address@hidden>  (tiny change)
 
        * progmodes/compile.el (compilation-internal-error-properties):

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2012-05-04 23:16:47 +0000
+++ b/lisp/bindings.el  2012-05-06 08:43:46 +0000
@@ -40,7 +40,7 @@
   (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 @@
 ;; (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)
 

=== modified file 'lisp/buff-menu.el'
--- a/lisp/buff-menu.el 2012-01-19 07:21:25 +0000
+++ b/lisp/buff-menu.el 2012-05-06 08:43:46 +0000
@@ -641,9 +641,6 @@
 
 
 ;;;###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.
 The list is displayed in a buffer named `*Buffer List*'.

=== modified file 'lisp/ebuff-menu.el'
--- a/lisp/ebuff-menu.el        2012-01-19 07:21:25 +0000
+++ b/lisp/ebuff-menu.el        2012-05-06 08:43:46 +0000
@@ -85,6 +85,11 @@
     (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 @@
   (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 ()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]