summaryrefslogtreecommitdiff
path: root/lisp/bindings.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-01-17 16:28:02 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-01-17 16:28:02 +0000
commitf6271f1b584e5e3dcc9e29650575b802ae879b06 (patch)
tree7e6071cdffd5cd18a2e88420c77b9839d86d5ce3 /lisp/bindings.el
parentc3a63088aa9f1cb2d47e9805889b8c0ec16f852a (diff)
parent2e040f4ea19f3f81cb3d19afa6d5429e29206fab (diff)
downloademacs-f6271f1b584e5e3dcc9e29650575b802ae879b06.tar.gz
Merged from miles@gnu.org--gnu-2005 (patch 185-186, 700-703)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-700 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-701 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-703 Update from CVS: lisp/cus-edit.el (customize-rogue): Minor doc fix. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-185 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-186 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-497
Diffstat (limited to 'lisp/bindings.el')
-rw-r--r--lisp/bindings.el24
1 files changed, 19 insertions, 5 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index a978300fee7..7819916130b 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -371,6 +371,20 @@ Switch to the most recently selected buffer other than the current one."
(interactive)
(switch-to-buffer (other-buffer)))
+(defun mode-line-next-buffer (event)
+ "Like `next-buffer', but temporarily select EVENT's window."
+ (interactive "e")
+ (save-selected-window
+ (select-window (posn-window (event-start event)))
+ (next-buffer)))
+
+(defun mode-line-previous-buffer (event)
+ "Like `previous-buffer', but temporarily select EVENT's window."
+ (interactive "e")
+ (save-selected-window
+ (select-window (posn-window (event-start event)))
+ (previous-buffer)))
+
(defvar mode-line-mode-menu (make-sparse-keymap "Minor Modes") "\
Menu of mode operations in the mode line.")
@@ -444,13 +458,13 @@ Menu of mode operations in the mode line.")
(let ((map (make-sparse-keymap)))
;; Bind down- events so that the global keymap won't ``shine
;; through''.
- (define-key map [mode-line mouse-1] 'mode-line-unbury-buffer)
+ (define-key map [mode-line mouse-1] 'mode-line-previous-buffer)
(define-key map [header-line down-mouse-1] 'ignore)
- (define-key map [header-line mouse-1] 'mode-line-unbury-buffer)
+ (define-key map [header-line mouse-1] 'mode-line-previous-buffer)
(define-key map [header-line down-mouse-3] 'ignore)
- (define-key map [mode-line mouse-3] 'mode-line-bury-buffer)
+ (define-key map [mode-line mouse-3] 'mode-line-next-buffer)
(define-key map [header-line down-mouse-3] 'ignore)
- (define-key map [header-line mouse-3] 'mode-line-bury-buffer)
+ (define-key map [header-line mouse-3] 'mode-line-next-buffer)
(setq mode-line-buffer-identification-keymap map))
(defun propertized-buffer-identification (fmt)
@@ -458,7 +472,7 @@ Menu of mode operations in the mode line.")
FMT is a format specifier such as \"%12b\". This function adds
text properties for face, help-echo, and local-map to it."
(list (propertize fmt
- 'face 'Buffer-menu-buffer
+ 'face 'mode-line-buffer-id
'help-echo
(purecopy "mouse-1: previous buffer, mouse-3: next buffer")
'mouse-face 'mode-line-highlight