Protect against groups that come from no known methods.
[gnus] / lisp / gnus-cus.el
1 ;;; gnus-cus.el --- customization commands for Gnus
2
3 ;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5
6 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
7 ;; Keywords: news
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
23
24 ;;; Commentary:
25
26 ;;; Code:
27
28 (require 'wid-edit)
29 (require 'gnus)
30 (require 'gnus-agent)
31 (require 'gnus-score)
32 (require 'gnus-topic)
33 (require 'gnus-art)
34
35 ;;; Widgets:
36
37 (defun gnus-custom-mode ()
38   "Major mode for editing Gnus customization buffers.
39
40 The following commands are available:
41
42 \\[widget-forward]              Move to next button or editable field.
43 \\[widget-backward]             Move to previous button or editable field.
44 \\[widget-button-click]         Activate button under the mouse pointer.
45 \\[widget-button-press]         Activate button under point.
46
47 Entry to this mode calls the value of `gnus-custom-mode-hook'
48 if that value is non-nil."
49   (kill-all-local-variables)
50   (setq major-mode 'gnus-custom-mode
51         mode-name "Gnus Customize")
52   (use-local-map widget-keymap)
53   ;; Emacs 21 stuff:
54   (when (and (facep 'custom-button-face)
55              (facep 'custom-button-pressed-face))
56     (set (make-local-variable 'widget-button-face)
57          'custom-button-face)
58     (set (make-local-variable 'widget-button-pressed-face)
59          'custom-button-pressed-face)