diff options
| -rw-r--r-- | lisp/bindings.el | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el index caaddc67e86..0769b3ad081 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -330,6 +330,21 @@ Keymap to display on minor modes.") | |||
| 330 | (defvar mode-line-buffer-identification-keymap nil "\ | 330 | (defvar mode-line-buffer-identification-keymap nil "\ |
| 331 | Keymap for what is displayed by `mode-line-buffer-identification'.") | 331 | Keymap for what is displayed by `mode-line-buffer-identification'.") |
| 332 | 332 | ||
| 333 | ;; Add menu of buffer operations to the buffer identification part | ||
| 334 | ;; of the mode line.or header line. | ||
| 335 | ; | ||
| 336 | (let ((map (make-sparse-keymap))) | ||
| 337 | ;; Bind down- events so that the global keymap won't ``shine | ||
| 338 | ;; through''. | ||
| 339 | (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) | ||
| 340 | (define-key map [header-line down-mouse-1] 'ignore) | ||
| 341 | (define-key map [header-line mouse-1] 'mode-line-previous-buffer) | ||
| 342 | (define-key map [header-line down-mouse-3] 'ignore) | ||
| 343 | (define-key map [mode-line mouse-3] 'mode-line-next-buffer) | ||
| 344 | (define-key map [header-line down-mouse-3] 'ignore) | ||
| 345 | (define-key map [header-line mouse-3] 'mode-line-next-buffer) | ||
| 346 | (setq mode-line-buffer-identification-keymap map)) | ||
| 347 | |||
| 333 | (defun propertized-buffer-identification (fmt) | 348 | (defun propertized-buffer-identification (fmt) |
| 334 | "Return a list suitable for `mode-line-buffer-identification'. | 349 | "Return a list suitable for `mode-line-buffer-identification'. |
| 335 | FMT is a format specifier such as \"%12b\". This function adds | 350 | FMT is a format specifier such as \"%12b\". This function adds |
| @@ -454,21 +469,6 @@ Menu of mode operations in the mode line.") | |||
| 454 | (let ((indicator (car (nth 4 (car (cdr event)))))) | 469 | (let ((indicator (car (nth 4 (car (cdr event)))))) |
| 455 | (describe-minor-mode-from-indicator indicator))) | 470 | (describe-minor-mode-from-indicator indicator))) |
| 456 | 471 | ||
| 457 | ;; Add menu of buffer operations to the buffer identification part | ||
| 458 | ;; of the mode line.or header line. | ||
| 459 | ; | ||
| 460 | (let ((map (make-sparse-keymap))) | ||
| 461 | ;; Bind down- events so that the global keymap won't ``shine | ||
| 462 | ;; through''. | ||
| 463 | (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) | ||
| 464 | (define-key map [header-line down-mouse-1] 'ignore) | ||
| 465 | (define-key map [header-line mouse-1] 'mode-line-previous-buffer) | ||
| 466 | (define-key map [header-line down-mouse-3] 'ignore) | ||
| 467 | (define-key map [mode-line mouse-3] 'mode-line-next-buffer) | ||
| 468 | (define-key map [header-line down-mouse-3] 'ignore) | ||
| 469 | (define-key map [header-line mouse-3] 'mode-line-next-buffer) | ||
| 470 | (setq mode-line-buffer-identification-keymap map)) | ||
| 471 | |||
| 472 | (defvar minor-mode-alist nil "\ | 472 | (defvar minor-mode-alist nil "\ |
| 473 | Alist saying how to show minor modes in the mode line. | 473 | Alist saying how to show minor modes in the mode line. |
| 474 | Each element looks like (VARIABLE STRING); | 474 | Each element looks like (VARIABLE STRING); |