aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/bindings.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index c24911f3d3e..976996c6f7c 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -282,13 +282,20 @@ Return a string to display in the mode line for the current mode name."
282 (define-key map [header-line mouse-2] 'bury-buffer) 282 (define-key map [header-line mouse-2] 'bury-buffer)
283 (define-key map [mode-line down-mouse-3] 'mouse-buffer-menu) 283 (define-key map [mode-line down-mouse-3] 'mouse-buffer-menu)
284 (define-key map [header-line down-mouse-3] 'mouse-buffer-menu) 284 (define-key map [header-line down-mouse-3] 'mouse-buffer-menu)
285 (setq mode-line-buffer-identification-keymap map) 285 (setq mode-line-buffer-identification-keymap map))
286 (setq-default mode-line-buffer-identification 286
287 (list (propertize "%12b" 287(defun propertized-buffer-identification (fmt)
288 'face '(:weight bold) 288 "Return a list suitable for `mode-line-buffer-identification'.
289 'help-echo (purecopy "mouse-1: other \ 289FMT is a format specifier such as \"%12b\". This function adds
290text properties for face, help-echo, and local-map to it."
291 (list (propertize fmt
292 'face '(:weight bold)
293 'help-echo (purecopy "mouse-1: other \
290buffer, mouse-2: prev, M-mouse-2: next, mouse-3: buffer menu") 294buffer, mouse-2: prev, M-mouse-2: next, mouse-3: buffer menu")
291 'local-map map)))) 295 'local-map mode-line-buffer-identification-keymap)))
296
297(setq-default mode-line-buffer-identification
298 (propertized-buffer-identification "%12b"))
292 299
293;; Menu of minor modes. 300;; Menu of minor modes.
294(let ((map (make-sparse-keymap))) 301(let ((map (make-sparse-keymap)))