[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer menu fix

From: Stefan Monnier
Subject: Re: Buffer menu fix
Date: Wed, 07 Sep 2005 08:07:50 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>   (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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]