all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Buffer menu fix
@ 2005-09-04 19:16 Chong Yidong
  2005-09-05  3:32 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Chong Yidong @ 2005-09-04 19:16 UTC (permalink / raw)


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)

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: Buffer menu fix
@ 2005-09-06  9:55 Tomas Zerolo
  2005-09-06 21:41 ` Kevin Rodgers
  0 siblings, 1 reply; 26+ messages in thread
From: Tomas Zerolo @ 2005-09-06  9:55 UTC (permalink / raw)
  Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 194 bytes --]

Can't you attach a doc-string to an anonymous function, like so?

    `lambda (e)
      ,(concat "Sort buffer by " column)
      ...

(apologies if I am babbling)

regards

-- tomás

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2005-09-08  6:02 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-04 19:16 Buffer menu fix Chong Yidong
2005-09-05  3:32 ` Eli Zaretskii
2005-09-05 12:31   ` Chong Yidong
2005-09-05 20:50     ` Eli Zaretskii
2005-09-05 22:18       ` Chong Yidong
2005-09-05 23:16         ` Chong Yidong
2005-09-06  4:39         ` Eli Zaretskii
2005-09-06  8:09           ` Thien-Thi Nguyen
2005-09-06 19:49           ` Chong Yidong
2005-09-06 23:01             ` Kim F. Storm
2005-09-07  0:08               ` Chong Yidong
2005-09-07 12:07               ` Stefan Monnier
2005-09-07 13:04                 ` Kim F. Storm
2005-09-08  6:02                   ` Chong Yidong
2005-09-07 23:55               ` Chong Yidong
2005-09-05  7:14 ` Richard M. Stallman
2005-09-05 23:58 ` Nick Roberts
2005-09-06  0:23   ` Chong Yidong
2005-09-06  1:16     ` Nick Roberts
2005-09-06  3:30       ` asdf
2005-09-06  4:15         ` Nick Roberts
2005-09-06 19:17           ` Chong Yidong
2005-09-06 11:22     ` Richard M. Stallman
2005-09-06 19:16       ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2005-09-06  9:55 Tomas Zerolo
2005-09-06 21:41 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.