;;; erc-list.el --- /list support for ERC
-;; Copyright (C) 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
+;; Maintainer: FSF
;; Version: 0.1
;; Keywords: comm
-;; This file is part of ERC.
+;; This file is part of GNU Emacs.
-;; ERC is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
-;; ERC is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with ERC; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
(sort-fields col (point-min) (point-max))
(sort-numeric-fields col (point-min) (point-max))))))
-(defvar erc-list-menu-mode-map nil
+(defvar erc-list-menu-mode-map
+ (let ((map (make-keymap)))
+ (set-keymap-parent map special-mode-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)
+ map)
"Local keymap for `erc-list-mode' buffers.")
-(unless erc-list-menu-mode-map
- (setq erc-list-menu-mode-map (make-keymap))
- (suppress-keymap erc-list-menu-mode-map)
- (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)
- (define-key erc-list-menu-mode-map "q" 'quit-window))
-
-(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)
'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
;; tab-width: 8
;; End:
-;; arch-tag: 99c5f9cb-6bac-4224-86bf-e394768cd1d0