aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-03 19:15:38 +0000
committerRichard M. Stallman1997-05-03 19:15:38 +0000
commit9bb97fe9a1382a01bf3927d7abd22ffe4f625b24 (patch)
tree533b91c101c98eef025fb17d09cc29e2ddab95b1
parent09d8c7ac8beccb901052580a4522ce476bd982d2 (diff)
downloademacs-9bb97fe9a1382a01bf3927d7abd22ffe4f625b24.tar.gz
emacs-9bb97fe9a1382a01bf3927d7abd22ffe4f625b24.zip
Add defgroups, and use defcustom.
-rw-r--r--lisp/mail/rmail.el162
1 files changed, 123 insertions, 39 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 4a267a8e9eb..a72c16469a8 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -51,23 +51,69 @@
51; (expand-file-name "~/RMAIL") 51; (expand-file-name "~/RMAIL")
52; "") 52; "")
53 53
54(defgroup rmail nil
55 "Mail reader for Emacs."
56 :group 'mail)
57
58(defgroup rmail-retrieve nil
59 "Rmail retrieval options."
60 :prefix "rmail-"
61 :group 'rmail)
62
63(defgroup rmail-files nil
64 "Rmail files."
65 :prefix "rmail-"
66 :group 'rmail)
67
68(defgroup rmail-headers nil
69 "Rmail header options."
70 :prefix "rmail-"
71 :group 'rmail)
72
73(defgroup rmail-reply nil
74 "Rmail reply options."
75 :prefix "rmail-"
76 :group 'rmail)
77
78(defgroup rmail-summary nil
79 "Rmail summary options."
80 :prefix "rmail-"
81 :prefix "rmail-summary-"
82 :group 'rmail)
83
84(defgroup rmail-output nil
85 "Output message to a file."
86 :prefix "rmail-output-"
87 :prefix "rmail-"
88 :group 'rmail)
89
90
54(defvar rmail-movemail-program nil 91(defvar rmail-movemail-program nil
55 "If non-nil, name of program for fetching new mail.") 92 "If non-nil, name of program for fetching new mail.")
56 93
57(defvar rmail-pop-password nil 94(defcustom rmail-pop-password nil
58 "*Password to use when reading mail from a POP server, if required.") 95 "*Password to use when reading mail from a POP server, if required."
96 :type '(choice (string :tag "Password")
97 (const :tag "Not Required" nil))
98 :group 'rmail-retrieve)
59 99
60(defvar rmail-pop-password-required nil 100(defcustom rmail-pop-password-required nil
61 "*Non-nil if a password is required when reading mail using POP.") 101 "*Non-nil if a password is required when reading mail using POP."
102 :type 'boolean
103 :group 'rmail-retrieve)
62 104
63(defvar rmail-preserve-inbox nil 105(defcustom rmail-preserve-inbox nil
64 "*Non-nil if incoming mail should be left in the user's inbox, 106 "*Non-nil if incoming mail should be left in the user's inbox,
65rather than deleted, after it is retrieved.") 107rather than deleted, after it is retrieved."
108 :type 'boolean
109 :group 'rmail-retrieve)
66 110
67;;;###autoload 111;;;###autoload
68(defvar rmail-dont-reply-to-names nil "\ 112(defcustom rmail-dont-reply-to-names nil "\
69*A regexp specifying names to prune of reply to messages. 113*A regexp specifying names to prune of reply to messages.
70A value of nil means exclude your own name only.") 114A value of nil means exclude your own name only."
115 :type '(choice regexp (const :tag "Your Name" nil))
116 :group 'rmail-reply)
71 117
72;;;###autoload 118;;;###autoload
73(defvar rmail-default-dont-reply-to-names "info-" "\ 119(defvar rmail-default-dont-reply-to-names "info-" "\
@@ -78,50 +124,76 @@ value is the user's name.)
78It is useful to set this variable in the site customization file.") 124It is useful to set this variable in the site customization file.")
79 125
80;;;###autoload 126;;;###autoload
81(defvar rmail-ignored-headers "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^x-mailer:\\|^delivered-to:" 127(defcustom rmail-ignored-headers "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^x-mailer:\\|^delivered-to:"
82 "*Regexp to match header fields that Rmail should normally hide.") 128 "*Regexp to match header fields that Rmail should normally hide."
129 :type 'regexp
130 :group 'rmail-headers)
83 131
84;;;###autoload 132;;;###autoload
85(defvar rmail-displayed-headers nil 133(defcustom rmail-displayed-headers nil
86 "*Regexp to match Header fields that Rmail should display. 134 "*Regexp to match Header fields that Rmail should display.
87If nil, display all header fields except those matched by 135If nil, display all header fields except those matched by
88`rmail-ignored-headers'.") 136`rmail-ignored-headers'."
137 :type '(choice regexp (const :tag "All"))
138 :group 'rmail-headers)
89 139
90;;;###autoload 140;;;###autoload
91(defvar rmail-retry-ignored-headers nil "\ 141(defcustom rmail-retry-ignored-headers nil "\
92*Headers that should be stripped when retrying a failed message.") 142*Headers that should be stripped when retrying a failed message."
143 :type '(choice regexp (const nil :tag "None"))
144 :group 'rmail-headers)
93 145
94;;;###autoload 146;;;###autoload
95(defvar rmail-highlighted-headers "^From:\\|^Subject:" "\ 147(defcustom rmail-highlighted-headers "^From:\\|^Subject:" "\
96*Regexp to match Header fields that Rmail should normally highlight. 148*Regexp to match Header fields that Rmail should normally highlight.
97A value of nil means don't highlight. 149A value of nil means don't highlight.
98See also `rmail-highlight-face'.") 150See also `rmail-highlight-face'."
151 :type 'regexp
152 :group 'rmail-headers)
99 153
100;;;###autoload 154;;;###autoload
101(defvar rmail-highlight-face nil "\ 155(defcustom rmail-highlight-face nil "\
102*Face used by Rmail for highlighting headers.") 156*Face used by Rmail for highlighting headers."
157 :type '(choice (const :tag "Default" nil)
158 face)
159 :group 'rmail-headers)
103 160
104;;;###autoload 161;;;###autoload
105(defvar rmail-delete-after-output nil "\ 162(defcustom rmail-delete-after-output nil "\
106*Non-nil means automatically delete a message that is copied to a file.") 163*Non-nil means automatically delete a message that is copied to a file."
164 :type 'boolean
165 :group 'rmail-files)
107 166
108;;;###autoload 167;;;###autoload
109(defvar rmail-primary-inbox-list nil "\ 168(defcustom rmail-primary-inbox-list nil "\
110*List of files which are inboxes for user's primary mail file `~/RMAIL'. 169*List of files which are inboxes for user's primary mail file `~/RMAIL'.
111`nil' means the default, which is (\"/usr/spool/mail/$USER\") 170`nil' means the default, which is (\"/usr/spool/mail/$USER\")
112\(the name varies depending on the operating system, 171\(the name varies depending on the operating system,
113and the value of the environment variable MAIL overrides it).") 172and the value of the environment variable MAIL overrides it)."
173 :type `(choice (const :tag "Default" nil)
174 (repeat :value (,(or (getenv "MAIL")
175 (concat "/var/spool/mail/"
176 (getenv "USER"))))
177 file))
178 :group 'rmail-retrieve
179 :group 'rmail-files)
114 180
115;;;###autoload 181;;;###autoload
116(defvar rmail-mail-new-frame nil 182(defcustom rmail-mail-new-frame nil
117 "*Non-nil means Rmail makes a new frame for composing outgoing mail.") 183 "*Non-nil means Rmail makes a new frame for composing outgoing mail."
184 :type 'boolean
185 :group 'rmail-reply)
118 186
119;;;###autoload 187;;;###autoload
120(defvar rmail-secondary-file-directory "~/" 188(defcustom rmail-secondary-file-directory "~/"
121 "*Directory for additional secondary Rmail files.") 189 "*Directory for additional secondary Rmail files."
190 :type 'directory
191 :group 'rmail-files)
122;;;###autoload 192;;;###autoload
123(defvar rmail-secondary-file-regexp "\\.xmail$" 193(defcustom rmail-secondary-file-regexp "\\.xmail$"
124 "*Regexp for which files are secondary Rmail files.") 194 "*Regexp for which files are secondary Rmail files."
195 :type 'regexp
196 :group 'rmail-files)
125 197
126;;;###autoload 198;;;###autoload
127(defvar rmail-mode-hook nil 199(defvar rmail-mode-hook nil
@@ -219,10 +291,14 @@ by substituting the new message number into the existing list.")
219;; Last set of values specified to C-M-n, C-M-p, C-M-s or C-M-l. 291;; Last set of values specified to C-M-n, C-M-p, C-M-s or C-M-l.
220(defvar rmail-last-multi-labels nil) 292(defvar rmail-last-multi-labels nil)
221(defvar rmail-last-regexp nil) 293(defvar rmail-last-regexp nil)
222(defvar rmail-default-file "~/xmail" 294(defcustom rmail-default-file "~/xmail"
223 "*Default file name for \\[rmail-output].") 295 "*Default file name for \\[rmail-output]."
224(defvar rmail-default-rmail-file "~/XMAIL" 296 :type 'file
225 "*Default file name for \\[rmail-output-to-rmail-file].") 297 :group 'rmail-files)
298(defcustom rmail-default-rmail-file "~/XMAIL"
299 "*Default file name for \\[rmail-output-to-rmail-file]."
300 :type 'file
301 :group 'rmail-files)
226 302
227;;; Regexp matching the delimiter of messages in UNIX mail format 303;;; Regexp matching the delimiter of messages in UNIX mail format
228;;; (UNIX From lines), minus the initial ^. Note that if you change 304;;; (UNIX From lines), minus the initial ^. Note that if you change
@@ -315,11 +391,15 @@ by substituting the new message number into the existing list.")
315This is set to nil by default.") 391This is set to nil by default.")
316 392
317;;;###autoload 393;;;###autoload
318(defvar rmail-enable-mime nil 394(defcustom rmail-enable-mime nil
319 "*If non-nil, RMAIL uses MIME feature. 395 "*If non-nil, RMAIL uses MIME feature.
320If the value is t, RMAIL automatically shows MIME decoded message. 396If the value is t, RMAIL automatically shows MIME decoded message.
321If the value is neither t nor nil, RMAIL does not show MIME decoded message 397If the value is neither t nor nil, RMAIL does not show MIME decoded message
322until a user explicitly require it.") 398until a user explicitly require it."
399 :type '(choice (const :tag "on" t)
400 (const :tag "off" nil)
401 (sexp :tag "When Asked" :format "%t\n" ask))
402 :group 'rmail)
323 403
324;;;###autoload 404;;;###autoload
325(defvar rmail-show-mime-function nil 405(defvar rmail-show-mime-function nil
@@ -2747,12 +2827,16 @@ In fact, the non-nil value returned is the summary buffer itself."
2747 "t iff in RMAIL buffer and an associated summary buffer is displayed." 2827 "t iff in RMAIL buffer and an associated summary buffer is displayed."
2748 (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) 2828 (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer)))
2749 2829
2750(defvar rmail-redisplay-summary nil 2830(defcustom rmail-redisplay-summary nil
2751 "*Non-nil means Rmail should show the summary when it changes. 2831 "*Non-nil means Rmail should show the summary when it changes.
2752This has an effect only if a summary buffer exists.") 2832This has an effect only if a summary buffer exists."
2753 2833 :type 'boolean
2754(defvar rmail-summary-window-size nil 2834 :group 'rmail-summary)
2755 "*Non-nil means specify the height for an Rmail summary window.") 2835
2836(defcustom rmail-summary-window-size nil
2837 "*Non-nil means specify the height for an Rmail summary window."
2838 :type 'boolean
2839 :group 'rmail-summary)
2756 2840
2757;; Put the summary buffer back on the screen, if user wants that. 2841;; Put the summary buffer back on the screen, if user wants that.
2758(defun rmail-maybe-display-summary () 2842(defun rmail-maybe-display-summary ()