Stefan Monnier <[EMAIL PROTECTED]> writes:

>>   (defun Buffer-menu-make-sort-button (name column)
>>     (if (equal column Buffer-menu-sort-column) (setq column nil))
>>     (let* ((downname (downcase name))
>> !          (map (make-sparse-keymap)))
>>       ;; This keymap handles both nil and non-nil
>>       ;; values for Buffer-menu-use-header-line.
>> !     (define-key map [header-line mouse-1] 'Buffer-menu-sort-by-column)
>> !     (define-key map [header-line mouse-2] 'Buffer-menu-sort-by-column)
>> !     (define-key map [mouse-2] 'Buffer-menu-sort-by-column)
>>       (define-key map [follow-link] 'mouse-face)
>> !     (define-key map "\C-m" 'Buffer-menu-sort-by-column)
>>       (propertize name
>> +            'column column
>>                   'help-echo (concat
>>                               (if Buffer-menu-use-header-line
>>                                   "mouse-1, mouse-2: sort by "
>
> Then the keymap doesn't depend on `name' or `column', so it can be created
> once and for all at the toplevel, right?

Right!

Chong, would you like to work on this?

-- 
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk



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

Reply via email to