[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer menu fix
From: |
Eli Zaretskii |
Subject: |
Re: Buffer menu fix |
Date: |
Tue, 06 Sep 2005 07:39:22 +0300 |
> Cc: address@hidden
> From: Chong Yidong <address@hidden>
> Date: Mon, 05 Sep 2005 18:18:18 -0400
>
> (defun Buffer-menu-make-sort-button (column ...)
> ...
> (propertize ...
> 'keymap (let ((map (make-sparse-keymap))
> (fun `(lambda ()
> (interactive)
> (Buffer-menu-sort ,column))))
> (define-key map [header-line mouse-1] fun)
> ...))
>
> When you bind a function to a key, you can't specify any additional
> arguments to pass to that function. So you have to define one
> function for each of the possible values of `column' in the code.
>
> The only way I can think of to get around this is to bind to a single
> function that tries to re-construct the value of `column' based on
> where the mouse was clicked. But that seems like a strange thing to
> do -- you're throwing away information that you had (i.e., the value
> of `column'), only to do a lot of work find out what it was later on.
There must be some kind of misunderstanding here. I understand that
you need to know where the mouse was clicked, but that information is
stored in the mouse event that invokes the function, so if you use
`(interactive "e")', you will have access to that information inside
the function. Given this, what information is thrown away?
- Buffer menu fix, Chong Yidong, 2005/09/04
- 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 <=
- 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
- Re: Buffer menu fix, Chong Yidong, 2005/09/07
- Re: Buffer menu fix, Stefan Monnier, 2005/09/07
- Re: Buffer menu fix, Kim F. Storm, 2005/09/07
- Re: Buffer menu fix, Chong Yidong, 2005/09/07
Re: Buffer menu fix, Richard M. Stallman, 2005/09/05
Buffer menu fix, Nick Roberts, 2005/09/05