aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/bindings.el
diff options
context:
space:
mode:
authorStefan Monnier2006-09-11 07:11:21 +0000
committerStefan Monnier2006-09-11 07:11:21 +0000
commita8b7149d7e0b03f9fca1898592f2dd6185ccfbcd (patch)
treed4944f8cd4527442d0c1ad8de73f7971f886ce9a /lisp/bindings.el
parent3250aca208b13f138747c48b7549b41dfe91f4f6 (diff)
downloademacs-a8b7149d7e0b03f9fca1898592f2dd6185ccfbcd.tar.gz
emacs-a8b7149d7e0b03f9fca1898592f2dd6185ccfbcd.zip
(mode-line-buffer-identification-keymap):
Move initialization into declaration.
Diffstat (limited to 'lisp/bindings.el')
-rw-r--r--lisp/bindings.el30
1 files changed, 14 insertions, 16 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 65ff8b0f916..4100a4d0df4 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -337,24 +337,22 @@ Keymap to display on minor modes.")
337 (put 'mode-line-position 'standard-value 337 (put 'mode-line-position 'standard-value
338 (list `(quote ,standard-mode-line-position)))) 338 (list `(quote ,standard-mode-line-position))))
339 339
340(defvar mode-line-buffer-identification-keymap nil "\ 340(defvar mode-line-buffer-identification-keymap
341 ;; Add menu of buffer operations to the buffer identification part
342 ;; of the mode line.or header line.
343 (let ((map (make-sparse-keymap)))
344 ;; Bind down- events so that the global keymap won't ``shine
345 ;; through''.
346 (define-key map [mode-line mouse-1] 'mode-line-previous-buffer)
347 (define-key map [header-line down-mouse-1] 'ignore)
348 (define-key map [header-line mouse-1] 'mode-line-previous-buffer)
349 (define-key map [header-line down-mouse-3] 'ignore)
350 (define-key map [mode-line mouse-3] 'mode-line-next-buffer)
351 (define-key map [header-line down-mouse-3] 'ignore)
352 (define-key map [header-line mouse-3] 'mode-line-next-buffer)
353 map) "\
341Keymap for what is displayed by `mode-line-buffer-identification'.") 354Keymap for what is displayed by `mode-line-buffer-identification'.")
342 355
343;; Add menu of buffer operations to the buffer identification part
344;; of the mode line.or header line.
345;
346(let ((map (make-sparse-keymap)))
347 ;; Bind down- events so that the global keymap won't ``shine
348 ;; through''.
349 (define-key map [mode-line mouse-1] 'mode-line-previous-buffer)
350 (define-key map [header-line down-mouse-1] 'ignore)
351 (define-key map [header-line mouse-1] 'mode-line-previous-buffer)
352 (define-key map [header-line down-mouse-3] 'ignore)
353 (define-key map [mode-line mouse-3] 'mode-line-next-buffer)
354 (define-key map [header-line down-mouse-3] 'ignore)
355 (define-key map [header-line mouse-3] 'mode-line-next-buffer)
356 (setq mode-line-buffer-identification-keymap map))
357
358(defun propertized-buffer-identification (fmt) 356(defun propertized-buffer-identification (fmt)
359 "Return a list suitable for `mode-line-buffer-identification'. 357 "Return a list suitable for `mode-line-buffer-identification'.
360FMT is a format specifier such as \"%12b\". This function adds 358FMT is a format specifier such as \"%12b\". This function adds