1 ;;; gnus-cus.el --- customization commands for Gnus
3 ;; Copyright (C) 1996, 1999-2012 Free Software Foundation, Inc.
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
36 (defun gnus-custom-mode ()
37 "Major mode for editing Gnus customization buffers.
39 The following commands are available:
41 \\[widget-forward] Move to next button or editable field.
42 \\[widget-backward] Move to previous button or editable field.
43 \\[widget-button-click] Activate button under the mouse pointer.
44 \\[widget-button-press] Activate button under point.
46 Entry to this mode calls the value of `gnus-custom-mode-hook'
47 if that value is non-nil."
48 (kill-all-local-variables)
49 (setq major-mode 'gnus-custom-mode
50 mode-name "Gnus Customize")
51 (use-local-map widget-keymap)
53 (when (and (facep 'custom-button-face)
54 (facep 'custom-button-pressed-face))
55 (set (make-local-variable 'widget-button-face)
57 (set (make-local-variable 'widget-button-pressed-face)
58 'custom-button-pressed-face)
59 (set (make-local-variable 'widget-mouse-face)
60 'custom-button-pressed-face))
61 (when (and (boundp 'custom-raised-buttons)
62 (symbol-value 'custom-raised-buttons))
63 (set (make-local-variable 'widget-push-button-prefix) "")
64 (set (make-local-variable 'widget-push-button-suffix) "")
65 (set (make-local-variable 'widget-link-prefix) "")
66 (set (make-local-variable 'widget-link-suffix) ""))
67 (gnus-run-mode-hooks 'gnus-custom-mode-hook))
69 ;;; Group Customization:
71 (defconst gnus-group-parameters
72 '((extra-aliases (choice
78 (gnus-email-address :tag "Address")))
79 (gnus-email-address :tag "Address")) "\
80 Store messages posted from or to this address in this group.
82 You must be using gnus-group-split for this to work. The VALUE of the
83 nnmail-split-fancy SPLIT generated for this group will match these
86 (split-regexp (regexp :tag "gnus-group-split Regular Expression") "\
87 Like gnus-group-split Address, but expects a regular expression.")