diff options
| author | Chong Yidong | 2012-05-06 16:43:46 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-05-06 16:43:46 +0800 |
| commit | 3cc99f68ad114947ab5597a4255f5cca25a71d78 (patch) | |
| tree | a817d7b7440a8e95a39c93e5b9e3e39990ebce82 | |
| parent | 6632d361114f2d104b689e2213dce1eb3474de0a (diff) | |
| download | emacs-3cc99f68ad114947ab5597a4255f5cca25a71d78.tar.gz emacs-3cc99f68ad114947ab5597a4255f5cca25a71d78.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/bindings.el | 3 | ||||
| -rw-r--r-- | lisp/buff-menu.el | 3 | ||||
| -rw-r--r-- | lisp/ebuff-menu.el | 14 |
4 files changed, 15 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b925e47880b..929451a85ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -15,6 +15,12 @@ | |||
| 15 | functions. | 15 | functions. |
| 16 | (tabulated-list-sort-column): New command (Bug#11337). | 16 | (tabulated-list-sort-column): New command (Bug#11337). |
| 17 | 17 | ||
| 18 | * buff-menu.el (list-buffers): Move C-x C-b binding from | ||
| 19 | buff-menu.el to bindings.el. | ||
| 20 | |||
| 21 | * ebuff-menu.el (Electric-buffer-menu-undefined): Use the | ||
| 22 | :advertised-binding feature. | ||
| 23 | |||
| 18 | 2012-05-06 Troels Nielsen <bn.troels@gmail.com> (tiny change) | 24 | 2012-05-06 Troels Nielsen <bn.troels@gmail.com> (tiny change) |
| 19 | 25 | ||
| 20 | * progmodes/compile.el (compilation-internal-error-properties): | 26 | * progmodes/compile.el (compilation-internal-error-properties): |
diff --git a/lisp/bindings.el b/lisp/bindings.el index f04ee723220..69d96ab6889 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -40,7 +40,7 @@ corresponding to the mode line clicked." | |||
| 40 | (interactive "e") | 40 | (interactive "e") |
| 41 | (save-selected-window | 41 | (save-selected-window |
| 42 | (select-window (posn-window (event-start event))) | 42 | (select-window (posn-window (event-start event))) |
| 43 | (toggle-read-only) | 43 | (with-no-warnings (toggle-read-only)) |
| 44 | (force-mode-line-update))) | 44 | (force-mode-line-update))) |
| 45 | 45 | ||
| 46 | 46 | ||
| @@ -1190,6 +1190,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 1190 | ;; (define-key ctl-x-map "\-" 'inverse-add-global-abbrev) | 1190 | ;; (define-key ctl-x-map "\-" 'inverse-add-global-abbrev) |
| 1191 | (define-key esc-map "'" 'abbrev-prefix-mark) | 1191 | (define-key esc-map "'" 'abbrev-prefix-mark) |
| 1192 | (define-key ctl-x-map "'" 'expand-abbrev) | 1192 | (define-key ctl-x-map "'" 'expand-abbrev) |
| 1193 | (define-key ctl-x-map "\C-b" 'list-buffers) | ||
| 1193 | 1194 | ||
| 1194 | (define-key ctl-x-map "z" 'repeat) | 1195 | (define-key ctl-x-map "z" 'repeat) |
| 1195 | 1196 | ||
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index e1793711607..105ee50958e 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -641,9 +641,6 @@ The current window remains selected." | |||
| 641 | 641 | ||
| 642 | 642 | ||
| 643 | ;;;###autoload | 643 | ;;;###autoload |
| 644 | (define-key ctl-x-map "\C-b" 'list-buffers) | ||
| 645 | |||
| 646 | ;;;###autoload | ||
| 647 | (defun list-buffers (&optional files-only) | 644 | (defun list-buffers (&optional files-only) |
| 648 | "Display a list of names of existing buffers. | 645 | "Display a list of names of existing buffers. |
| 649 | The list is displayed in a buffer named `*Buffer List*'. | 646 | The list is displayed in a buffer named `*Buffer List*'. |
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index dcde6449d22..50a75c1aa57 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el | |||
| @@ -85,6 +85,11 @@ | |||
| 85 | (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select) | 85 | (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select) |
| 86 | map)) | 86 | map)) |
| 87 | 87 | ||
| 88 | (put 'Electric-buffer-menu-quit :advertised-binding "\C-c\C-c") | ||
| 89 | (put 'Electric-buffer-menu-select :advertised-binding " ") | ||
| 90 | (put 'Helper-help :advertised-binding (char-to-string help-char)) | ||
| 91 | (put 'Helper-describe-bindings :advertised-binding "?") | ||
| 92 | |||
| 88 | (defvar electric-buffer-menu-mode-hook nil | 93 | (defvar electric-buffer-menu-mode-hook nil |
| 89 | "Normal hook run by `electric-buffer-list'.") | 94 | "Normal hook run by `electric-buffer-list'.") |
| 90 | 95 | ||
| @@ -251,15 +256,10 @@ Skip execution of select, save, and delete commands." | |||
| 251 | (interactive) | 256 | (interactive) |
| 252 | (ding) | 257 | (ding) |
| 253 | (message "%s" | 258 | (message "%s" |
| 254 | (if (and (eq (key-binding "\C-c\C-c") 'Electric-buffer-menu-quit) | 259 | (substitute-command-keys "\ |
| 255 | (eq (key-binding " ") 'Electric-buffer-menu-select) | ||
| 256 | (eq (key-binding (char-to-string help-char)) 'Helper-help) | ||
| 257 | (eq (key-binding "?") 'Helper-describe-bindings)) | ||
| 258 | (substitute-command-keys "Type C-c C-c to exit, Space to select, \\[Helper-help] for help, ? for commands") | ||
| 259 | (substitute-command-keys "\ | ||
| 260 | Type \\[Electric-buffer-menu-quit] to exit, \ | 260 | Type \\[Electric-buffer-menu-quit] to exit, \ |
| 261 | \\[Electric-buffer-menu-select] to select, \ | 261 | \\[Electric-buffer-menu-select] to select, \ |
| 262 | \\[Helper-help] for help, \\[Helper-describe-bindings] for commands."))) | 262 | \\[Helper-help] for help, \\[Helper-describe-bindings] for commands.")) |
| 263 | (sit-for 4)) | 263 | (sit-for 4)) |
| 264 | 264 | ||
| 265 | (defun Electric-buffer-menu-mode-view-buffer () | 265 | (defun Electric-buffer-menu-mode-view-buffer () |