[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Buffer menu fix
From: |
Chong Yidong |
Subject: |
Buffer menu fix |
Date: |
Sun, 04 Sep 2005 15:16:34 -0400 |
This is regarding this FOR-RELEASE item:
** The header-line buttons in the buffer list buffer should respond
to Mouse-1.
The following patch fixes the bug and simplifies the code. (The `if'
condition that checks `Buffer-menu-use-header-line' in the old code is
not necessary, because it does no harm to bind some extra keys.)
If there are no objections over the next few days, I will check it in.
*** emacs/lisp/buff-menu.el.~1.89.~ 2005-08-15 17:29:32.000000000 -0400
--- emacs/lisp/buff-menu.el 2005-09-04 15:11:22.000000000 -0400
***************
*** 645,666 ****
"mouse-2: sort by visited order"
"mouse-2, RET: sort by visited order"))
'mouse-face 'highlight
! 'keymap (let ((map (make-sparse-keymap)))
! (if Buffer-menu-use-header-line
! (define-key map [header-line mouse-2]
! `(lambda (e)
! (interactive "e")
! (save-window-excursion
! (if e (mouse-select-window e))
! (Buffer-menu-sort ,column))))
! (define-key map [mouse-2]
! `(lambda (e)
! (interactive "e")
! (if e (mouse-select-window e))
! (Buffer-menu-sort ,column)))
! (define-key map "\C-m"
! `(lambda () (interactive)
! (Buffer-menu-sort ,column))))
map)))
(defun list-buffers-noselect (&optional files-only buffer-list)
--- 645,663 ----
"mouse-2: sort by visited order"
"mouse-2, RET: sort by visited order"))
'mouse-face 'highlight
! 'keymap (let ((map (make-sparse-keymap))
! (fun `(lambda (e)
! (interactive "e")
! (if e (mouse-select-window e))
! (Buffer-menu-sort ,column))))
! (define-key map [header-line mouse-1] fun)
! (define-key map [header-line mouse-2] fun)
! (define-key map [header-line down-mouse-1] 'ignore)
! (define-key map [mouse-2] fun)
! (define-key map [follow-link] 'mouse-face)
! (define-key map "\C-m"
! `(lambda () (interactive)
! (Buffer-menu-sort ,column)))
map)))
(defun list-buffers-noselect (&optional files-only buffer-list)
- Buffer menu fix,
Chong Yidong <=
- Re: Buffer menu fix, Eli Zaretskii, 2005/09/04
- Re: Buffer menu fix, Chong Yidong, 2005/09/05
- Re: Buffer menu fix, Eli Zaretskii, 2005/09/05
- Re: Buffer menu fix, Chong Yidong, 2005/09/05
- Re: Buffer menu fix, Chong Yidong, 2005/09/05
- Re: Buffer menu fix, Eli Zaretskii, 2005/09/06
- Re: Buffer menu fix, Thien-Thi Nguyen, 2005/09/06
- Re: Buffer menu fix, Chong Yidong, 2005/09/06
- Re: Buffer menu fix, Kim F. Storm, 2005/09/06
- Re: Buffer menu fix, Chong Yidong, 2005/09/06