Commit 4ac44b4c authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(mode-line-unbury-buffer): Use aref instead of sref.

(make-mode-line-mouse-sensitive): Replace `top-line' by
`header-line'.
parent fbd1209a
......@@ -146,7 +146,7 @@ Keymap for mode operations menu in the mode line.")
Switch to the last buffer in the buffer list that is not hidden."
(interactive)
(let ((list (reverse (buffer-list))))
(while (eq (sref (buffer-name (car list)) 0) ? )
(while (eq (aref (buffer-name (car list)) 0) ? )
(setq list (cdr list)))
(switch-to-buffer (car list))))
......@@ -223,13 +223,13 @@ Non-nil means mode line has been made mouse-sensitive.")
(let ((map (make-sparse-keymap))
(s (copy-sequence "%12b")))
(define-key map [mode-line mouse-1] 'mode-line-other-buffer)
(define-key map [top-line mouse-1] 'mode-line-other-buffer)
(define-key map [header-line mouse-1] 'mode-line-other-buffer)
(define-key map [mode-line M-mouse-2] 'mode-line-unbury-buffer)
(define-key map [top-line M-mouse-2] 'mode-line-unbury-buffer)
(define-key map [header-line M-mouse-2] 'mode-line-unbury-buffer)
(define-key map [mode-line mouse-2] 'bury-buffer)
(define-key map [top-line mouse-2] 'bury-buffer)
(define-key map [header-line mouse-2] 'bury-buffer)
(define-key map [mode-line down-mouse-3] 'mouse-buffer-menu)
(define-key map [top-line down-mouse-3] 'mouse-buffer-menu)
(define-key map [header-line down-mouse-3] 'mouse-buffer-menu)
(setq mode-line-buffer-identification-keymap map)
(setq-default mode-line-buffer-identification (list s))
(put-text-property 0 (length s) 'face '(:weight bold) s)
......@@ -240,7 +240,7 @@ Non-nil means mode line has been made mouse-sensitive.")
;; Menu of minor modes.
(let ((map (make-sparse-keymap)))
(define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1)
(define-key map [top-line down-mouse-3] 'mode-line-mode-menu-1)
(define-key map [header-line down-mouse-3] 'mode-line-mode-menu-1)
(setq mode-line-minor-mode-keymap map))
(force-mode-line-update)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment