aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/bindings.el
diff options
context:
space:
mode:
authorNick Roberts2006-08-02 09:49:08 +0000
committerNick Roberts2006-08-02 09:49:08 +0000
commit0bbb2a3a8dc0d4c0c8d665a585960f2ca0748b6b (patch)
treeed75507f53f4d3687b9f8cf7216ff94667dfed36 /lisp/bindings.el
parent042802316246aecab6d3f11d17b9f0e01da9a6c7 (diff)
downloademacs-0bbb2a3a8dc0d4c0c8d665a585960f2ca0748b6b.tar.gz
emacs-0bbb2a3a8dc0d4c0c8d665a585960f2ca0748b6b.zip
(map): Make mode-line-buffer-identification-keymap
before defining propertized-buffer-identification.
Diffstat (limited to 'lisp/bindings.el')
-rw-r--r--lisp/bindings.el30
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 "\
331Keymap for what is displayed by `mode-line-buffer-identification'.") 331Keymap 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'.
335FMT is a format specifier such as \"%12b\". This function adds 350FMT 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 "\
473Alist saying how to show minor modes in the mode line. 473Alist saying how to show minor modes in the mode line.
474Each element looks like (VARIABLE STRING); 474Each element looks like (VARIABLE STRING);