1 ;;; gnus-cus.el --- customization commands for Gnus
3 ;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003
4 ;; Free Software Foundation, Inc.
6 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
9 ;; This file is part of GNU Emacs.
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 2, or (at your option)
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.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
39 (defun gnus-custom-mode ()
40 "Major mode for editing Gnus customization buffers.
42 The following commands are available:
44 \\[widget-forward] Move to next button or editable field.
45 \\[widget-backward] Move to previous button or editable field.
46 \\[widget-button-click] Activate button under the mouse pointer.
47 \\[widget-button-press] Activate button under point.
49 Entry to this mode calls the value of `gnus-custom-mode-hook'
50 if that value is non-nil."
51 (kill-all-local-variables)
52 (setq major-mode 'gnus-custom-mode
53 mode-name "Gnus Customize")
54 (use-local-map widget-keymap)
56 (when (and (facep 'custom-button-face)
57 (facep 'custom-button-pressed-face))
58 (set (make-local-variable 'widget-button-face)
60 (set (make-local-variable 'widget-button-pressed-face)
61 'custom-button-pressed-face)
62 (set (make-local-variable 'widget-mouse-face)
63 'custom-button-pressed-face))
64 (when (and (boundp 'custom-raised-buttons)
65 (symbol-value 'custom-raised-buttons))
66 (set (make-local-variable 'widget-push-button-prefix) "")
67 (set (make-local-variable 'widget-push-button-suffix) "")
68 (set (make-local-variable 'widget-link-prefix) "")
69 (set (make-local-variable 'widget-link-suffix) ""))
70 (gnus-run-hooks 'gnus-custom-mode-hook))
72 ;;; Group Customization:
74 (defconst gnus-group-parameters
75 '((extra-aliases (choice
81 (gnus-email-address :tag "Address")))
82 (gnus-email-address :tag "Address")) "\
83 Store messages posted from or to this address in this group.
85 You must be using gnus-group-split for this to work. The VALUE of the
86 nnmail-split-fancy SPLIT generated for this group will match these
89 (split-regexp (regexp :tag "gnus-group-split Regular Expression") "\
90 Like gnus-group-split Address, but expects a regular expression.")
92 (split-exclude (list :tag "gnus-group-split Restricts"
94 :inline t (regexp :tag "Restrict"))) "\
95 Regular expression that cancels gnus-group-split matches.
97 Each entry is added to the nnmail-split-fancy SPLIT as a separate
100 (split-spec (choice :tag "gnus-group-split Overrider"
101 (sexp :tag "Fancy Split")
102 (const :tag "Catch All" catch-all)
103 (const :tag "Ignore" nil)) "\
104 Override all other gnus-group-split fields.
106 In `Fancy Split', you can enter any nnmail-split-fancy SPLIT. Note
107 that the name of this group won't be automatically assumed, you have
108 to add it to the SPLITs yourself. This means you can use such splits
109 to split messages to other groups too.
111 If you select `Catch All', this group will get postings for any
112 messages not matched in any other group. It overrides the variable
113 gnus-group-split-default-catch-all-group.
115 Selecting `Ignore' forces no SPLIT to be generated for this group,
116 disabling all other gnus-group-split fields.")
118 (broken-reply-to (const :tag "Broken Reply To" t) "\
119 Ignore `Reply-To' headers in this group.
121 That can be useful if you're reading a mailing list group where the
122 listserv has inserted `Reply-To' headers that point back to the
123 listserv itself. This is broken behavior. So there!")
125 (to-group (string :tag "To Group") "\
126 All posts will be sent to the specified group.")
128 (gcc-self (choice :tag "GCC"
130 (const :tag "To current group" t)
132 (string :format "%v" :hide-front-space t)) "\
133 Specify default value for GCC header.
135 If this symbol is present in the group parameter list and set to t,
136 new composed messages will be `Gcc''d to the current group. If it is
137 present and set to `none', no `Gcc:' header will be generated, if it
138 is present and a string, this string will be inserted literally as a
139 `gcc' header (this symbol takes precedence over any default `Gcc'
140 rules as described later).")
142 (expiry-wait (choice :tag "Expire Wait"
146 (number :hide-front-space t
150 Overrides any `nnmail-expiry-wait' and `nnmail-expiry-wait-function'
151 when expiring expirable messages. The value can either be a number of
152 days (not necessarily an integer) or the symbols `never' or
155 (expiry-target (choice :tag "Expiry Target"
158 (function :format "%v" nnmail-)
160 Where expired messages end up.
162 Overrides `nnmail-expiry-target'.")
164 (score-file (file :tag "Score File") "\
165 Make the specified file into the current score file.
166 This means that all score commands you issue will end up in this file.")
168 (adapt-file (file :tag "Adapt File") "\
169 Make the specified file into the current adaptive file.
170 All adaptive score entries will be put into this file.")
172 (admin-address (gnus-email-address :tag "Admin Address") "\
173 Administration address for a mailing list.
175 When unsubscribing to a mailing list you should never send the
176 unsubscription notice to the mailing list itself. Instead, you'd
177 send messages to the administrative address. This parameter allows
178 you to put the admin address somewhere convenient.")
180 (display (choice :tag "Display"
185 (sexp :tag "Other")) "\
186 Which articles to display on entering the group.
189 Display all articles, both read and unread.
192 Display the last NUMBER articles in the group. This is the same as
193 entering the group with C-u NUMBER.
196 Display the default visible articles, which normally includes
197 unread and ticked articles.
200 Display the articles that satisfy the S-expression. The S-expression
201 should be in an array form.")
203 (comment (string :tag "Comment") "\
204 An arbitrary comment on the group.")
206 (visible (const :tag "Permanently visible" t) "\
207 Always display this group, even when there are no unread articles in it.")
210 (choice :tag "Highlight words"
212 (repeat (list (regexp :tag "Highlight regexp")
213 (number :tag "Group for entire word" 0)
214 (number :tag "Group for displayed part" 0)
216 gnus-emphasis-highlight-words))))
218 See `gnus-emphasis-alist'.")
221 (choice :tag "Posting style"
227 (const signature-file)