> Cc: emacs-devel@gnu.org > From: Chong Yidong <[EMAIL PROTECTED]> > 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? _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel