diff options
Diffstat (limited to 'lisp/erc')
-rw-r--r-- | lisp/erc/erc-list.el | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el index 955b654f927..ae579dba3bd 100644 --- a/lisp/erc/erc-list.el +++ b/lisp/erc/erc-list.el @@ -117,26 +117,12 @@ (sort-fields col (point-min) (point-max)) (sort-numeric-fields col (point-min) (point-max)))))) -(defvar erc-list-menu-mode-map - (let ((map (make-keymap))) - (suppress-keymap map) - (define-key map "k" 'erc-list-kill) - (define-key map "j" 'erc-list-join) - (define-key map "g" 'erc-list-revert) - (define-key map "n" 'next-line) - (define-key map "p" 'previous-line) - (define-key map "q" 'quit-window) - map) - "Local keymap for `erc-list-mode' buffers.") - -(defvar erc-list-menu-sort-button-map nil - "Local keymap for ERC list menu mode sorting buttons.") - -(unless erc-list-menu-sort-button-map +(defvar erc-list-menu-sort-button-map (let ((map (make-sparse-keymap))) (define-key map [header-line mouse-1] 'erc-list-menu-sort-by-column) (define-key map [follow-link] 'mouse-face) - (setq erc-list-menu-sort-button-map map))) + map) + "Local keymap for ERC list menu mode sorting buttons.") ;; Helper function that makes a buttonized column header. (defun erc-list-button (title column) @@ -146,7 +132,7 @@ 'mouse-face 'highlight 'keymap erc-list-menu-sort-button-map)) -(define-derived-mode erc-list-menu-mode nil "ERC-List" +(define-derived-mode erc-list-menu-mode special-mode "ERC-List" "Major mode for editing a list of irc channels." (setq header-line-format (concat @@ -160,6 +146,12 @@ (put 'erc-list-menu-mode 'mode-class 'special) +(define-key erc-list-menu-mode-map "k" 'erc-list-kill) +(define-key erc-list-menu-mode-map "j" 'erc-list-join) +(define-key erc-list-menu-mode-map "g" 'erc-list-revert) +(define-key erc-list-menu-mode-map "n" 'next-line) +(define-key erc-list-menu-mode-map "p" 'previous-line) + ;; Handle a "322" response. This response tells us about a single ;; channel. (defun erc-list-handle-322 (proc parsed) |