comparison lisp/bindings.el @ 83457:432dae1fa952

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
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 17 Jan 2006 16:28:02 +0000
parents 944e6b68a0de d300de715fe6
children b98066f4aa10
comparison
equal deleted inserted replaced
83456:de425e4eb0bc 83457:432dae1fa952
368 368
369 (defun mode-line-other-buffer () "\ 369 (defun mode-line-other-buffer () "\
370 Switch to the most recently selected buffer other than the current one." 370 Switch to the most recently selected buffer other than the current one."
371 (interactive) 371 (interactive)
372 (switch-to-buffer (other-buffer))) 372 (switch-to-buffer (other-buffer)))
373
374 (defun mode-line-next-buffer (event)
375 "Like `next-buffer', but temporarily select EVENT's window."
376 (interactive "e")
377 (save-selected-window
378 (select-window (posn-window (event-start event)))
379 (next-buffer)))
380
381 (defun mode-line-previous-buffer (event)
382 "Like `previous-buffer', but temporarily select EVENT's window."
383 (interactive "e")
384 (save-selected-window
385 (select-window (posn-window (event-start event)))
386 (previous-buffer)))
373 387
374 (defvar mode-line-mode-menu (make-sparse-keymap "Minor Modes") "\ 388 (defvar mode-line-mode-menu (make-sparse-keymap "Minor Modes") "\
375 Menu of mode operations in the mode line.") 389 Menu of mode operations in the mode line.")
376 390
377 (defun mode-line-mode-menu-1 (event) 391 (defun mode-line-mode-menu-1 (event)
442 ;; of the mode line.or header line. 456 ;; of the mode line.or header line.
443 ; 457 ;
444 (let ((map (make-sparse-keymap))) 458 (let ((map (make-sparse-keymap)))
445 ;; Bind down- events so that the global keymap won't ``shine 459 ;; Bind down- events so that the global keymap won't ``shine
446 ;; through''. 460 ;; through''.
447 (define-key map [mode-line mouse-1] 'mode-line-unbury-buffer) 461 (define-key map [mode-line mouse-1] 'mode-line-previous-buffer)
448 (define-key map [header-line down-mouse-1] 'ignore) 462 (define-key map [header-line down-mouse-1] 'ignore)
449 (define-key map [header-line mouse-1] 'mode-line-unbury-buffer) 463 (define-key map [header-line mouse-1] 'mode-line-previous-buffer)
450 (define-key map [header-line down-mouse-3] 'ignore) 464 (define-key map [header-line down-mouse-3] 'ignore)
451 (define-key map [mode-line mouse-3] 'mode-line-bury-buffer) 465 (define-key map [mode-line mouse-3] 'mode-line-next-buffer)
452 (define-key map [header-line down-mouse-3] 'ignore) 466 (define-key map [header-line down-mouse-3] 'ignore)
453 (define-key map [header-line mouse-3] 'mode-line-bury-buffer) 467 (define-key map [header-line mouse-3] 'mode-line-next-buffer)
454 (setq mode-line-buffer-identification-keymap map)) 468 (setq mode-line-buffer-identification-keymap map))
455 469
456 (defun propertized-buffer-identification (fmt) 470 (defun propertized-buffer-identification (fmt)
457 "Return a list suitable for `mode-line-buffer-identification'. 471 "Return a list suitable for `mode-line-buffer-identification'.
458 FMT is a format specifier such as \"%12b\". This function adds 472 FMT is a format specifier such as \"%12b\". This function adds
459 text properties for face, help-echo, and local-map to it." 473 text properties for face, help-echo, and local-map to it."
460 (list (propertize fmt 474 (list (propertize fmt
461 'face 'Buffer-menu-buffer 475 'face 'mode-line-buffer-id
462 'help-echo 476 'help-echo
463 (purecopy "mouse-1: previous buffer, mouse-3: next buffer") 477 (purecopy "mouse-1: previous buffer, mouse-3: next buffer")
464 'mouse-face 'mode-line-highlight 478 'mouse-face 'mode-line-highlight
465 'local-map mode-line-buffer-identification-keymap))) 479 'local-map mode-line-buffer-identification-keymap)))
466 480