Spelling fixes.
[bpt/emacs.git] / lisp / mh-e / mh-e.el
CommitLineData
c26cf6c8
RS
1;;; mh-e.el --- GNU Emacs interface to the MH mail system
2
73b0cd50 3;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2011
dcf71371 4;; Free Software Foundation, Inc.
c26cf6c8 5
a1b4049d 6;; Author: Bill Wohler <wohler@newt.com>
6e65a812 7;; Maintainer: Bill Wohler <wohler@newt.com>
721b7c98 8;; Version: 8.3.1
c26cf6c8
RS
9;; Keywords: mail
10
60370d40 11;; This file is part of GNU Emacs.
9b7bc076 12
5e809f55 13;; GNU Emacs is free software: you can redistribute it and/or modify
c26cf6c8 14;; it under the terms of the GNU General Public License as published by
5e809f55
GM
15;; the Free Software Foundation, either version 3 of the License, or
16;; (at your option) any later version.
c26cf6c8 17
9b7bc076 18;; GNU Emacs is distributed in the hope that it will be useful,
c26cf6c8
RS
19;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;; GNU General Public License for more details.
22
23;; You should have received a copy of the GNU General Public License
5e809f55 24;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
c26cf6c8
RS
25
26;;; Commentary:
27
d2f8ce2f
BW
28;; MH-E is an Emacs interface to the MH mail system.
29
35fe9c60 30;; MH-E is supported in GNU Emacs 21 and higher, as well as XEmacs 21
d2f8ce2f
BW
31;; (except for versions 21.5.9-21.5.16). It is compatible with MH
32;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils
9e6f5938
BW
33;; 1.0 and higher. Gnus is also required; version 5.10 or higher is
34;; recommended.
d2f8ce2f
BW
35
36;; MH (Message Handler) is a powerful mail reader. See
37;; http://rand-mh.sourceforge.net/.
38
39;; N.B. MH must have been compiled with the MHE compiler flag or several
40;; features necessary for MH-E will be missing from MH commands, specifically
41;; the -build switch to repl and forw.
42
dda00b2c 43;; How to use:
a1b4049d
BW
44;; M-x mh-rmail to read mail. Type C-h m there for a list of commands.
45;; C-u M-x mh-rmail to visit any folder.
dda00b2c 46;; M-x mh-smail to send mail. From within the mail reader, "s" works, too.
b578f267 47
a1b4049d
BW
48;; Your .emacs might benefit from these bindings:
49;; (global-set-key "\C-cr" 'mh-rmail)
50;; (global-set-key "\C-xm" 'mh-smail)
51;; (global-set-key "\C-x4m" 'mh-smail-other-window)
b578f267 52
dda00b2c
BW
53;; If Emacs can't find mh-rmail or mh-smail, add the following to ~/.emacs:
54;; (require 'mh-autoloads)
55
56;; If you want to customize MH-E before explicitly loading it, add this:
57;; (require 'mh-cus-load)
58
a1b4049d
BW
59;; Mailing Lists:
60;; mh-e-users@lists.sourceforge.net
61;; mh-e-announce@lists.sourceforge.net
62;; mh-e-devel@lists.sourceforge.net
dda00b2c 63
a1b4049d
BW
64;; Subscribe by sending a "subscribe" message to
65;; <list>-request@lists.sourceforge.net, or by using the web interface at
66;; https://sourceforge.net/mail/?group_id=13357
67
68;; Bug Reports:
69;; https://sourceforge.net/tracker/?group_id=13357&atid=113357
dda00b2c
BW
70;; Include the output of M-x mh-version in the bug report unless
71;; you're 110% sure we won't ask for it.
a1b4049d
BW
72
73;; Feature Requests:
dda00b2c 74;; https://sourceforge.net/tracker/?group_id=13357&atid=363357
a1b4049d
BW
75
76;; Support:
77;; https://sourceforge.net/tracker/?group_id=13357&atid=213357
b578f267 78
717e06e5 79;;; Change Log:
b578f267
EN
80
81;; Original version for Gosling emacs by Brian Reid, Stanford, 1982.
82;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985.
f0d73c14
BW
83;; Rewritten for GNU Emacs, James Larus, 1985.
84;; Modified by Stephen Gildea, 1988.
85;; Maintenance picked up by Bill Wohler and the
86;; SourceForge Crew <http://mh-e.sourceforge.net/>, 2001.
a1b4049d 87
c26cf6c8
RS
88;;; Code:
89
dda00b2c
BW
90;; Provide functions to the rest of MH-E. However, mh-e.el must not
91;; use any definitions in files that require mh-e from mh-loaddefs,
92;; for if it does it will introduce a require loop.
92ec073e 93(require 'mh-loaddefs)
c3d9274a 94
f0d73c14 95(mh-require-cl)
a1b4049d 96
ebb4d60b
BW
97(require 'mh-buffers)
98(require 'mh-compat)
99
dda00b2c
BW
100(mh-do-in-xemacs
101 (require 'mh-xemacs))
102
30545916
BW
103(mh-font-lock-add-keywords
104 'emacs-lisp-mode
105 (eval-when-compile
106 `((,(concat "(\\("
107 ;; Function declarations (use font-lock-function-name-face).
c90c4cf1 108 "\\(def\\(un\\|macro\\)-mh\\)\\|"
30545916 109 ;; Variable declarations (use font-lock-variable-name-face).
c90c4cf1 110 "\\(def\\(custom\\|face\\)-mh\\)\\|"
30545916 111 ;; Group declarations (use font-lock-type-face).
c90c4cf1 112 "\\(defgroup-mh\\)"
30545916
BW
113 "\\)\\>"
114 ;; Any whitespace and defined object.
115 "[ \t'\(]*"
116 "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
117 (1 font-lock-keyword-face)
118 (7 (cond ((match-beginning 2) font-lock-function-name-face)
119 ((match-beginning 4) font-lock-variable-name-face)
120 (t font-lock-type-face))
121 nil t)))))
122
dda00b2c 123\f
c26cf6c8 124
dda00b2c 125;;; Global Variables
a1b4049d 126
dda00b2c
BW
127;; Try to keep variables local to a single file. Provide accessors if
128;; variables are shared. Use this section as a last resort.
cee9f5c6 129
721b7c98 130(defconst mh-version "8.3.1" "Version number of MH-E.")
a1b4049d 131
dda00b2c 132;; Variants
c3d9274a 133
dda00b2c
BW
134(defvar mh-sys-path
135 '("/usr/local/nmh/bin" ; nmh default
136 "/usr/local/bin/mh/"
137 "/usr/local/mh/"
138 "/usr/bin/mh/" ; Ultrix 4.2, Linux
139 "/usr/new/mh/" ; Ultrix < 4.2
140 "/usr/contrib/mh/bin/" ; BSDI
141 "/usr/pkg/bin/" ; NetBSD
142 "/usr/local/bin/"
efa47761
BW
143 "/usr/local/bin/mu-mh/" ; GNU mailutils MH - default
144 "/usr/bin/mu-mh/") ; GNU mailutils MH - packaged
dda00b2c
BW
145 "List of directories to search for variants of the MH variant.
146The list `exec-path' is searched in addition to this list.
147There's no need for users to modify this list. Instead add extra
148directories to the customizable variable `mh-path'.")
a1b4049d 149
dda00b2c
BW
150(defvar mh-variants nil
151 "List describing known MH variants.
152Do not access this variable directly as it may not have yet been initialized.
153Use the function `mh-variants' instead.")
bdcfe844 154
dda00b2c
BW
155(defvar mh-variant-in-use nil
156 "The MH variant currently in use; a string with variant and version number.
157This differs from `mh-variant' when the latter is set to
158\"autodetect\".")
bdcfe844 159
dda00b2c
BW
160(defvar mh-progs nil
161 "Directory containing MH commands, such as inc, repl, and rmm.")
162
163;;;###autoload
164(put 'mh-progs 'risky-local-variable t)
165
166(defvar mh-lib nil
167 "Directory containing the MH library.
168This directory contains, among other things, the components file.")
169
170;;;###autoload
171(put 'mh-lib 'risky-local-variable t)
172
173(defvar mh-lib-progs nil
174 "Directory containing MH helper programs.
175This directory contains, among other things, the mhl program.")
176
177;;;###autoload
178(put 'mh-lib-progs 'risky-local-variable t)
c26cf6c8 179
dda00b2c 180;; Profile Components
c26cf6c8 181
dda00b2c
BW
182(defvar mh-draft-folder nil
183 "Cached value of the \"Draft-Folder:\" MH profile component.
184Name of folder containing draft messages.
1b7916fb 185Do not use a draft folder if nil.")
d1699462 186
dda00b2c
BW
187(defvar mh-inbox nil
188 "Cached value of the \"Inbox:\" MH profile component.
189Set to \"+inbox\" if no such component.
190Name of the Inbox folder.")
d1699462 191
dda00b2c
BW
192(defvar mh-user-path nil
193 "Cached value of the \"Path:\" MH profile component.
194User's mail folder directory.")
195
196;; Maps declared here so that they can be used in docstrings.
c26cf6c8
RS
197
198(defvar mh-folder-mode-map (make-keymap)
dda00b2c
BW
199 "Keymap for MH-Folder mode.")
200
201(defvar mh-folder-seq-tool-bar-map nil
202 "Keymap for MH-Folder tool bar.")
203
204(defvar mh-folder-tool-bar-map nil
205 "Keymap for MH-Folder tool bar.")
206
207(defvar mh-inc-spool-map (make-sparse-keymap)
208 "Keymap for MH-E's mh-inc-spool commands.")
209
210(defvar mh-letter-mode-map (copy-keymap text-mode-map)
211 "Keymap for MH-Letter mode.")
212
213(defvar mh-letter-tool-bar-map nil
214 "Keymap for MH-Letter tool bar.")
215
216(defvar mh-search-mode-map (make-sparse-keymap)
217 "Keymap for MH-Search mode.")
218
219(defvar mh-show-mode-map (make-sparse-keymap)
220 "Keymap MH-Show mode.")
221
222(defvar mh-show-seq-tool-bar-map nil
223 "Keymap for MH-Show tool bar.")
224
225(defvar mh-show-tool-bar-map nil
226 "Keymap for MH-Show tool bar.")
227
228;; MH-Folder Locals (alphabetical)
c26cf6c8 229
d1699462
BW
230(defvar mh-arrow-marker nil
231 "Marker for arrow display in fringe.")
232
dda00b2c
BW
233(defvar mh-colors-available-flag nil
234 "Non-nil means colors are available.")
235
236(defvar mh-current-folder nil
237 "Name of current folder, a string.")
238
d1699462
BW
239(defvar mh-delete-list nil
240 "List of message numbers to delete.
2dcf34f9
BW
241This variable can be used by
242`mh-before-commands-processed-hook'.")
3d7ca223 243
dda00b2c
BW
244(defvar mh-folder-view-stack nil
245 "Stack of previous folder views.")
246
247(defvar mh-index-data nil
248 "Info about index search results.")
249
250(defvar mh-index-previous-search nil)
251
252(defvar mh-index-msg-checksum-map nil)
253
254(defvar mh-index-checksum-origin-map nil)
255
256(defvar mh-index-sequence-search-flag nil)
257
258(defvar mh-mode-line-annotation nil
259 "Message range displayed in buffer.")
260
261(defvar mh-next-direction 'forward
262 "Direction to move to next message.")
263
264(defvar mh-previous-window-config nil
265 "Window configuration before MH-E command.")
266
d1699462
BW
267(defvar mh-refile-list nil
268 "List of folder names in `mh-seq-list'.
2dcf34f9
BW
269This variable can be used by
270`mh-before-commands-processed-hook'.")
c26cf6c8 271
dda00b2c
BW
272(defvar mh-seen-list nil
273 "List of displayed messages to be removed from the \"Unseen\" sequence.")
c26cf6c8 274
dda00b2c
BW
275(defvar mh-seq-list nil
276 "Alist of this folder's sequences.
277Elements have the form (SEQUENCE . MESSAGES).")
278
279(defvar mh-sequence-notation-history nil
280 "Remember original notation that is overwritten by `mh-note-seq'.")
281
282(defvar mh-show-buffer nil
283 "Buffer that displays message for this folder.")
2953de8c 284
56eb0904
SM
285(define-minor-mode mh-showing-mode
286 "Minor mode to show the message in a separate window."
287 ;; FIXME: maybe this should be moved to mh-show.el.
288 :lighter " Show")
dda00b2c
BW
289
290(defvar mh-view-ops nil
d1699462
BW
291 "Stack of operations that change the folder view.
292These operations include narrowing or threading.")
c26cf6c8 293
dda00b2c 294;; MH-Show Locals (alphabetical)
d1699462 295
dda00b2c
BW
296(defvar mh-globals-hash (make-hash-table)
297 "Keeps track of MIME data on a per buffer basis.")
c26cf6c8 298
dda00b2c
BW
299(defvar mh-show-folder-buffer nil
300 "Keeps track of folder whose message is being displayed.")
c3d9274a 301
dda00b2c 302;; MH-Letter Locals
c26cf6c8 303
dda00b2c
BW
304(defvar mh-folders-changed nil
305 "Lists which folders were affected by deletes and refiles.
306This list will always include the current folder
307`mh-current-folder'. This variable can be used by
308`mh-after-commands-processed-hook'.")
c26cf6c8 309
dda00b2c
BW
310(defvar mh-mail-header-separator "--------"
311 "*Line used by MH to separate headers from text in messages being composed.
c26cf6c8 312
dda00b2c
BW
313This variable should not be used directly in programs. Programs
314should use `mail-header-separator' instead.
315`mail-header-separator' is initialized to
316`mh-mail-header-separator' in `mh-letter-mode'; in other
317contexts, you may have to perform this initialization yourself.
a66894d8 318
dda00b2c
BW
319Do not make this a regular expression as it may be the argument
320to `insert' and it is passed through `regexp-quote' before being
321used by functions like `re-search-forward'.")
f0d73c14 322
dda00b2c
BW
323(defvar mh-sent-from-folder nil
324 "Folder of msg assoc with this letter.")
cee9f5c6 325
dda00b2c
BW
326(defvar mh-sent-from-msg nil
327 "Number of msg assoc with this letter.")
a1b4049d 328
dda00b2c 329;; Sequences
c26cf6c8 330
dda00b2c
BW
331(defvar mh-unseen-seq nil
332 "Cached value of the \"Unseen-Sequence:\" MH profile component.
333Name of the Unseen sequence.")
c26cf6c8 334
dda00b2c
BW
335(defvar mh-previous-seq nil
336 "Cached value of the \"Previous-Sequence:\" MH profile component.
337Name of the Previous sequence.")
2dcf34f9 338
dda00b2c 339;; Etc. (alphabetical)
c26cf6c8 340
dda00b2c
BW
341(defvar mh-flists-present-flag nil
342 "Non-nil means that we have \"flists\".")
2dcf34f9 343
dda00b2c 344(defvar mh-index-data-file ".mhe_index"
9858f6c3 345 "MH-E specific file where index search info is stored.")
c26cf6c8 346
dda00b2c 347(defvar mh-letter-header-field-regexp "^\\([A-Za-z][A-Za-z0-9-]*\\):")
c26cf6c8 348
dda00b2c
BW
349(defvar mh-page-to-next-msg-flag nil
350 "Non-nil means next SPC or whatever goes to next undeleted message.")
c26cf6c8 351
dda00b2c
BW
352(defvar mh-pgp-support-flag (not (not (locate-library "mml2015")))
353 "Non-nil means PGP support is available.")
553fb735 354
dda00b2c
BW
355(defvar mh-signature-separator "-- \n"
356 "Text of a signature separator.
bdcfe844 357
dda00b2c
BW
358A signature separator is used to separate the body of a message
359from the signature. This can be used by user agents such as MH-E
360to render the signature differently or to suppress the inclusion
361of the signature in a reply. Use `mh-signature-separator-regexp'
362when searching for a separator.")
553fb735 363
dda00b2c
BW
364(defvar mh-signature-separator-regexp "^-- $"
365 "This regular expression matches the signature separator.
366See `mh-signature-separator'.")
553fb735 367
dda00b2c
BW
368(defvar mh-thread-scan-line-map nil
369 "Map of message index to various parts of the scan line.")
370(make-variable-buffer-local 'mh-thread-scan-line-map)
bdcfe844 371
dda00b2c
BW
372(defvar mh-thread-scan-line-map-stack nil
373 "Old map of message index to various parts of the scan line.
374This is the original map that is stored when the folder is
375narrowed.")
376(make-variable-buffer-local 'mh-thread-scan-line-map-stack)
553fb735 377
dda00b2c
BW
378(defvar mh-x-mailer-string nil
379 "*String containing the contents of the X-Mailer header field.
380If nil, this variable is initialized to show the version of MH-E,
381Emacs, and MH the first time a message is composed.")
553fb735 382
dda00b2c 383\f
553fb735 384
dda00b2c 385;;; MH-E Entry Points
c3d9274a
BW
386
387(eval-when-compile (require 'gnus))
388
389(defmacro mh-macro-expansion-time-gnus-version ()
390 "Return Gnus version available at macro expansion time.
2dcf34f9
BW
391The macro evaluates the Gnus version at macro expansion time. If
392MH-E was compiled then macro expansion happens at compile time."
393gnus-version)
c3d9274a
BW
394
395(defun mh-run-time-gnus-version ()
396 "Return Gnus version available at run time."
397 (require 'gnus)
398 gnus-version)
399
847b8219 400;;;###autoload
c26cf6c8 401(defun mh-version ()
bdcfe844 402 "Display version information about MH-E and the MH mail handling system."
c26cf6c8 403 (interactive)
3d7ca223 404 (set-buffer (get-buffer-create mh-info-buffer))
c26cf6c8 405 (erase-buffer)
c3d9274a
BW
406 ;; MH-E version.
407 (insert "MH-E " mh-version "\n\n")
408 ;; MH-E compilation details.
409 (insert "MH-E compilation details:\n")
410 (let* ((compiled-mhe (byte-code-function-p (symbol-function 'mh-version)))
411 (gnus-compiled-version (if compiled-mhe
412 (mh-macro-expansion-time-gnus-version)
413 "N/A")))
414 (insert " Byte compiled:\t\t" (if compiled-mhe "yes" "no") "\n"
415 " Gnus (compile-time):\t" gnus-compiled-version "\n"
416 " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n"))
417 ;; Emacs version.
418 (insert (emacs-version) "\n\n")
a1b4049d 419 ;; MH version.
f0d73c14
BW
420 (if mh-variant-in-use
421 (insert mh-variant-in-use "\n"
422 " mh-progs:\t" mh-progs "\n"
423 " mh-lib:\t" mh-lib "\n"
424 " mh-lib-progs:\t" mh-lib-progs "\n\n")
425 (insert "No MH variant detected\n"))
a1b4049d
BW
426 ;; Linux version.
427 (condition-case ()
428 (call-process "uname" nil t nil "-a")
429 (file-error))
430 (goto-char (point-min))
3d7ca223 431 (display-buffer mh-info-buffer))
c26cf6c8 432
dda00b2c
BW
433\f
434
435;;; Support Routines
436
437(defun mh-list-to-string (l)
438 "Flatten the list L and make every element of the new list into a string."
439 (nreverse (mh-list-to-string-1 l)))
440
441(defun mh-list-to-string-1 (l)
442 "Flatten the list L and make every element of the new list into a string."
8d1ada53
BW
443 (let (new-list)
444 (dolist (element l)
445 (cond ((null element))
446 ((symbolp element)
447 (push (symbol-name element) new-list))
448 ((numberp element)
449 (push (int-to-string element) new-list))
450 ((equal element ""))
451 ((stringp element)
452 (push element new-list))
453 ((listp element)
454 (setq new-list (nconc (mh-list-to-string-1 element) new-list)))
455 (t
456 (error "Bad element: %s" element))))
dda00b2c 457 new-list))
847b8219 458
c26cf6c8
RS
459\f
460
dda00b2c
BW
461;;; MH-E Process Support
462
463(defvar mh-index-max-cmdline-args 500
464 "Maximum number of command line args.")
c26cf6c8 465
dda00b2c
BW
466(defun mh-xargs (cmd &rest args)
467 "Partial imitation of xargs.
468The current buffer contains a list of strings, one on each line.
469The function will execute CMD with ARGS and pass the first
470`mh-index-max-cmdline-args' strings to it. This is repeated till
471all the strings have been used."
472 (goto-char (point-min))
473 (let ((current-buffer (current-buffer)))
474 (with-temp-buffer
475 (let ((out (current-buffer)))
476 (set-buffer current-buffer)
477 (while (not (eobp))
478 (let ((arg-list (reverse args))
479 (count 0))
480 (while (and (not (eobp)) (< count mh-index-max-cmdline-args))
d5dc8c56
BW
481 (push (buffer-substring-no-properties (point)
482 (mh-line-end-position))
dda00b2c
BW
483 arg-list)
484 (incf count)
485 (forward-line))
486 (apply #'call-process cmd nil (list out nil) nil
487 (nreverse arg-list))))
488 (erase-buffer)
489 (insert-buffer-substring out)))))
490
491;; XXX This should be applied anywhere MH-E calls out to /bin/sh.
492(defun mh-quote-for-shell (string)
493 "Quote STRING for /bin/sh.
494Adds double-quotes around entire string and quotes the characters
495\\, `, and $ with a backslash."
496 (concat "\""
497 (loop for x across string
498 concat (format (if (memq x '(?\\ ?` ?$)) "\\%c" "%c") x))
499 "\""))
500
501(defun mh-exec-cmd (command &rest args)
502 "Execute mh-command COMMAND with ARGS.
503The side effects are what is desired. Any output is assumed to be
504an error and is shown to the user. The output is not read or
505parsed by MH-E."
b5553d47 506 (with-current-buffer (get-buffer-create mh-log-buffer)
dda00b2c
BW
507 (let* ((initial-size (mh-truncate-log-buffer))
508 (start (point))
509 (args (mh-list-to-string args)))
510 (apply 'call-process (expand-file-name command mh-progs) nil t nil args)
511 (when (> (buffer-size) initial-size)
512 (save-excursion
513 (goto-char start)
514 (insert "Errors when executing: " command)
515 (loop for arg in args do (insert " " arg))
516 (insert "\n"))
517 (save-window-excursion
518 (switch-to-buffer-other-window mh-log-buffer)
519 (sit-for 5))))))
520
521(defun mh-exec-cmd-error (env command &rest args)
522 "In environment ENV, execute mh-command COMMAND with ARGS.
523ENV is nil or a string of space-separated \"var=value\" elements.
524Signals an error if process does not complete successfully."
b5553d47 525 (with-current-buffer (get-buffer-create mh-temp-buffer)
dda00b2c
BW
526 (erase-buffer)
527 (let ((process-environment process-environment))
528 ;; XXX: We should purge the list that split-string returns of empty
529 ;; strings. This can happen in XEmacs if leading or trailing spaces
530 ;; are present.
531 (dolist (elem (if (stringp env) (split-string env " ") ()))
532 (push elem process-environment))
533 (mh-handle-process-error
534 command (apply #'call-process (expand-file-name command mh-progs)
535 nil t nil (mh-list-to-string args))))))
536
537(defun mh-exec-cmd-daemon (command filter &rest args)
538 "Execute MH command COMMAND in the background.
539
540If FILTER is non-nil then it is used to process the output
541otherwise the default filter `mh-process-daemon' is used. See
542`set-process-filter' for more details of FILTER.
543
544ARGS are passed to COMMAND as command line arguments."
b5553d47 545 (with-current-buffer (get-buffer-create mh-log-buffer)
dda00b2c
BW
546 (mh-truncate-log-buffer))
547 (let* ((process-connection-type nil)
548 (process (apply 'start-process
549 command nil
550 (expand-file-name command mh-progs)
551 (mh-list-to-string args))))
552 (set-process-filter process (or filter 'mh-process-daemon))
553 process))
554
555(defun mh-exec-cmd-env-daemon (env command filter &rest args)
c76608f0 556 "In environment ENV, execute mh-command COMMAND in the background.
dda00b2c
BW
557
558ENV is nil or a string of space-separated \"var=value\" elements.
559Signals an error if process does not complete successfully.
560
561If FILTER is non-nil then it is used to process the output
562otherwise the default filter `mh-process-daemon' is used. See
563`set-process-filter' for more details of FILTER.
564
565ARGS are passed to COMMAND as command line arguments."
566 (let ((process-environment process-environment))
567 (dolist (elem (if (stringp env) (split-string env " ") ()))
568 (push elem process-environment))
569 (apply #'mh-exec-cmd-daemon command filter args)))
570
571(defun mh-process-daemon (process output)
572 "PROCESS daemon that puts OUTPUT into a temporary buffer.
573Any output from the process is displayed in an asynchronous
574pop-up window."
575 (with-current-buffer (get-buffer-create mh-log-buffer)
576 (insert-before-markers output)
577 (display-buffer mh-log-buffer)))
578
579(defun mh-exec-cmd-quiet (raise-error command &rest args)
580 "Signal RAISE-ERROR if COMMAND with ARGS fails.
581Execute MH command COMMAND with ARGS. ARGS is a list of strings.
582Return at start of mh-temp buffer, where output can be parsed and
583used.
584Returns value of `call-process', which is 0 for success, unless
585RAISE-ERROR is non-nil, in which case an error is signaled if
586`call-process' returns non-0."
587 (set-buffer (get-buffer-create mh-temp-buffer))
588 (erase-buffer)
589 (let ((value
590 (apply 'call-process
591 (expand-file-name command mh-progs) nil t nil
592 args)))
593 (goto-char (point-min))
594 (if raise-error
595 (mh-handle-process-error command value)
596 value)))
597
598(defun mh-exec-cmd-output (command display &rest args)
599 "Execute MH command COMMAND with DISPLAY flag and ARGS.
600Put the output into buffer after point.
601Set mark after inserted text.
602Output is expected to be shown to user, not parsed by MH-E."
603 (push-mark (point) t)
604 (apply 'call-process
605 (expand-file-name command mh-progs) nil t display
606 (mh-list-to-string args))
607
608 ;; The following is used instead of 'exchange-point-and-mark because the
609 ;; latter activates the current region (between point and mark), which
610 ;; turns on highlighting. So prior to this bug fix, doing "inc" would
611 ;; highlight a region containing the new messages, which is undesirable.
612 ;; The bug wasn't seen in emacs21 but still occurred in XEmacs21.4.
613 (mh-exchange-point-and-mark-preserving-active-mark))
614
615;; Shush compiler.
54a5db74
BW
616(mh-do-in-xemacs
617 (defvar mark-active))
dda00b2c
BW
618
619(defun mh-exchange-point-and-mark-preserving-active-mark ()
620 "Put the mark where point is now, and point where the mark is now.
621This command works even when the mark is not active, and
622preserves whether the mark is active or not."
623 (interactive nil)
624 (let ((is-active (and (boundp 'mark-active) mark-active)))
625 (let ((omark (mark t)))
626 (if (null omark)
627 (error "No mark set in this buffer"))
628 (set-mark (point))
629 (goto-char omark)
630 (if (boundp 'mark-active)
631 (setq mark-active is-active))
632 nil)))
633
634(defun mh-exec-lib-cmd-output (command &rest args)
635 "Execute MH library command COMMAND with ARGS.
636Put the output into buffer after point.
637Set mark after inserted text."
638 (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args))
639
640(defun mh-handle-process-error (command status)
641 "Raise error if COMMAND returned non-zero STATUS, otherwise return STATUS."
642 (if (equal status 0)
643 status
644 (goto-char (point-min))
645 (insert (if (integerp status)
646 (format "%s: exit code %d\n" command status)
647 (format "%s: %s\n" command status)))
b5553d47
SM
648 (let ((error-message (buffer-substring (point-min) (point-max))))
649 (with-current-buffer (get-buffer-create mh-log-buffer)
dda00b2c
BW
650 (mh-truncate-log-buffer)
651 (insert error-message)))
652 (error "%s failed, check buffer %s for error message"
653 command mh-log-buffer)))
654
655\f
656
fde155f4
BW
657;;; MH-E Customization Support Routines
658
659;; Shush compiler (Emacs 21 and XEmacs).
660(defvar customize-package-emacs-version-alist)
661
662;; Temporary function and data structure used customization.
663;; These will be unbound after the options are defined.
664(defmacro mh-strip-package-version (args)
665 "Strip :package-version keyword and its value from ARGS.
666In Emacs versions that support the :package-version keyword,
667ARGS is returned unchanged."
668 `(if (boundp 'customize-package-emacs-version-alist)
669 ,args
670 (let (seen)
671 (loop for keyword in ,args
672 if (cond ((eq keyword ':package-version) (setq seen t) nil)
673 (seen (setq seen nil) nil)
674 (t t))
675 collect keyword))))
676
c90c4cf1 677(defmacro defgroup-mh (symbol members doc &rest args)
fde155f4
BW
678 "Declare SYMBOL as a customization group containing MEMBERS.
679See documentation for `defgroup' for a description of the arguments
680SYMBOL, MEMBERS, DOC and ARGS.
681This macro is used by Emacs versions that lack the :package-version
682keyword, introduced in Emacs 22."
683 (declare (doc-string 3))
684 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
c90c4cf1 685(put 'defgroup-mh 'lisp-indent-function 'defun)
fde155f4 686
c90c4cf1 687(defmacro defcustom-mh (symbol value doc &rest args)
fde155f4
BW
688 "Declare SYMBOL as a customizable variable that defaults to VALUE.
689See documentation for `defcustom' for a description of the arguments
690SYMBOL, VALUE, DOC and ARGS.
691This macro is used by Emacs versions that lack the :package-version
692keyword, introduced in Emacs 22."
693 (declare (doc-string 3))
694 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
c90c4cf1 695(put 'defcustom-mh 'lisp-indent-function 'defun)
fde155f4 696
c90c4cf1 697(defmacro defface-mh (face spec doc &rest args)
fde155f4
BW
698 "Declare FACE as a customizable face that defaults to SPEC.
699See documentation for `defface' for a description of the arguments
700FACE, SPEC, DOC and ARGS.
701This macro is used by Emacs versions that lack the :package-version
702keyword, introduced in Emacs 22."
703 (declare (doc-string 3))
704 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
c90c4cf1 705(put 'defface-mh 'lisp-indent-function 'defun)
fde155f4
BW
706
707\f
708
dda00b2c
BW
709;;; Variant Support
710
c90c4cf1 711(defcustom-mh mh-path nil
dda00b2c
BW
712 "*Additional list of directories to search for MH.
713See `mh-variant'."
714 :group 'mh-e
fde155f4 715 :type '(repeat (directory))
7bf0295e 716 :package-version '(MH-E . "8.0"))
dda00b2c
BW
717
718(defun mh-variants ()
719 "Return a list of installed variants of MH on the system.
720This function looks for MH in `mh-sys-path', `mh-path' and
721`exec-path'. The format of the list of variants that is returned
722is described by the variable `mh-variants'."
723 (if mh-variants
724 mh-variants
725 (let ((list-unique))
726 ;; Make a unique list of directories, keeping the given order.
727 ;; We don't want the same MH variant to be listed multiple times.
728 (loop for dir in (append mh-path mh-sys-path exec-path) do
729 (setq dir (file-chase-links (directory-file-name dir)))
730 (add-to-list 'list-unique dir))
731 (loop for dir in (nreverse list-unique) do
732 (when (and dir (file-directory-p dir) (file-readable-p dir))
733 (let ((variant (mh-variant-info dir)))
734 (if variant
735 (add-to-list 'mh-variants variant)))))
736 mh-variants)))
737
738(defun mh-variant-info (dir)
739 "Return MH variant found in DIR, or nil if none present."
b5553d47
SM
740 (let ((tmp-buffer (get-buffer-create mh-temp-buffer)))
741 (with-current-buffer tmp-buffer
dda00b2c
BW
742 (cond
743 ((mh-variant-mh-info dir))
744 ((mh-variant-nmh-info dir))
efa47761 745 ((mh-variant-gnu-mh-info dir))))))
dda00b2c
BW
746
747(defun mh-variant-mh-info (dir)
efa47761 748 "Return info for MH variant in DIR assuming a temporary buffer is set up."
dda00b2c
BW
749 ;; MH does not have the -version option.
750 ;; Its version number is included in the output of "-help" as:
751 ;;
752 ;; version: MH 6.8.4 #2[UCI] (burrito) of Fri Jan 15 20:01:39 EST 1999
753 ;; options: [ATHENA] [BIND] [DUMB] [LIBLOCKFILE] [LOCALE] [MAILGROUP] [MHE]
754 ;; [MHRC] [MIME] [MORE='"/usr/bin/sensible-pager"'] [NLINK_HACK]
755 ;; [NORUSERPASS] [OVERHEAD] [POP] [POPSERVICE='"pop-3"'] [RENAME]
756 ;; [RFC1342] [RPATHS] [RPOP] [SENDMTS] [SMTP] [SOCKETS]
757 ;; [SPRINTFTYPE=int] [SVR4] [SYS5] [SYS5DIR] [TERMINFO]
758 ;; [TYPESIG=void] [UNISTD] [UTK] [VSPRINTF]
759 (let ((mhparam (expand-file-name "mhparam" dir)))
760 (when (mh-file-command-p mhparam)
761 (erase-buffer)
762 (call-process mhparam nil '(t nil) nil "-help")
763 (goto-char (point-min))
764 (when (search-forward-regexp "version: MH \\(\\S +\\)" nil t)
765 (let ((version (format "MH %s" (match-string 1))))
766 (erase-buffer)
767 (call-process mhparam nil '(t nil) nil "libdir")
768 (goto-char (point-min))
769 (when (search-forward-regexp "^.*$" nil t)
770 (let ((libdir (match-string 0)))
771 `(,version
772 (variant mh)
773 (mh-lib-progs ,libdir)
774 (mh-lib ,libdir)
775 (mh-progs ,dir)
776 (flists nil)))))))))
777
efa47761
BW
778(defun mh-variant-gnu-mh-info (dir)
779 "Return info for GNU mailutils MH variant in DIR.
780This assumes that a temporary buffer is set up."
dda00b2c
BW
781 ;; 'mhparam -version' output:
782 ;; mhparam (GNU mailutils 0.3.2)
783 (let ((mhparam (expand-file-name "mhparam" dir)))
784 (when (mh-file-command-p mhparam)
785 (erase-buffer)
786 (call-process mhparam nil '(t nil) nil "-version")
787 (goto-char (point-min))
788 (when (search-forward-regexp "mhparam (\\(GNU [Mm]ailutils \\S +\\))"
789 nil t)
790 (let ((version (match-string 1))
791 (mh-progs dir))
792 `(,version
efa47761 793 (variant gnu-mh)
dda00b2c
BW
794 (mh-lib-progs ,(mh-profile-component "libdir"))
795 (mh-lib ,(mh-profile-component "etcdir"))
796 (mh-progs ,dir)
797 (flists ,(file-exists-p
798 (expand-file-name "flists" dir)))))))))
799
800(defun mh-variant-nmh-info (dir)
efa47761 801 "Return info for nmh variant in DIR assuming a temporary buffer is set up."
dda00b2c
BW
802 ;; `mhparam -version' outputs:
803 ;; mhparam -- nmh-1.1-RC1 [compiled on chaak at Fri Jun 20 11:03:28 PDT 2003]
804 (let ((mhparam (expand-file-name "mhparam" dir)))
805 (when (mh-file-command-p mhparam)
806 (erase-buffer)
807 (call-process mhparam nil '(t nil) nil "-version")
808 (goto-char (point-min))
809 (when (search-forward-regexp "mhparam -- nmh-\\(\\S +\\)" nil t)
810 (let ((version (format "nmh %s" (match-string 1)))
811 (mh-progs dir))
812 `(,version
813 (variant nmh)
814 (mh-lib-progs ,(mh-profile-component "libdir"))
815 (mh-lib ,(mh-profile-component "etcdir"))
816 (mh-progs ,dir)
817 (flists ,(file-exists-p
818 (expand-file-name "flists" dir)))))))))
819
820(defun mh-file-command-p (file)
821 "Return t if file FILE is the name of a executable regular file."
822 (and (file-regular-p file) (file-executable-p file)))
823
824(defun mh-variant-set-variant (variant)
efa47761 825 "Set up the system variables for the MH variant named VARIANT.
dda00b2c
BW
826If VARIANT is a string, use that key in the alist returned by the
827function `mh-variants'.
828If VARIANT is a symbol, select the first entry that matches that
829variant."
830 (cond
831 ((stringp variant) ;e.g. "nmh 1.1-RC1"
832 (when (assoc variant (mh-variants))
833 (let* ((alist (cdr (assoc variant (mh-variants))))
834 (lib-progs (cadr (assoc 'mh-lib-progs alist)))
835 (lib (cadr (assoc 'mh-lib alist)))
836 (progs (cadr (assoc 'mh-progs alist)))
837 (flists (cadr (assoc 'flists alist))))
838 ;;(set-default mh-variant variant)
839 (setq mh-x-mailer-string nil
840 mh-flists-present-flag flists
841 mh-lib-progs lib-progs
842 mh-lib lib
843 mh-progs progs
844 mh-variant-in-use variant))))
845 ((symbolp variant) ;e.g. 'nmh (pick the first match)
846 (loop for variant-list in (mh-variants)
847 when (eq variant (cadr (assoc 'variant (cdr variant-list))))
848 return (let* ((version (car variant-list))
849 (alist (cdr variant-list))
850 (lib-progs (cadr (assoc 'mh-lib-progs alist)))
851 (lib (cadr (assoc 'mh-lib alist)))
852 (progs (cadr (assoc 'mh-progs alist)))
853 (flists (cadr (assoc 'flists alist))))
854 ;;(set-default mh-variant flavor)
855 (setq mh-x-mailer-string nil
856 mh-flists-present-flag flists
857 mh-lib-progs lib-progs
858 mh-lib lib
859 mh-progs progs
860 mh-variant-in-use version)
861 t)))))
862
863(defun mh-variant-p (&rest variants)
864 "Return t if variant is any of VARIANTS.
efa47761 865Currently known variants are 'MH, 'nmh, and 'gnu-mh."
dda00b2c
BW
866 (let ((variant-in-use
867 (cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants))))))
868 (not (null (member variant-in-use variants)))))
869
870(defun mh-profile-component (component)
871 "Return COMPONENT value from mhparam, or nil if unset."
872 (save-excursion
efa47761
BW
873 ;; MH and nmh use -components, GNU mailutils MH uses -component.
874 ;; Since MH and nmh work with an unambiguous prefix, the `s' is
875 ;; dropped here.
0c32f8c6 876 (mh-exec-cmd-quiet nil "mhparam" "-component" component)
dda00b2c
BW
877 (mh-profile-component-value component)))
878
879(defun mh-profile-component-value (component)
880 "Find and return the value of COMPONENT in the current buffer.
881Returns nil if the component is not in the buffer."
882 (let ((case-fold-search t))
883 (goto-char (point-min))
884 (cond ((not (re-search-forward (format "^%s:" component) nil t)) nil)
885 ((looking-at "[\t ]*$") nil)
3d7ca223 886 (t
dda00b2c
BW
887 (re-search-forward "[\t ]*\\([^\t \n].*\\)$" nil t)
888 (let ((start (match-beginning 1)))
889 (end-of-line)
890 (buffer-substring start (point)))))))
891
892(defun mh-variant-set (variant)
893 "Set the MH variant to VARIANT.
894Sets `mh-progs', `mh-lib', `mh-lib-progs' and
895`mh-flists-present-flag'.
896If the VARIANT is \"autodetect\", then first try nmh, then MH and
efa47761 897finally GNU mailutils MH."
dda00b2c
BW
898 (interactive
899 (list (completing-read
900 "MH variant: "
901 (mapcar (lambda (x) (list (car x))) (mh-variants))
902 nil t)))
efa47761
BW
903
904 ;; TODO Remove mu-mh backwards compatibility in 9.0.
905 (when (and (stringp variant)
906 (string-match "^mu-mh" variant))
907 (message
6807fdff 908 (format "%s\n%s; %s" "The variant name mu-mh has been renamed to gnu-mh"
efa47761
BW
909 "and will be removed in MH-E 9.0"
910 "try M-x customize-option mh-variant"))
911 (sit-for 5)
912 (setq variant (concat "gnu-mh" (substring variant (match-end 0)))))
913
dda00b2c
BW
914 (let ((valid-list (mapcar (lambda (x) (car x)) (mh-variants))))
915 (cond
916 ((eq variant 'none))
917 ((eq variant 'autodetect)
918 (cond
919 ((mh-variant-set-variant 'nmh)
920 (message "%s installed as MH variant" mh-variant-in-use))
921 ((mh-variant-set-variant 'mh)
922 (message "%s installed as MH variant" mh-variant-in-use))
efa47761 923 ((mh-variant-set-variant 'gnu-mh)
dda00b2c
BW
924 (message "%s installed as MH variant" mh-variant-in-use))
925 (t
926 (message "No MH variant found on the system"))))
927 ((member variant valid-list)
928 (when (not (mh-variant-set-variant variant))
929 (message "Warning: %s variant not found. Autodetecting..." variant)
930 (mh-variant-set 'autodetect)))
931 (t
efa47761
BW
932 (message "Unknown variant %s; use %s"
933 variant
4f91a816 934 (mapconcat (lambda (x) (format "%s" (car x)))
dda00b2c
BW
935 (mh-variants) " or "))))))
936
c90c4cf1 937(defcustom-mh mh-variant 'autodetect
dda00b2c
BW
938 "*Specifies the variant used by MH-E.
939
940The default setting of this option is \"Auto-detect\" which means
941that MH-E will automatically choose the first of nmh, MH, or GNU
efa47761 942mailutils MH that it finds in the directories listed in
dda00b2c 943`mh-path' (which you can customize), `mh-sys-path', and
bc4c8031
BW
944`exec-path'. If MH-E can't find MH at all, you may have to
945customize `mh-path' and add the directory in which the command
946\"mhparam\" is located. If, on the other hand, you have both nmh
efa47761
BW
947and GNU mailutils MH installed (for example) and
948`mh-variant-in-use' was initialized to nmh but you want to use
949GNU mailutils MH, then you can set this option to \"gnu-mh\".
dda00b2c
BW
950
951When this variable is changed, MH-E resets `mh-progs', `mh-lib',
952`mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
bc4c8031
BW
953accordingly. Prior to version 8, it was often necessary to set
954some of these variables in \"~/.emacs\"; now it is no longer
955necessary and can actually cause problems."
dda00b2c
BW
956 :type `(radio
957 (const :tag "Auto-detect" autodetect)
958 ,@(mapcar (lambda (x) `(const ,(car x))) (mh-variants)))
959 :set (lambda (symbol value)
960 (set-default symbol value) ;Done in mh-variant-set-variant!
961 (mh-variant-set value))
fde155f4 962 :group 'mh-e
7bf0295e 963 :package-version '(MH-E . "8.0"))
23347d76 964
23347d76
BW
965\f
966
dda00b2c 967;;; MH-E Customization
c26cf6c8 968
dda00b2c
BW
969;; All of the defgroups, defcustoms, and deffaces in MH-E are found
970;; here. This makes it possible to customize modules that aren't
971;; loaded yet. It also makes it easier to organize the customization
972;; groups.
a66894d8 973
dda00b2c
BW
974;; This section contains the following sub-sections:
975
976;; 1. MH-E Customization Groups
977
978;; These are the customization group definitions. Every group has a
979;; associated manual node. The ordering is alphabetical, except for
980;; the groups mh-faces and mh-hooks which are last .
981
982;; 2. MH-E Customization
983
984;; These are the actual customization variables. There is a
985;; sub-section for each group in the MH-E Customization Groups
986;; section, in the same order, separated by page breaks. Within
987;; each section, variables are sorted alphabetically.
988
989;; 3. Hooks
990
991;; All hooks must be placed in the mh-hook group; in addition, add
992;; the group associated with the manual node in which the hook is
993;; described. Since the mh-hook group appears near the end of this
994;; section, the hooks will appear at the end of these other groups.
995
996;; 4. Faces
997
998;; All faces must be placed in the mh-faces group; in addition, add
999;; the group associated with the manual node in which the face is
1000;; described. Since the mh-faces group appears near the end of this
1001;; section, the faces will appear at the end of these other groups.
1002
1003(defun mh-customize (&optional delete-other-windows-flag)
1004 "Customize MH-E variables.
1005If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other
1006windows in the frame are removed."
1007 (interactive "P")
1008 (customize-group 'mh-e)
1009 (when delete-other-windows-flag
1010 (delete-other-windows)))
c26cf6c8 1011
23347d76
BW
1012(if (boundp 'customize-package-emacs-version-alist)
1013 (add-to-list 'customize-package-emacs-version-alist
70a1d47e
BW
1014 '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
1015 ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1")
1016 ("7.4" . "22.1") ("8.0" . "22.1"))))
23347d76 1017
bdcfe844
BW
1018\f
1019
dda00b2c
BW
1020;;; MH-E Customization Groups
1021
c90c4cf1 1022(defgroup-mh mh-e nil
dda00b2c
BW
1023 "Emacs interface to the MH mail system.
1024MH is the Rand Mail Handler. Other implementations include nmh
1025and GNU mailutils."
1026 :link '(custom-manual "(mh-e)Top")
23347d76 1027 :group 'mail
70a1d47e 1028 :package-version '(MH-E . "8.0"))
dda00b2c 1029
c90c4cf1 1030(defgroup-mh mh-alias nil
dda00b2c
BW
1031 "Aliases."
1032 :link '(custom-manual "(mh-e)Aliases")
1033 :prefix "mh-alias-"
23347d76 1034 :group 'mh-e
70a1d47e 1035 :package-version '(MH-E . "7.1"))
dda00b2c 1036
c90c4cf1 1037(defgroup-mh mh-folder nil
dda00b2c
BW
1038 "Organizing your mail with folders."
1039 :prefix "mh-"
1040 :link '(custom-manual "(mh-e)Folders")
23347d76 1041 :group 'mh-e
70a1d47e 1042 :package-version '(MH-E . "7.1"))
dda00b2c 1043
c90c4cf1 1044(defgroup-mh mh-folder-selection nil
dda00b2c
BW
1045 "Folder selection."
1046 :prefix "mh-"
1047 :link '(custom-manual "(mh-e)Folder Selection")
23347d76 1048 :group 'mh-e
70a1d47e 1049 :package-version '(MH-E . "8.0"))
dda00b2c 1050
c90c4cf1 1051(defgroup-mh mh-identity nil
dda00b2c
BW
1052 "Identities."
1053 :link '(custom-manual "(mh-e)Identities")
1054 :prefix "mh-identity-"
23347d76 1055 :group 'mh-e
70a1d47e 1056 :package-version '(MH-E . "7.1"))
dda00b2c 1057
c90c4cf1 1058(defgroup-mh mh-inc nil
dda00b2c
BW
1059 "Incorporating your mail."
1060 :prefix "mh-inc-"
1061 :link '(custom-manual "(mh-e)Incorporating Mail")
23347d76 1062 :group 'mh-e
70a1d47e 1063 :package-version '(MH-E . "8.0"))
dda00b2c 1064
c90c4cf1 1065(defgroup-mh mh-junk nil
dda00b2c
BW
1066 "Dealing with junk mail."
1067 :link '(custom-manual "(mh-e)Junk")
1068 :prefix "mh-junk-"
23347d76 1069 :group 'mh-e
70a1d47e 1070 :package-version '(MH-E . "7.3"))
dda00b2c 1071
c90c4cf1 1072(defgroup-mh mh-letter nil
dda00b2c
BW
1073 "Editing a draft."
1074 :prefix "mh-"
1075 :link '(custom-manual "(mh-e)Editing Drafts")
23347d76 1076 :group 'mh-e
70a1d47e 1077 :package-version '(MH-E . "7.1"))
dda00b2c 1078
c90c4cf1 1079(defgroup-mh mh-ranges nil
dda00b2c
BW
1080 "Ranges."
1081 :prefix "mh-"
1082 :link '(custom-manual "(mh-e)Ranges")
23347d76 1083 :group 'mh-e
70a1d47e 1084 :package-version '(MH-E . "8.0"))
dda00b2c 1085
c90c4cf1 1086(defgroup-mh mh-scan-line-formats nil
dda00b2c
BW
1087 "Scan line formats."
1088 :link '(custom-manual "(mh-e)Scan Line Formats")
1089 :prefix "mh-"
23347d76 1090 :group 'mh-e
70a1d47e 1091 :package-version '(MH-E . "8.0"))
dda00b2c 1092
c90c4cf1 1093(defgroup-mh mh-search nil
dda00b2c
BW
1094 "Searching."
1095 :link '(custom-manual "(mh-e)Searching")
1096 :prefix "mh-search-"
23347d76 1097 :group 'mh-e
70a1d47e 1098 :package-version '(MH-E . "8.0"))
dda00b2c 1099
c90c4cf1 1100(defgroup-mh mh-sending-mail nil
dda00b2c
BW
1101 "Sending mail."
1102 :prefix "mh-"
1103 :link '(custom-manual "(mh-e)Sending Mail")
23347d76 1104 :group 'mh-e
70a1d47e 1105 :package-version '(MH-E . "8.0"))
dda00b2c 1106
c90c4cf1 1107(defgroup-mh mh-sequences nil
dda00b2c
BW
1108 "Sequences."
1109 :prefix "mh-"
1110 :link '(custom-manual "(mh-e)Sequences")
23347d76 1111 :group 'mh-e
70a1d47e 1112 :package-version '(MH-E . "8.0"))
dda00b2c 1113
c90c4cf1 1114(defgroup-mh mh-show nil
dda00b2c
BW
1115 "Reading your mail."
1116 :prefix "mh-"
1117 :link '(custom-manual "(mh-e)Reading Mail")
23347d76 1118 :group 'mh-e
70a1d47e 1119 :package-version '(MH-E . "7.1"))
dda00b2c 1120
c90c4cf1 1121(defgroup-mh mh-speedbar nil
dda00b2c
BW
1122 "The speedbar."
1123 :prefix "mh-speed-"
1124 :link '(custom-manual "(mh-e)Speedbar")
23347d76 1125 :group 'mh-e
70a1d47e 1126 :package-version '(MH-E . "8.0"))
dda00b2c 1127
c90c4cf1 1128(defgroup-mh mh-thread nil
dda00b2c
BW
1129 "Threading."
1130 :prefix "mh-thread-"
1131 :link '(custom-manual "(mh-e)Threading")
23347d76 1132 :group 'mh-e
70a1d47e 1133 :package-version '(MH-E . "8.0"))
dda00b2c 1134
c90c4cf1 1135(defgroup-mh mh-tool-bar nil
dda00b2c
BW
1136 "The tool bar"
1137 :link '(custom-manual "(mh-e)Tool Bar")
1138 :prefix "mh-"
23347d76 1139 :group 'mh-e
70a1d47e 1140 :package-version '(MH-E . "8.0"))
dda00b2c 1141
c90c4cf1 1142(defgroup-mh mh-hooks nil
dda00b2c
BW
1143 "MH-E hooks."
1144 :link '(custom-manual "(mh-e)Top")
1145 :prefix "mh-"
23347d76 1146 :group 'mh-e
70a1d47e 1147 :package-version '(MH-E . "7.1"))
dda00b2c 1148
c90c4cf1 1149(defgroup-mh mh-faces nil
dda00b2c
BW
1150 "Faces used in MH-E."
1151 :link '(custom-manual "(mh-e)Top")
1152 :prefix "mh-"
1153 :group 'faces
23347d76 1154 :group 'mh-e
70a1d47e 1155 :package-version '(MH-E . "7.1"))
bdcfe844
BW
1156
1157\f
1158
23347d76 1159;;; MH-E Customization
dda00b2c 1160
23347d76 1161;; See Variant Support, above, for mh-e group.
dda00b2c
BW
1162
1163;;; Aliases (:group 'mh-alias)
1164
c90c4cf1 1165(defcustom-mh mh-alias-completion-ignore-case-flag t
dda00b2c
BW
1166 "*Non-nil means don't consider case significant in MH alias completion.
1167
1168As MH ignores case in the aliases, so too does MH-E. However, you
1169may turn off this option to make case significant which can be
1170used to segregate completion of your aliases. You might use
1171lowercase for mailing lists and uppercase for people."
1172 :type 'boolean
23347d76 1173 :group 'mh-alias
70a1d47e 1174 :package-version '(MH-E . "7.1"))
dda00b2c 1175
c90c4cf1 1176(defcustom-mh mh-alias-expand-aliases-flag nil
dda00b2c
BW
1177 "*Non-nil means to expand aliases entered in the minibuffer.
1178
1179In other words, aliases entered in the minibuffer will be
d1bb6623 1180expanded to the full address in the message draft. By default,
dda00b2c
BW
1181this expansion is not performed."
1182 :type 'boolean
23347d76 1183 :group 'mh-alias
70a1d47e 1184 :package-version '(MH-E . "7.1"))
dda00b2c 1185
c90c4cf1 1186(defcustom-mh mh-alias-flash-on-comma t
dda00b2c
BW
1187 "*Specify whether to flash address or warn on translation.
1188
1189This option controls the behavior when a [comma] is pressed while
1190entering aliases or addresses. The default setting flashes the
1191address associated with an address in the minibuffer briefly, but
1192does not display a warning if the alias is not found."
1193 :type '(choice (const :tag "Flash but Don't Warn If No Alias" t)
1194 (const :tag "Flash and Warn If No Alias" 1)
1195 (const :tag "Don't Flash Nor Warn If No Alias" nil))
23347d76 1196 :group 'mh-alias
70a1d47e 1197 :package-version '(MH-E . "7.1"))
dda00b2c 1198
c90c4cf1 1199(defcustom-mh mh-alias-insert-file nil
dda00b2c
BW
1200 "*Filename used to store a new MH-E alias.
1201
1202The default setting of this option is \"Use Aliasfile Profile
1203Component\". This option can also hold the name of a file or a
1204list a file names. If this option is set to a list of file names,
1205or the \"Aliasfile:\" profile component contains more than one file
1206name, MH-E will prompt for one of them when MH-E adds an alias."
1207 :type '(choice (const :tag "Use Aliasfile Profile Component" nil)
1208 (file :tag "Alias File")
1209 (repeat :tag "List of Alias Files" file))
23347d76 1210 :group 'mh-alias
70a1d47e 1211 :package-version '(MH-E . "7.1"))
dda00b2c 1212
c90c4cf1 1213(defcustom-mh mh-alias-insertion-location 'sorted
dda00b2c
BW
1214 "Specifies where new aliases are entered in alias files.
1215
1216This option is set to \"Alphabetical\" by default. If you organize
1217your alias file in other ways, then adding aliases to the \"Top\"
1218or \"Bottom\" of your alias file might be more appropriate."
1219 :type '(choice (const :tag "Alphabetical" sorted)
1220 (const :tag "Top" top)
1221 (const :tag "Bottom" bottom))
23347d76 1222 :group 'mh-alias
70a1d47e 1223 :package-version '(MH-E . "7.1"))
dda00b2c 1224
c90c4cf1 1225(defcustom-mh mh-alias-local-users t
1a9aa7df 1226 "*Non-nil means local users are added to alias completion.
dda00b2c
BW
1227
1228Aliases are created from \"/etc/passwd\" entries with a user ID
1229larger than a magical number, typically 200. This can be a handy
1230tool on a machine where you and co-workers exchange messages.
1231These aliases have the form \"local.first.last\" if a real name is
1232present in the password file. Otherwise, the alias will have the
1233form \"local.login\".
1234
1235If you're on a system with thousands of users you don't know, and
1236the loading of local aliases slows MH-E down noticeably, then
1237turn this option off.
1238
1239This option also takes a string which is executed to generate the
1240password file. For example, use \"ypcat passwd\" to obtain the
1241NIS password file."
1242 :type '(choice (boolean) (string))
23347d76 1243 :group 'mh-alias
70a1d47e 1244 :package-version '(MH-E . "7.1"))
dda00b2c 1245
c90c4cf1 1246(defcustom-mh mh-alias-local-users-prefix "local."
dda00b2c
BW
1247 "*String prefixed to the real names of users from the password file.
1248This option can also be set to \"Use Login\".
1249
1250For example, consider the following password file entry:
1251
1252 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
1253
1254The following settings of this option will produce the associated
1255aliases:
1256
1257 \"local.\" local.peter.galbraith
1258 \"\" peter.galbraith
1259 Use Login psg
1260
1261This option has no effect if variable `mh-alias-local-users' is
1262turned off."
1263 :type '(choice (const :tag "Use Login" nil)
1264 (string))
23347d76 1265 :group 'mh-alias
70a1d47e 1266 :package-version '(MH-E . "7.4"))
dda00b2c 1267
c90c4cf1 1268(defcustom-mh mh-alias-passwd-gecos-comma-separator-flag t
dda00b2c
BW
1269 "*Non-nil means the gecos field in the password file uses a comma separator.
1270
1271In the example in `mh-alias-local-users-prefix', commas are used
1272to separate different values within the so-called gecos field.
1273This is a fairly common usage. However, in the rare case that the
1274gecos field in your password file is not separated by commas and
1275whose contents may contain commas, you can turn this option off."
1276 :type 'boolean
23347d76 1277 :group 'mh-alias
70a1d47e 1278 :package-version '(MH-E . "7.4"))
7094eefe 1279
dda00b2c
BW
1280;;; Organizing Your Mail with Folders (:group 'mh-folder)
1281
c90c4cf1 1282(defcustom-mh mh-new-messages-folders t
dda00b2c
BW
1283 "Folders searched for the \"unseen\" sequence.
1284
1285Set this option to \"Inbox\" to search the \"+inbox\" folder or
1286\"All\" to search all of the top level folders. Otherwise, list
1287the folders that should be searched with the \"Choose Folders\"
1288menu item.
1289
1290See also `mh-recursive-folders-flag'."
1291 :type '(choice (const :tag "Inbox" t)
1292 (const :tag "All" nil)
1293 (repeat :tag "Choose Folders" (string :tag "Folder")))
23347d76 1294 :group 'mh-folder
70a1d47e 1295 :package-version '(MH-E . "8.0"))
dda00b2c 1296
c90c4cf1 1297(defcustom-mh mh-ticked-messages-folders t
dda00b2c
BW
1298 "Folders searched for `mh-tick-seq'.
1299
1300Set this option to \"Inbox\" to search the \"+inbox\" folder or
1301\"All\" to search all of the top level folders. Otherwise, list
1302the folders that should be searched with the \"Choose Folders\"
1303menu item.
1304
1305See also `mh-recursive-folders-flag'."
1306 :type '(choice (const :tag "Inbox" t)
1307 (const :tag "All" nil)
1308 (repeat :tag "Choose Folders" (string :tag "Folder")))
23347d76 1309 :group 'mh-folder
70a1d47e 1310 :package-version '(MH-E . "8.0"))
dda00b2c 1311
c90c4cf1 1312(defcustom-mh mh-large-folder 200
dda00b2c
BW
1313 "The number of messages that indicates a large folder.
1314
1315If a folder is deemed to be large, that is the number of messages
1316in it exceed this value, then confirmation is needed when it is
1317visited. Even when `mh-show-threads-flag' is non-nil, the folder
1318is not automatically threaded, if it is large. If set to nil all
1319folders are treated as if they are small."
1320 :type '(choice (const :tag "No Limit") integer)
23347d76 1321 :group 'mh-folder
70a1d47e 1322 :package-version '(MH-E . "7.0"))
dda00b2c 1323
c90c4cf1 1324(defcustom-mh mh-recenter-summary-flag nil
dda00b2c
BW
1325 "*Non-nil means to recenter the summary window.
1326
1327If this option is turned on, recenter the summary window when the
1328show window is toggled off."
1329 :type 'boolean
23347d76 1330 :group 'mh-folder
70a1d47e 1331 :package-version '(MH-E . "7.0"))
dda00b2c 1332
c90c4cf1 1333(defcustom-mh mh-recursive-folders-flag nil
dda00b2c
BW
1334 "*Non-nil means that commands which operate on folders do so recursively."
1335 :type 'boolean
23347d76 1336 :group 'mh-folder
70a1d47e 1337 :package-version '(MH-E . "7.0"))
dda00b2c 1338
c90c4cf1 1339(defcustom-mh mh-sortm-args nil
dda00b2c
BW
1340 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>.
1341
1342This option is consulted when a prefix argument is used with
1343\\[mh-sort-folder]. Normally default arguments to \"sortm\" are
1344specified in the MH profile. This option may be used to provide
1345an alternate view. For example, \"'(\"-nolimit\" \"-textfield\"
1346\"subject\")\" is a useful setting."
1347 :type 'string
23347d76 1348 :group 'mh-folder
70a1d47e 1349 :package-version '(MH-E . "8.0"))
dda00b2c
BW
1350
1351;;; Folder Selection (:group 'mh-folder-selection)
1352
c90c4cf1 1353(defcustom-mh mh-default-folder-for-message-function nil
dda00b2c
BW
1354 "Function to select a default folder for refiling or \"Fcc:\".
1355
bc4c8031
BW
1356When this function is called, the current buffer contains the message
1357being refiled and point is at the start of the message. This function
1358should return the default folder as a string with a leading \"+\"
1359sign. It can also return nil so that the last folder name is used as
1360the default, or an empty string to suppress the default entirely."
dda00b2c 1361 :type 'function
23347d76 1362 :group 'mh-folder-selection
70a1d47e 1363 :package-version '(MH-E . "8.0"))
dda00b2c 1364
c90c4cf1 1365(defcustom-mh mh-default-folder-list nil
dda00b2c
BW
1366 "*List of addresses and folders.
1367
1368The folder name associated with the first address found in this
1369list is used as the default for `mh-refile-msg' and similar
1370functions. Each element in this list contains a \"Check Recipient\"
1371item. If this item is turned on, then the address is checked
1372against the recipient instead of the sender. This is useful for
1373mailing lists.
1374
1375See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1376for more information."
1377 :type '(repeat (list (regexp :tag "Address")
1378 (string :tag "Folder")
1379 (boolean :tag "Check Recipient")))
23347d76 1380 :group 'mh-folder-selection
70a1d47e 1381 :package-version '(MH-E . "7.2"))
dda00b2c 1382
c90c4cf1 1383(defcustom-mh mh-default-folder-must-exist-flag t
dda00b2c
BW
1384 "*Non-nil means guessed folder name must exist to be used.
1385
1386If the derived folder does not exist, and this option is on, then
1387the last folder name used is suggested. This is useful if you get
1388mail from various people for whom you have an alias, but file
1389them all in the same project folder.
1390
1391See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1392for more information."
1393 :type 'boolean
23347d76 1394 :group 'mh-folder-selection
70a1d47e 1395 :package-version '(MH-E . "7.2"))
dda00b2c 1396
c90c4cf1 1397(defcustom-mh mh-default-folder-prefix ""
dda00b2c
BW
1398 "*Prefix used for folder names generated from aliases.
1399The prefix is used to prevent clutter in your mail directory.
1400
1401See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1402for more information."
1403 :type 'string
23347d76 1404 :group 'mh-folder-selection
70a1d47e 1405 :package-version '(MH-E . "7.2"))
c26cf6c8 1406
dda00b2c
BW
1407;;; Identities (:group 'mh-identity)
1408
1409(eval-and-compile
1410 (unless (fboundp 'mh-identity-make-menu-no-autoload)
1411 (defun mh-identity-make-menu-no-autoload ()
1412 "Temporary definition.
1413Real definition will take effect when mh-identity is loaded."
1414 nil)))
1415
c90c4cf1 1416(defcustom-mh mh-identity-list nil
dda00b2c
BW
1417 "*List of identities.
1418
1419To customize this option, click on the \"INS\" button and enter a label
1420such as \"Home\" or \"Work\". Then click on the \"INS\" button with the
1421label \"Add at least one item below\". Then choose one of the items in
1422the \"Value Menu\".
1423
1424You can specify an alternate \"From:\" header field using the \"From
1425Field\" menu item. You must include a valid email address. A standard
1426format is \"First Last <login@@host.domain>\". If you use an initial
1427with a period, then you must quote your name as in '\"First I. Last\"
1428<login@@host.domain>'. People usually list the name of the company
1429where they work using the \"Organization Field\" menu item. Set any
1430arbitrary header field and value in the \"Other Field\" menu item.
1431Unless the header field is a standard one, precede the name of your
1432field's label with \"X-\", as in \"X-Fruit-of-the-Day:\". The value of
1433\"Attribution Verb\" overrides the setting of
1434`mh-extract-from-attribution-verb'. Set your signature with the
1435\"Signature\" menu item. You can specify the contents of
1436`mh-signature-file-name', a file, or a function. Specify a different
1437key to sign or encrypt messages with the \"GPG Key ID\" menu item.
1438
1439You can select the identities you have added via the menu called
1440\"Identity\" in the MH-Letter buffer. You can also use
1441\\[mh-insert-identity]. To clear the fields and signature added by the
1442identity, select the \"None\" identity.
1443
1444The \"Identity\" menu contains two other items to save you from having
1445to set the identity on every message. The menu item \"Set Default for
1446Session\" can be used to set the default identity to the current
1447identity until you exit Emacs. The menu item \"Save as Default\" sets
1448the option `mh-identity-default' to the current identity setting. You
1449can also customize the `mh-identity-default' option in the usual
1450fashion."
1451 :type '(repeat (list :tag ""
1452 (string :tag "Label")
1453 (repeat :tag "Add at least one item below"
1454 (choice
1455 (cons :tag "From Field"
1456 (const "From")
1457 (string :tag "Value"))
1458 (cons :tag "Organization Field"
1459 (const "Organization")
1460 (string :tag "Value"))
1461 (cons :tag "Other Field"
1462 (string :tag "Field")
1463 (string :tag "Value"))
1464 (cons :tag "Attribution Verb"
1465 (const ":attribution-verb")
1466 (string :tag "Value"))
1467 (cons :tag "Signature"
1468 (const :tag "Signature"
1469 ":signature")
1470 (choice
1471 (const :tag "mh-signature-file-name"
1472 nil)
1473 (file)
1474 (function)))
1475 (cons :tag "GPG Key ID"
1476 (const :tag "GPG Key ID"
1477 ":pgg-default-user-id")
1478 (string :tag "Value"))))))
1479 :set (lambda (symbol value)
1480 (set-default symbol value)
1481 (mh-identity-make-menu-no-autoload))
23347d76 1482 :group 'mh-identity
70a1d47e 1483 :package-version '(MH-E . "7.1"))
dda00b2c 1484
c90c4cf1 1485(defcustom-mh mh-auto-fields-list nil
dda00b2c
BW
1486 "List of recipients for which header lines are automatically inserted.
1487
1488This option can be used to set the identity depending on the
1489recipient. To customize this option, click on the \"INS\" button and
1490enter a regular expression for the recipient's address. Click on the
1491\"INS\" button with the \"Add at least one item below\" label. Then choose
1492one of the items in the \"Value Menu\".
1493
1494The \"Identity\" menu item is used to select an identity from those
1495configured in `mh-identity-list'. All of the information for that
1496identity will be added if the recipient matches. The \"Fcc Field\" menu
1497item is used to select a folder that is used in the \"Fcc:\" header.
1498When you send the message, MH will put a copy of your message in this
1499folder. The \"Mail-Followup-To Field\" menu item is used to insert an
1500\"Mail-Followup-To:\" header field with the recipients you provide. If
1501the recipient's mail user agent supports this header field (as nmh
1502does), then their replies will go to the addresses listed. This is
1503useful if their replies go both to the list and to you and you don't
1504have a mechanism to suppress duplicates. If you reply to someone not
1505on the list, you must either remove the \"Mail-Followup-To:\" field, or
1506ensure the recipient is also listed there so that he receives replies
1507to your reply. Other header fields may be added using the \"Other
1508Field\" menu item.
1509
1510These fields can only be added after the recipient is known. Once the
1511header contains one or more recipients, run the
1512\\[mh-insert-auto-fields] command or choose the \"Identity -> Insert
1513Auto Fields\" menu item to insert these fields manually. However, you
1514can just send the message and the fields will be added automatically.
1515You are given a chance to see these fields and to confirm them before
1516the message is actually sent. You can do away with this confirmation
1517by turning off the option `mh-auto-fields-prompt-flag'.
1518
1519You should avoid using the same header field in `mh-auto-fields-list'
1520and `mh-identity-list' definitions that may apply to the same message
1521as the result is undefined."
1522 :type `(repeat
1523 (list :tag ""
1524 (string :tag "Recipient")
1525 (repeat :tag "Add at least one item below"
1526 (choice
1527 (cons :tag "Identity"
1528 (const ":identity")
1529 ,(append
1530 '(radio)
1531 (mapcar
1532 (function (lambda (arg) `(const ,arg)))
1533 (mapcar 'car mh-identity-list))))
1534 (cons :tag "Fcc Field"
1535 (const "fcc")
1536 (string :tag "Value"))
1537 (cons :tag "Mail-Followup-To Field"
1538 (const "Mail-Followup-To")
1539 (string :tag "Value"))
1540 (cons :tag "Other Field"
1541 (string :tag "Field")
1542 (string :tag "Value"))))))
23347d76 1543 :group 'mh-identity
70a1d47e 1544 :package-version '(MH-E . "7.3"))
dda00b2c 1545
c90c4cf1 1546(defcustom-mh mh-auto-fields-prompt-flag t
dda00b2c
BW
1547 "*Non-nil means to prompt before sending if fields inserted.
1548See `mh-auto-fields-list'."
1549 :type 'boolean
23347d76 1550 :group 'mh-identity
70a1d47e 1551 :package-version '(MH-E . "8.0"))
dda00b2c 1552
c90c4cf1 1553(defcustom-mh mh-identity-default nil
dda00b2c
BW
1554 "Default identity to use when `mh-letter-mode' is called.
1555See `mh-identity-list'."
1556 :type (append
1557 '(radio)
1558 (cons '(const :tag "None" nil)
1559 (mapcar (function (lambda (arg) `(const ,arg)))
1560 (mapcar 'car mh-identity-list))))
23347d76 1561 :group 'mh-identity
70a1d47e 1562 :package-version '(MH-E . "7.1"))
dda00b2c 1563
c90c4cf1 1564(defcustom-mh mh-identity-handlers
dda00b2c
BW
1565 '(("From" . mh-identity-handler-top)
1566 (":default" . mh-identity-handler-bottom)
1567 (":attribution-verb" . mh-identity-handler-attribution-verb)
1568 (":signature" . mh-identity-handler-signature)
1569 (":pgg-default-user-id" . mh-identity-handler-gpg-identity))
1570 "Handler functions for fields in `mh-identity-list'.
1571
1572This option is used to change the way that fields, signatures,
1573and attributions in `mh-identity-list' are added. To customize
1574`mh-identity-handlers', replace the name of an existing handler
1575function associated with the field you want to change with the
1576name of a function you have written. You can also click on an
1577\"INS\" button and insert a field of your choice and the name of
1578the function you have written to handle it.
1579
1580The \"Field\" field can be any field that you've used in your
1581`mh-identity-list'. The special fields \":attribution-verb\",
1582\":signature\", or \":pgg-default-user-id\" are used for the
1583`mh-identity-list' choices \"Attribution Verb\", \"Signature\", and
1584\"GPG Key ID\" respectively.
1585
1586The handler associated with the \":default\" field is used when no
1587other field matches.
1588
1589The handler functions are passed two or three arguments: the
1590FIELD itself (for example, \"From\"), or one of the special
1591fields (for example, \":signature\"), and the ACTION 'remove or
1592'add. If the action is 'add, an additional argument
1593containing the VALUE for the field is given."
1594 :type '(repeat (cons (string :tag "Field") function))
23347d76 1595 :group 'mh-identity
70a1d47e 1596 :package-version '(MH-E . "8.0"))
dda00b2c
BW
1597
1598;;; Incorporating Your Mail (:group 'mh-inc)
1599
c90c4cf1 1600(defcustom-mh mh-inc-prog "inc"
dda00b2c
BW
1601 "*Program to incorporate new mail into a folder.
1602
1603This program generates a one-line summary for each of the new
1604messages. Unless it is an absolute pathname, the file is assumed
1605to be in the `mh-progs' directory. You may also link a file to
1606\"inc\" that uses a different format. You'll then need to modify
1607several scan line format variables appropriately."
1608 :type 'string
23347d76 1609 :group 'mh-inc
70a1d47e 1610 :package-version '(MH-E . "6.0"))
dda00b2c
BW
1611
1612(eval-and-compile
1613 (unless (fboundp 'mh-inc-spool-make-no-autoload)
1614 (defun mh-inc-spool-make-no-autoload ()
1615 "Temporary definition.
1616Real definition will take effect when mh-inc is loaded."
1617 nil)))
1618
c90c4cf1 1619(defcustom-mh mh-inc-spool-list nil
dda00b2c
BW
1620 "*Alternate spool files.
1621
1622You can use the `mh-inc-spool-list' variable to direct MH-E to
1623retrieve mail from arbitrary spool files other than your system
1624mailbox, file it in folders other than your \"+inbox\", and assign
1625key bindings to incorporate this mail.
1626
1627Suppose you are subscribed to the \"mh-e-devel\" mailing list and
1628you use \"procmail\" to filter this mail into \"~/mail/mh-e\" with
1629the following recipe in \".procmailrc\":
1630
1631 MAILDIR=$HOME/mail
1632 :0:
1633 * ^From mh-e-devel-admin@stop.mail-abuse.org
1634 mh-e
1635
1636In order to incorporate \"~/mail/mh-e\" into \"+mh-e\" with an
1637\"I m\" (mh-inc-spool-mh-e) command, customize this option, and click
1638on the \"INS\" button. Enter a \"Spool File\" of \"~/mail/mh-e\", a
1639\"Folder\" of \"mh-e\", and a \"Key Binding\" of \"m\".
1640
1641You can use \"xbuffy\" to automate the incorporation of this mail
dc4d94d5 1642using the Emacs 22 command \"emacsclient\" as follows:
dda00b2c
BW
1643
1644 box ~/mail/mh-e
1645 title mh-e
1646 origMode
1647 polltime 10
1648 headertime 0
dc4d94d5
BW
1649 command emacsclient --eval '(mh-inc-spool-mh-e)'
1650
1651In XEmacs, the command \"gnuclient\" is used in a similar
1652fashion."
dda00b2c
BW
1653 :type '(repeat (list (file :tag "Spool File")
1654 (string :tag "Folder")
1655 (character :tag "Key Binding")))
1656 :set (lambda (symbol value)
1657 (set-default symbol value)
1658 (mh-inc-spool-make-no-autoload))
23347d76 1659 :group 'mh-inc
70a1d47e 1660 :package-version '(MH-E . "7.3"))
dda00b2c
BW
1661
1662;;; Dealing with Junk Mail (:group 'mh-junk)
1663
1664(defvar mh-junk-choice nil
1665 "Chosen spam fighting program.")
1666
1667;; Available spam filter interfaces
1668(defvar mh-junk-function-alist
1669 '((spamassassin mh-spamassassin-blacklist mh-spamassassin-whitelist)
1670 (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist)
1671 (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist))
1672 "Available choices of spam programs to use.
1673
1674This is an alist. For each element there are functions that
1675blacklist a message as spam and whitelist a message incorrectly
1676classified as spam.")
1677
1678(defun mh-junk-choose (symbol value)
1679 "Choose spam program to use.
1680
1681The function is always called with SYMBOL bound to
1682`mh-junk-program' and VALUE bound to the new value of
1683`mh-junk-program'. The function sets the variable
1684`mh-junk-choice' in addition to `mh-junk-program'."
1685 (set symbol value) ;XXX shouldn't this be set-default?
1686 (setq mh-junk-choice
1687 (or value
1688 (loop for element in mh-junk-function-alist
1689 until (executable-find (symbol-name (car element)))
1690 finally return (car element)))))
1691
c90c4cf1 1692(defcustom-mh mh-junk-background nil
dda00b2c
BW
1693 "If on, spam programs are run in background.
1694
1695By default, the programs are run in the foreground, but this can
1696be slow when junking large numbers of messages. If you have
1697enough memory or don't junk that many messages at the same time,
1a9aa7df
BW
1698you might try turning on this option.
1699
1700Note that this option is used as the \"display\" argument in the
1701call to `call-process'. Therefore, turning on this option means
1702setting its value to \"0\". You can also set its value to t to
1703direct the programs' output to the \"*MH-E Log*\" buffer; this
1704may be useful for debugging."
dda00b2c
BW
1705 :type '(choice (const :tag "Off" nil)
1706 (const :tag "On" 0))
23347d76 1707 :group 'mh-junk
70a1d47e 1708 :package-version '(MH-E . "8.0"))
dda00b2c 1709
c90c4cf1 1710(defcustom-mh mh-junk-disposition nil
dda00b2c
BW
1711 "Disposition of junk mail."
1712 :type '(choice (const :tag "Delete Spam" nil)
1713 (string :tag "Spam Folder"))
23347d76 1714 :group 'mh-junk
70a1d47e 1715 :package-version '(MH-E . "8.0"))
dda00b2c 1716
c90c4cf1 1717(defcustom-mh mh-junk-program nil
dda00b2c
BW
1718 "Spam program that MH-E should use.
1719
1720The default setting of this option is \"Auto-detect\" which means
1721that MH-E will automatically choose one of SpamAssassin,
1722bogofilter, or SpamProbe in that order. If, for example, you have
1723both SpamAssassin and bogofilter installed and you want to use
1724bogofilter, then you can set this option to \"Bogofilter\"."
1725 :type '(choice (const :tag "Auto-detect" nil)
1726 (const :tag "SpamAssassin" spamassassin)
1727 (const :tag "Bogofilter" bogofilter)
1728 (const :tag "SpamProbe" spamprobe))
1729 :set 'mh-junk-choose
23347d76 1730 :group 'mh-junk
70a1d47e 1731 :package-version '(MH-E . "7.3"))
dda00b2c
BW
1732
1733;;; Editing a Draft (:group 'mh-letter)
1734
c90c4cf1 1735(defcustom-mh mh-compose-insertion (if (locate-library "mml") 'mml 'mh)
dda00b2c
BW
1736 "Type of tags used when composing MIME messages.
1737
1738In addition to MH-style directives, MH-E also supports MML (MIME
1739Meta Language) tags. (see Info node `(emacs-mime)Composing').
1740This option can be used to choose between them. By default, this
1741option is set to \"MML\" if it is supported since it provides a
1742lot more functionality. This option can also be set to \"MH\" if
1743MH-style directives are preferred."
1744 :type '(choice (const :tag "MML" mml)
1745 (const :tag "MH" mh))
23347d76 1746 :group 'mh-letter
70a1d47e 1747 :package-version '(MH-E . "7.0"))
dda00b2c 1748
c90c4cf1 1749(defcustom-mh mh-compose-skipped-header-fields
dda00b2c
BW
1750 '("From" "Organization" "References" "In-Reply-To"
1751 "X-Face" "Face" "X-Image-URL" "X-Mailer")
1752 "List of header fields to skip over when navigating in draft."
1753 :type '(repeat (string :tag "Field"))
23347d76 1754 :group 'mh-letter
70a1d47e 1755 :package-version '(MH-E . "7.4"))
dda00b2c 1756
c90c4cf1 1757(defcustom-mh mh-compose-space-does-completion-flag nil
dda00b2c
BW
1758 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header."
1759 :type 'boolean
23347d76 1760 :group 'mh-letter
70a1d47e 1761 :package-version '(MH-E . "7.4"))
dda00b2c 1762
c90c4cf1 1763(defcustom-mh mh-delete-yanked-msg-window-flag nil
dda00b2c
BW
1764 "*Non-nil means delete any window displaying the message.
1765
1766This deletes the window containing the original message after
1767yanking it with \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make
1768more room on your screen for your reply."
1769 :type 'boolean
23347d76 1770 :group 'mh-letter
70a1d47e 1771 :package-version '(MH-E . "7.0"))
dda00b2c 1772
c90c4cf1 1773(defcustom-mh mh-extract-from-attribution-verb "wrote:"
dda00b2c
BW
1774 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1775
1776The attribution consists of the sender's name and email address
1777followed by the content of this option. This option can be set to
1778\"wrote:\", \"a écrit:\", and \"schrieb:\". You can also use the
1779\"Custom String\" menu item to enter your own verb."
1780 :type '(choice (const "wrote:")
1781 (const "a écrit:")
1782 (const "schrieb:")
1783 (string :tag "Custom String"))
23347d76 1784 :group 'mh-letter
70a1d47e 1785 :package-version '(MH-E . "7.0"))
dda00b2c 1786
c90c4cf1 1787(defcustom-mh mh-ins-buf-prefix "> "
dda00b2c
BW
1788 "*String to put before each line of a yanked or inserted message.
1789
1790The prefix \"> \" is the default setting of this option. I
1791suggest that you not modify this option since it is used by many
1792mailers and news readers: messages are far easier to read if
1793several included messages have all been indented by the same
1794string.
1795
1796This prefix is not inserted if you use one of the supercite
1797flavors of `mh-yank-behavior' or you have added a
1798`mail-citation-hook'."
1799 :type 'string
23347d76 1800 :group 'mh-letter
70a1d47e 1801 :package-version '(MH-E . "6.0"))
dda00b2c 1802
c90c4cf1 1803(defcustom-mh mh-letter-complete-function 'ispell-complete-word
dda00b2c
BW
1804 "*Function to call when completing outside of address or folder fields.
1805
1806In the body of the message,
1807\\<mh-letter-mode-map>\\[mh-letter-complete] runs this function,
1808which is set to \"ispell-complete-word\" by default."
1809 :type '(choice function (const nil))
23347d76 1810 :group 'mh-letter
70a1d47e 1811 :package-version '(MH-E . "7.1"))
dda00b2c 1812
c90c4cf1 1813(defcustom-mh mh-letter-fill-column 72
dda00b2c
BW
1814 "*Fill column to use in MH Letter mode.
1815
1816By default, this option is 72 to allow others to quote your
1817message without line wrapping."
1818 :type 'integer
23347d76 1819 :group 'mh-letter
70a1d47e 1820 :package-version '(MH-E . "6.0"))
dda00b2c 1821
c90c4cf1 1822(defcustom-mh mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none")
dda00b2c
BW
1823 "Default method to use in security tags.
1824
1825This option is used to select between a variety of mail security
1826mechanisms. The default is \"PGP (MIME)\" if it is supported\;
1827otherwise, the default is \"None\". Other mechanisms include
1828vanilla \"PGP\" and \"S/MIME\".
1829
1830The `pgg' customization group may have some settings which may
1831interest you (see Info node `(pgg)').
1832
1833In particular, I turn on the option `pgg-encrypt-for-me' so that
1834all messages I encrypt are encrypted with my public key as well.
1835If you keep a copy of all of your outgoing mail with a \"Fcc:\"
1836header field, this setting is vital so that you can read the mail
1837you write!"
1838 :type '(choice (const :tag "PGP (MIME)" "pgpmime")
1839 (const :tag "PGP" "pgp")
1840 (const :tag "S/MIME" "smime")
1841 (const :tag "None" "none"))
23347d76 1842 :group 'mh-letter
70a1d47e 1843 :package-version '(MH-E . "8.0"))
dda00b2c 1844
c90c4cf1 1845(defcustom-mh mh-signature-file-name "~/.signature"
dda00b2c
BW
1846 "*Source of user's signature.
1847
1848By default, the text of your signature is taken from the file
1849\"~/.signature\". You can read from other sources by changing this
1850option. This file may contain a vCard in which case an attachment is
1851added with the vCard.
1852
1853This option may also be a symbol, in which case that function is
1854called. You may not want a signature separator to be added for you;
1855instead you may want to insert one yourself. Options that you may find
1856useful to do this include `mh-signature-separator' (when inserting a
1857signature separator) and `mh-signature-separator-regexp' (for finding
1858said separator). The function `mh-signature-separator-p', which
1859reports t if the buffer contains a separator, may be useful as well.
1860
1861The signature is inserted into your message with the command
1862\\<mh-letter-mode-map>\\[mh-insert-signature] or with the option
1863`mh-identity-list'."
1864 :type 'file
23347d76 1865 :group 'mh-letter
70a1d47e 1866 :package-version '(MH-E . "6.0"))
dda00b2c 1867
c90c4cf1 1868(defcustom-mh mh-signature-separator-flag t
dda00b2c
BW
1869 "*Non-nil means a signature separator should be inserted.
1870
1871It is not recommended that you change this option since various
1872mail user agents, including MH-E, use the separator to present
1873the signature differently, and to suppress the signature when
1874replying or yanking a letter into a draft."
1875 :type 'boolean
23347d76 1876 :group 'mh-letter
70a1d47e 1877 :package-version '(MH-E . "8.0"))
dda00b2c 1878
c90c4cf1 1879(defcustom-mh mh-x-face-file "~/.face"
dda00b2c
BW
1880 "*File containing face header field to insert in outgoing mail.
1881
1882If the file starts with either of the strings \"X-Face:\", \"Face:\"
1883or \"X-Image-URL:\" then the contents are added to the message header
1884verbatim. Otherwise it is assumed that the file contains the value of
1885the \"X-Face:\" header field.
1886
1887The \"X-Face:\" header field, which is a low-resolution, black and
1888white image, can be generated using the \"compface\" command (see URL
1889`ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). The
1890\"Online X-Face Converter\" is a useful resource for quick conversion
1891of images into \"X-Face:\" header fields (see URL
1892`http://www.dairiki.org/xface/').
1893
1894Use the \"make-face\" script to convert a JPEG image to the higher
1895resolution, color, \"Face:\" header field (see URL
1896`http://quimby.gnus.org/circus/face/make-face').
1897
1898The URL of any image can be used for the \"X-Image-URL:\" field and no
1899processing of the image is required.
1900
1901To prevent the setting of any of these header fields, either set
1902`mh-x-face-file' to nil, or simply ensure that the file defined by
1903this option doesn't exist."
1904 :type 'file
23347d76 1905 :group 'mh-letter
70a1d47e 1906 :package-version '(MH-E . "7.0"))
dda00b2c 1907
c90c4cf1 1908(defcustom-mh mh-yank-behavior 'attribution
dda00b2c
BW
1909 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1910
1911To include the entire message, including the entire header, use
1912\"Body and Header\". Use \"Body\" to yank just the body without
1913the header. To yank only the portion of the message following the
1914point, set this option to \"Below Point\".
1915
1916Choose \"Invoke supercite\" to pass the entire message and header
1917through supercite.
1918
1919If the \"Body With Attribution\" setting is used, then the
1920message minus the header is yanked and a simple attribution line
1921is added at the top using the value of the option
1922`mh-extract-from-attribution-verb'. This is the default.
1923
1924If the \"Invoke supercite\" or \"Body With Attribution\" settings
1925are used, the \"-noformat\" argument is passed to the \"repl\"
1926program to override a \"-filter\" or \"-format\" argument. These
1927settings also have \"Automatically\" variants that perform the
1928action automatically when you reply so that you don't need to use
1929\\[mh-yank-cur-msg] at all. Note that this automatic action is
1930only performed if the show buffer matches the message being
1931replied to. People who use the automatic variants tend to turn on
1932the option `mh-delete-yanked-msg-window-flag' as well so that the
1933show window is never displayed.
1934
1935If the show buffer has a region, the option `mh-yank-behavior' is
1936ignored unless its value is one of Attribution variants in which
1937case the attribution is added to the yanked region.
1938
1939If this option is set to one of the supercite flavors, the hook
1940`mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not
1941inserted."
1942 :type '(choice (const :tag "Body and Header" t)
1943 (const :tag "Body" body)
1944 (const :tag "Below Point" nil)
1945 (const :tag "Invoke supercite" supercite)
1946 (const :tag "Invoke supercite, Automatically" autosupercite)
1947 (const :tag "Body With Attribution" attribution)
1948 (const :tag "Body With Attribution, Automatically"
1949 autoattrib))
23347d76 1950 :group 'mh-letter
70a1d47e 1951 :package-version '(MH-E . "8.0"))
dda00b2c
BW
1952
1953;;; Ranges (:group 'mh-ranges)
1954
c90c4cf1 1955(defcustom-mh mh-interpret-number-as-range-flag t
dda00b2c
BW
1956 "*Non-nil means interpret a number as a range.
1957
1958Since one of the most frequent ranges used is \"last:N\", MH-E
1959will interpret input such as \"200\" as \"last:200\" if this
1960option is on (which is the default). If you need to scan just the
1961message 200, then use the range \"200:200\"."
1962 :type 'boolean
23347d76 1963 :group 'mh-ranges
70a1d47e 1964 :package-version '(MH-E . "7.4"))
dda00b2c
BW
1965
1966;;; Scan Line Formats (:group 'mh-scan-line-formats)
1967
1968(eval-and-compile
1969 (unless (fboundp 'mh-adaptive-cmd-note-flag-check)
1970 (defun mh-adaptive-cmd-note-flag-check (symbol value)
1971 "Temporary definition.
1972Real definition, below, uses variables that aren't defined yet."
1973 (set-default symbol value))))
1974
c90c4cf1 1975(defcustom-mh mh-adaptive-cmd-note-flag t
dda00b2c
BW
1976 "*Non-nil means that the message number width is determined dynamically.
1977
1978If you've created your own format to handle long message numbers,
1979you'll be pleased to know you no longer need it since MH-E adapts its
1980internal format based upon the largest message number if this option
1981is on (the default). This option may only be turned on when
1982`mh-scan-format-file' is set to \"Use MH-E scan Format\".
1983
1984If you prefer fixed-width message numbers, turn off this option and
1985call `mh-set-cmd-note' with the width specified by your format file
1986\(see `mh-scan-format-file'). For example, the default width is 4, so
1987you would use \"(mh-set-cmd-note 4)\"."
1988 :type 'boolean
1989 :group 'mh-scan-line-formats
23347d76 1990 :set 'mh-adaptive-cmd-note-flag-check
70a1d47e 1991 :package-version '(MH-E . "7.0"))
dda00b2c
BW
1992
1993(defun mh-scan-format-file-check (symbol value)
cb5bf6ba 1994 "Check if desired setting is valid.
dda00b2c
BW
1995Throw an error if user tries to set `mh-scan-format-file' to
1996anything but t when `mh-adaptive-cmd-note-flag' is on. Otherwise,
1997set SYMBOL to VALUE."
1998 (if (and (not (eq value t))
fd61b9ab 1999 mh-adaptive-cmd-note-flag)
dda00b2c
BW
2000 (error "%s %s" "You must turn off `mh-adaptive-cmd-note-flag'"
2001 "unless you use \"Use MH-E scan Format\"")
2002 (set-default symbol value)))
2003
c90c4cf1 2004(defcustom-mh mh-scan-format-file t
dda00b2c
BW
2005 "Specifies the format file to pass to the scan program.
2006
2007The default setting for this option is \"Use MH-E scan Format\". This
2008means that the format string will be taken from the either
2009`mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or
efa47761 2010nmh (or GNU mailutils MH) is in use. This setting also enables you to
dda00b2c
BW
2011turn on the `mh-adaptive-cmd-note-flag' option.
2012
2013You can also set this option to \"Use Default scan Format\" to get the
2014same output as you would get if you ran \"scan\" from the shell. If
2015you have a format file that you want MH-E to use but not MH, you can
2016set this option to \"Specify a scan Format File\" and enter the name
2017of your format file.
2018
2019If you change the format of the scan lines you'll need to tell MH-E
2020how to parse the new format. As you will see, quite a lot of variables
2021are involved to do that. Use \"\\[apropos] RET mh-scan.*regexp\" to
2022obtain a list of these variables. You will also have to call
2023`mh-set-cmd-note' if your notations are not in column 4 (columns in
2024Emacs start with 0)."
2025 :type '(choice (const :tag "Use MH-E scan Format" t)
2026 (const :tag "Use Default scan Format" nil)
2027 (file :tag "Specify a scan Format File"))
2028 :group 'mh-scan-line-formats
23347d76 2029 :set 'mh-scan-format-file-check
70a1d47e 2030 :package-version '(MH-E . "6.0"))
dda00b2c
BW
2031
2032(defun mh-adaptive-cmd-note-flag-check (symbol value)
cb5bf6ba 2033 "Check if desired setting is valid.
dda00b2c
BW
2034Throw an error if user tries to turn on
2035`mh-adaptive-cmd-note-flag' when `mh-scan-format-file' isn't t.
2036Otherwise, set SYMBOL to VALUE."
2037 (if (and value
2038 (not (eq mh-scan-format-file t)))
2039 (error "%s %s" "Can't turn on unless `mh-scan-format-file'"
2040 "is set to \"Use MH-E scan Format\"")
2041 (set-default symbol value)))
2042
c90c4cf1 2043(defcustom-mh mh-scan-prog "scan"
dda00b2c
BW
2044 "*Program used to scan messages.
2045
2046The name of the program that generates a listing of one line per
2047message is held in this option. Unless this variable contains an
2048absolute pathname, it is assumed to be in the `mh-progs'
2049directory. You may link another program to `scan' (see
2050\"mh-profile(5)\") to produce a different type of listing."
2051 :type 'string
23347d76 2052 :group 'mh-scan-line-formats
70a1d47e 2053 :package-version '(MH-E . "6.0"))
dda00b2c
BW
2054(make-variable-buffer-local 'mh-scan-prog)
2055
dda00b2c
BW
2056;;; Searching (:group 'mh-search)
2057
c90c4cf1 2058(defcustom-mh mh-search-program nil
dda00b2c
BW
2059 "Search program that MH-E shall use.
2060
2061The default setting of this option is \"Auto-detect\" which means
2062that MH-E will automatically choose one of swish++, swish-e,
2063mairix, namazu, pick and grep in that order. If, for example, you
2064have both swish++ and mairix installed and you want to use
2065mairix, then you can set this option to \"mairix\".
2066
2067More information about setting up an indexing program to use with
2068MH-E can be found in the documentation of `mh-search'."
2069 :type '(choice (const :tag "Auto-detect" nil)
2070 (const :tag "swish++" swish++)
2071 (const :tag "swish-e" swish)
2072 (const :tag "mairix" mairix)
2073 (const :tag "namazu" namazu)
2074 (const :tag "pick" pick)
2075 (const :tag "grep" grep))
23347d76 2076 :group 'mh-search
70a1d47e 2077 :package-version '(MH-E . "8.0"))
dda00b2c
BW
2078
2079;;; Sending Mail (:group 'mh-sending-mail)
2080
c90c4cf1 2081(defcustom-mh mh-compose-forward-as-mime-flag t
dda00b2c
BW
2082 "*Non-nil means that messages are forwarded as attachments.
2083
2084By default, this option is on which means that the forwarded
2085messages are included as attachments. If you would prefer to
2086forward your messages verbatim (as text, inline), then turn off
2087this option. Forwarding messages verbatim works well for short,
2088textual messages, but your recipient won't be able to view any
2089non-textual attachments that were in the forwarded message. Be
2090aware that if you have \"forw: -mime\" in your MH profile, then
2091forwarded messages will always be included as attachments
2092regardless of the settings of this option."
2093 :type 'boolean
23347d76 2094 :group 'mh-sending-mail
70a1d47e 2095 :package-version '(MH-E . "8.0"))
dda00b2c 2096
c90c4cf1 2097(defcustom-mh mh-compose-letter-function nil
dda00b2c
BW
2098 "Invoked when starting a new draft.
2099
2100However, it is the last function called before you edit your
2101message. The consequence of this is that you can write a function
2102to write and send the message for you. This function is passed
2103three arguments: the contents of the TO, SUBJECT, and CC header
2104fields."
2105 :type '(choice (const nil) function)
23347d76 2106 :group 'mh-sending-mail
70a1d47e 2107 :package-version '(MH-E . "6.0"))
dda00b2c 2108
c90c4cf1 2109(defcustom-mh mh-compose-prompt-flag nil
dda00b2c
BW
2110 "*Non-nil means prompt for header fields when composing a new draft."
2111 :type 'boolean
23347d76 2112 :group 'mh-sending-mail
70a1d47e 2113 :package-version '(MH-E . "7.4"))
dda00b2c 2114
c90c4cf1 2115(defcustom-mh mh-forward-subject-format "%s: %s"
dda00b2c
BW
2116 "*Format string for forwarded message subject.
2117
2118This option is a string which includes two escapes (\"%s\"). The
2119first \"%s\" is replaced with the sender of the original message,
2120and the second one is replaced with the original \"Subject:\"."
2121 :type 'string
23347d76 2122 :group 'mh-sending-mail
70a1d47e 2123 :package-version '(MH-E . "6.0"))
dda00b2c 2124
c90c4cf1 2125(defcustom-mh mh-insert-x-mailer-flag t
dda00b2c
BW
2126 "*Non-nil means append an \"X-Mailer:\" header field to the header.
2127
2128This header field includes the version of MH-E and Emacs that you
2129are using. If you don't want to participate in our marketing, you
2130can turn this option off."
2131 :type 'boolean
23347d76 2132 :group 'mh-sending-mail
70a1d47e 2133 :package-version '(MH-E . "7.0"))
dda00b2c 2134
c90c4cf1 2135(defcustom-mh mh-redist-full-contents-flag nil
dda00b2c
BW
2136 "*Non-nil means the \"dist\" command needs entire letter for redistribution.
2137
2138This option must be turned on if \"dist\" requires the whole
2139letter for redistribution, which is the case if \"send\" is
2140compiled with the BERK option (which many people abhor). If you
2141find that MH will not allow you to redistribute a message that
2142has been redistributed before, turn off this option."
2143 :type 'boolean
23347d76 2144 :group 'mh-sending-mail
70a1d47e 2145 :package-version '(MH-E . "8.0"))
dda00b2c 2146
c90c4cf1 2147(defcustom-mh mh-reply-default-reply-to nil
dda00b2c
BW
2148 "*Sets the person or persons to whom a reply will be sent.
2149
2150This option is set to \"Prompt\" by default so that you are
2151prompted for the recipient of a reply. If you find that most of
2152the time that you specify \"cc\" when you reply to a message, set
2153this option to \"cc\". Other choices include \"from\", \"to\", or
2154\"all\". You can always edit the recipients in the draft."
2155 :type '(choice (const :tag "Prompt" nil)
2156 (const "from")
2157 (const "to")
2158 (const "cc")
2159 (const "all"))
23347d76 2160 :group 'mh-sending-mail
70a1d47e 2161 :package-version '(MH-E . "6.0"))
dda00b2c 2162
c90c4cf1 2163(defcustom-mh mh-reply-show-message-flag t
dda00b2c
BW
2164 "*Non-nil means the MH-Show buffer is displayed when replying.
2165
2166If you include the message automatically, you can hide the
2167MH-Show buffer by turning off this option.
2168
2169See also `mh-reply'."
2170 :type 'boolean
23347d76 2171 :group 'mh-sending-mail
70a1d47e 2172 :package-version '(MH-E . "7.0"))
dda00b2c
BW
2173
2174;;; Sequences (:group 'mh-sequences)
2175
2176;; If `mh-unpropagated-sequences' becomes a defcustom, add the following to
2177;; the docstring: "Additional sequences that should not to be preserved can be
2178;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
2179
c90c4cf1 2180(defcustom-mh mh-refile-preserves-sequences-flag t
dda00b2c
BW
2181 "*Non-nil means that sequences are preserved when messages are refiled.
2182
2183If a message is in any sequence (except \"Previous-Sequence:\"
2184and \"cur\") when it is refiled, then it will still be in those
2185sequences in the destination folder. If this behavior is not
2186desired, then turn off this option."
2187 :type 'boolean
23347d76 2188 :group 'mh-sequences
70a1d47e 2189 :package-version '(MH-E . "7.4"))
dda00b2c 2190
c90c4cf1 2191(defcustom-mh mh-tick-seq 'tick
dda00b2c
BW
2192 "The name of the MH sequence for ticked messages.
2193
2194You can customize this option if you already use the \"tick\"
2195sequence for your own use. You can also disable all of the
2196ticking functions by choosing the \"Disable Ticking\" item but
2197there isn't much advantage to that."
2198 :type '(choice (const :tag "Disable Ticking" nil)
2199 symbol)
23347d76 2200 :group 'mh-sequences
70a1d47e 2201 :package-version '(MH-E . "7.3"))
dda00b2c 2202
c90c4cf1 2203(defcustom-mh mh-update-sequences-after-mh-show-flag t
dda00b2c
BW
2204 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>.
2205
2206Three sequences are maintained internally by MH-E and pushed out
2207to MH when a message is shown. They include the sequence
2208specified by your \"Unseen-Sequence:\" profile entry, \"cur\",
2209and the sequence listed by the option `mh-tick-seq' which is
2210\"tick\" by default. If you do not like this behavior, turn off
2211this option. You can then update the state manually with the
2212\\[mh-execute-commands], \\[mh-quit], or \\[mh-update-sequences]
2213commands."
2214 :type 'boolean
23347d76 2215 :group 'mh-sequences
70a1d47e 2216 :package-version '(MH-E . "7.0"))
dda00b2c
BW
2217
2218;;; Reading Your Mail (:group 'mh-show)
2219
c90c4cf1 2220(defcustom-mh mh-bury-show-buffer-flag t
dda00b2c
BW
2221 "*Non-nil means show buffer is buried.
2222
2223One advantage of not burying the show buffer is that one can
2224delete the show buffer more easily in an electric buffer list
2225because of its proximity to its associated MH-Folder buffer. Try
2226running \\[electric-buffer-list] to see what I mean."
2227 :type 'boolean
23347d76 2228 :group 'mh-show
70a1d47e 2229 :package-version '(MH-E . "7.0"))
dda00b2c 2230
c90c4cf1 2231(defcustom-mh mh-clean-message-header-flag t
dda00b2c
BW
2232 "*Non-nil means remove extraneous header fields.
2233
2234See also `mh-invisible-header-fields-default' and
2235`mh-invisible-header-fields'."
2236 :type 'boolean
23347d76 2237 :group 'mh-show
70a1d47e 2238 :package-version '(MH-E . "7.0"))
dda00b2c 2239
c90c4cf1 2240(defcustom-mh mh-decode-mime-flag (not (not (locate-library "mm-decode")))
dda00b2c
BW
2241 "*Non-nil means attachments are handled\\<mh-folder-mode-map>.
2242
2243MH-E can handle attachments as well if the Gnus `mm-decode'
2244library is present. If so, this option will be on. Otherwise,
2245you'll see the MIME body parts rather than text or attachments.
2246There isn't much point in turning off this option; however, you
2247can inspect it if it appears that the body parts are not being
2248interpreted correctly or toggle it with the command
2249\\[mh-toggle-mh-decode-mime-flag] to view the raw message.
2250
2251This option also controls the display of quoted-printable
2252messages and other graphical widgets. See the options
2253`mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'."
2254 :type 'boolean
23347d76 2255 :group 'mh-show
70a1d47e 2256 :package-version '(MH-E . "7.0"))
dda00b2c 2257
c90c4cf1 2258(defcustom-mh mh-display-buttons-for-alternatives-flag nil
dda00b2c
BW
2259 "*Non-nil means display buttons for all alternative attachments.
2260
2261Sometimes, a mail program will produce multiple alternatives of
2262the attachment in increasing degree of faithfulness to the
2263original content. By default, only the preferred alternative is
2264displayed. If this option is on, then the preferred part is shown
2265inline and buttons are shown for each of the other alternatives."
2266 :type 'boolean
23347d76 2267 :group 'mh-show
70a1d47e 2268 :package-version '(MH-E . "7.4"))
dda00b2c 2269
c90c4cf1 2270(defcustom-mh mh-display-buttons-for-inline-parts-flag nil
dda00b2c
BW
2271 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>.
2272
2273The sender can request that attachments should be viewed inline so
2274that they do not really appear like an attachment at all to the
2275reader. Most of the time, this is desirable, so by default MH-E
2276suppresses the buttons for inline attachments. On the other hand, you
2277may receive code or HTML which the sender has added to his message as
2278inline attachments so that you can read them in MH-E. In this case, it
2279is useful to see the buttons so that you know you don't have to cut
2280and paste the code into a file; you can simply save the attachment.
2281
2282If you want to make the buttons visible for inline attachments, you
2283can use the command \\[mh-toggle-mime-buttons] to toggle the
2284visibility of these buttons. You can turn on these buttons permanently
2285by turning on this option.
2286
2287MH-E cannot display all attachments inline however. It can display
2288text (including HTML) and images."
2289 :type 'boolean
23347d76 2290 :group 'mh-show
70a1d47e 2291 :package-version '(MH-E . "7.0"))
dda00b2c 2292
c90c4cf1 2293(defcustom-mh mh-do-not-confirm-flag nil
dda00b2c
BW
2294 "*Non-nil means non-reversible commands do not prompt for confirmation.
2295
2296Commands such as `mh-pack-folder' prompt to confirm whether to
2297process outstanding moves and deletes or not before continuing.
2298Turning on this option means that these actions will be
2299performed--which is usually desired but cannot be
2300retracted--without question."
2301 :type 'boolean
23347d76 2302 :group 'mh-show
70a1d47e 2303 :package-version '(MH-E . "7.0"))
dda00b2c 2304
c90c4cf1 2305(defcustom-mh mh-fetch-x-image-url nil
dda00b2c
BW
2306 "*Control fetching of \"X-Image-URL:\" header field image.
2307
2308Ths option controls the fetching of the \"X-Image-URL:\" header
2309field image with the following values:
2310
2311Ask Before Fetching
2312 You are prompted before the image is fetched. MH-E will
2313 remember your reply and will either use the already fetched
2314 image the next time the same URL is encountered or silently
2315 skip it if you didn't fetch it the first time. This is a
2316 good setting.
2317
2318Never Fetch
2319 Images are never fetched and only displayed if they are
2320 already present in the cache. This is the default.
2321
2322There isn't a value of \"Always Fetch\" for privacy and DOS (denial of
2323service) reasons. For example, fetching a URL can tip off a spammer
2324that you've read his email (which is why you shouldn't blindly answer
2325yes if you've set this option to \"Ask Before Fetching\"). Someone may
2326also flood your network and fill your disk drive by sending a torrent
2327of messages, each specifying a unique URL to a very large file.
2328
2329The cache of images is found in the directory \".mhe-x-image-cache\"
2330within your MH directory. You can add your own face to the \"From:\"
2331field too. See Info node `(mh-e)Picture'.
2332
2333This setting only has effect if the option `mh-show-use-xface-flag' is
2334turned on."
2335
2336 :type '(choice (const :tag "Ask Before Fetching" ask)
2337 (const :tag "Never Fetch" nil))
23347d76 2338 :group 'mh-show
70a1d47e 2339 :package-version '(MH-E . "7.3"))
dda00b2c 2340
c90c4cf1 2341(defcustom-mh mh-graphical-smileys-flag t
dda00b2c
BW
2342 "*Non-nil means graphical smileys are displayed.
2343
2344It is a long standing custom to inject body language using a
2345cornucopia of punctuation, also known as the \"smileys\". MH-E
2346can render these as graphical widgets if this option is turned
2347on, which it is by default. Smileys include patterns such as :-)
2348and ;-).
2349
2350This option is disabled if the option `mh-decode-mime-flag' is
2351turned off."
2352 :type 'boolean
23347d76 2353 :group 'mh-show
70a1d47e 2354 :package-version '(MH-E . "7.0"))
dda00b2c 2355
c90c4cf1 2356(defcustom-mh mh-graphical-emphasis-flag t
dda00b2c
BW
2357 "*Non-nil means graphical emphasis is displayed.
2358
2359A few typesetting features are indicated in ASCII text with
2360certain characters. If your terminal supports it, MH-E can render
2361these typesetting directives naturally if this option is turned
2362on, which it is by default. For example, _underline_ will be
2363underlined, *bold* will appear in bold, /italics/ will appear in
2364italics, and so on. See the option `gnus-emphasis-alist' for the
2365whole list.
2366
2367This option is disabled if the option `mh-decode-mime-flag' is
2368turned off."
2369 :type 'boolean
23347d76 2370 :group 'mh-show
70a1d47e 2371 :package-version '(MH-E . "7.0"))
dda00b2c 2372
c90c4cf1 2373(defcustom-mh mh-highlight-citation-style 'gnus
dda00b2c
BW
2374 "Style for highlighting citations.
2375
2376If the sender of the message has cited other messages in his
2377message, then MH-E will highlight these citations to emphasize
2378the sender's actual response. This option can be customized to
2379change the highlighting style. The \"Multicolor\" method uses a
2380different color for each indentation while the \"Monochrome\"
2381method highlights all citations in red. To disable highlighting
2382of citations entirely, choose \"None\"."
2383 :type '(choice (const :tag "Multicolor" gnus)
2384 (const :tag "Monochrome" font-lock)
2385 (const :tag "None" nil))
23347d76 2386 :group 'mh-show
70a1d47e 2387 :package-version '(MH-E . "8.0"))
dda00b2c 2388
7911d1c8 2389;; These entries have been intentionally excluded by the developers.
c50115f1
JH
2390;; "Comments:" ; RFC 2822 - show this one
2391;; "Fax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2392;; "Mail-System-Version:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2393;; "Mailer:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
5cb66178 2394;; "Organization:" ;
c50115f1
JH
2395;; "Phone:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2396;; "Reply-By:" ; RFC 2156
2397;; "Reply-To:" ; RFC 2822
7911d1c8 2398;; "Sender:" ;
c50115f1 2399;; "User-Agent:" ; Similar to X-Mailer, so display it.
5cb66178 2400;; "X-Mailer:" ;
7911d1c8
BW
2401;; "X-Operator:" ; Similar to X-Mailer, so display it
2402
2403;; Keep fields alphabetized (set sort-fold-case to t first).
2404;; Mention source, if known.
dda00b2c 2405(defvar mh-invisible-header-fields-internal
c50115f1
JH
2406 '(
2407 "Abuse-Reports-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
7911d1c8
BW
2408 "Accept-Language:"
2409 "AcceptLanguage:"
4690fe3f 2410 "Accreditor:" ; Habeas
243256f8
JH
2411 "Also-Control:" ; H. Spencer: News Article Format and Transmission, June 1994
2412 "Alternate-recipient:" ; RFC 2156
2413 "Approved-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2414 "Approved:" ; RFC 1036
2415 "Article-Names:" ; H. Spencer: News Article Format and Transmission, June 1994
2416 "Article-Updates:" ; H. Spencer: News Article Format and Transmission, June 1994
2417 "Authentication-Results:"
2418 "Auto-forwarded:" ; RFC 2156
2419 "Autoforwarded:" ; RFC 2156
dda00b2c 2420 "Bestservhost:"
90404d5a 2421 "Bytes:"
243256f8 2422 "Cancel-Key:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2423 "Cancel-Lock:" ; NNTP posts
b6fd8984 2424 "Comment:" ; Shows up with DomainKeys
243256f8
JH
2425 "Content-" ; RFC 2045, 1123, 1766, 1864, 2045, 2110, 2156, 2183, 2912
2426 "Control:" ; RFC 1036
2427 "Conversion-With-Loss:" ; RFC 2156
2428 "Conversion:" ; RFC 2156
243256f8
JH
2429 "Delivered-To:" ; Egroups/yahoogroups mailing list manager
2430 "Delivery-Date:" ; RFC 2156
dda00b2c 2431 "Delivery:"
243256f8
JH
2432 "Discarded-X400-" ; RFC 2156
2433 "Disclose-Recipients:" ; RFC 2156
2434 "Disposition-Notification-Options:" ; RFC 2298
2435 "Disposition-Notification-To:" ; RFC 2298
2436 "Distribution:" ; RFC 1036
7911d1c8 2437 "DKIM-" ; http://antispam.yahoo.com/domainkeys
7911d1c8 2438 "DL-Expansion-History:" ; RFC 2156
243256f8 2439 "DomainKey-" ; http://antispam.yahoo.com/domainkeys
7911d1c8 2440 "DomainKey-Signature:"
243256f8 2441 "Encoding:" ; RFC 1505
dda00b2c 2442 "Envelope-to:"
243256f8
JH
2443 "Errors-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2444 "Expires:" ; RFC 1036
2445 "Expiry-Date:" ; RFC 2156
dda00b2c 2446 "Face:" ; Gnus Face header
243256f8
JH
2447 "Followup-To:" ; RFC 1036
2448 "For-Approval:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2449 "For-Comment:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
f6b1b0a8 2450 "For-Handling:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2451 "Forwarded:" ; MH
2452 "From " ; sendmail
243256f8
JH
2453 "Generate-Delivery-Report:" ; RFC 2156
2454 "Importance:" ; RFC 2156, 2421
2455 "In-Reply-To:" ; RFC 2822
2456 "Incomplete-Copy:" ; RFC 2156
2457 "Keywords:" ; RFC 2822
2458 "Language:" ; RFC 2156
2459 "Lines:" ; RFC 1036
2460 "List-" ; RFC 2369, 2919
2461 "Mail-Copies-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2462 "Mail-Followup-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2463 "Mail-from:" ; MH
7911d1c8 2464 "Mail-Reply-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
243256f8
JH
2465 "Mailing-List:" ; Egroups/yahoogroups mailing list manager
2466 "Message-Content:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2467 "Message-Id:" ; RFC 822
243256f8 2468 "Message-Type:" ; RFC 2156
dda00b2c 2469 "Mime-Version" ; RFC 2045
7911d1c8 2470 "Msgid:"
7911d1c8 2471 "NNTP-" ; News
243256f8 2472 "Obsoletes:" ; RFC 2156
dda00b2c 2473 "Old-Return-Path:"
243256f8
JH
2474 "OpenPGP:"
2475 "Original-Encoded-Information-Types:" ; RFC 2156
dda00b2c 2476 "Original-Lines:" ; mail to news
dda00b2c 2477 "Original-Newsgroups:" ; mail to news
7911d1c8 2478 "Original-NNTP-" ; mail to news
dda00b2c
BW
2479 "Original-Path:" ; mail to news
2480 "Original-Received:" ; mail to news
09e80d9f 2481 "Original-Recipient:" ; RFC 2298
dda00b2c
BW
2482 "Original-To:" ; mail to news
2483 "Original-X-" ; mail to news
243256f8
JH
2484 "Origination-Client:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2485 "Originator:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2486 "P1-Content-Type:" ; X400
2487 "P1-Message-Id:" ; X400
2488 "P1-Recipient:" ; X400
243256f8 2489 "Path:" ; RFC 1036
243256f8
JH
2490 "Pics-Label:" ; W3C
2491 "Posted-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2492 "Precedence:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2493 "Prev-Resent" ; MH
243256f8
JH
2494 "Prevent-NonDelivery-Report:" ; RFC 2156
2495 "Priority:" ; RFC 2156
2496 "Read-Receipt-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2497 "Received-SPF:" ; Gmail
243256f8
JH
2498 "Received:" ; RFC 822
2499 "References:" ; RFC 2822
2500 "Registered-Mail-Reply-Requested-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2501 "Remailed-" ; MH
243256f8 2502 "Replaces:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2503 "Replied:" ; MH
243256f8 2504 "Resent-" ; RFC 2822
dda00b2c 2505 "Return-Path:" ; RFC 822
243256f8
JH
2506 "Return-Receipt-Requested:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2507 "Return-Receipt-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
4690fe3f 2508 "Seal-Send-Time:"
7911d1c8 2509 "See-Also:" ; H. Spencer: News Article Format and Transmission, June 1994
243256f8
JH
2510 "Sensitivity:" ; RFC 2156, 2421
2511 "Speach-Act:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2512 "Status:" ; sendmail
243256f8
JH
2513 "Supersedes:" ; H. Spencer: News Article Format and Transmission, June 1994
2514 "Telefax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2515 "Thread-"
7911d1c8
BW
2516 "Thread-Index:"
2517 "Thread-Topic:"
243256f8
JH
2518 "Translated-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2519 "Translation-Of:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2520 "Ua-Content-Id:" ; X400
dda00b2c 2521 "Via:" ; MH
dda00b2c 2522 "X-Abuse-and-DMCA-"
7911d1c8 2523 "X-Abuse-Info:"
dda00b2c
BW
2524 "X-Accept-Language:" ; Netscape/Mozilla
2525 "X-Ack:"
243256f8 2526 "X-Admin:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2527 "X-Administrivia-To:"
7911d1c8 2528 "X-AMAZON" ; Amazon.com
dda00b2c 2529 "X-AntiAbuse:" ; cPanel
c50115f1 2530 "X-Antivirus-Scanner:"
7911d1c8 2531 "X-AOL-IP:" ; AOL WebMail
dda00b2c
BW
2532 "X-Apparently-From:" ; MS Outlook
2533 "X-Apparently-To:" ; Egroups/yahoogroups mailing list manager
c50115f1 2534 "X-Attribution:"
243256f8 2535 "X-AuditID:"
c50115f1 2536 "X-Authenticated-Info:" ; Verizon.net?
efd5b7df 2537 "X-Authenticated-Sender:" ; AT&T Message Center (webmail)
dda00b2c 2538 "X-Authentication-Warning:" ; sendmail
7911d1c8 2539 "X-Authority-Analysis:"
efd5b7df 2540 "X-Barracuda-" ; Barracuda spam scores
dda00b2c 2541 "X-Beenthere:" ; Mailman mailing list manager
243256f8 2542 "X-Bigfish:"
dda00b2c 2543 "X-Bogosity:" ; bogofilter
201a821a 2544 "X-Brightmail-Tracker:" ; Brightmail
243256f8 2545 "X-BrightmailFiltered:" ; Brightmail
efd5b7df 2546 "X-Bugzilla-" ; Bugzilla
90404d5a 2547 "X-Campaignid:"
c50115f1 2548 "X-Comment:" ; AT&T Mailennium
243256f8
JH
2549 "X-Complaints-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2550 "X-Confirm-Reading-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
7911d1c8 2551 "X-Content-Filtered-By:"
dda00b2c 2552 "X-ContentStamp:" ; NetZero
90404d5a 2553 "X-Country-Chain:" ; http://www.declude.com/x-note.htm
c50115f1
JH
2554 "X-Cr-Hashedpuzzle:"
2555 "X-Cr-Puzzleid:"
dda00b2c 2556 "X-Cron-Env:"
7911d1c8 2557 "X-DCC-Usenix-Metrics:"
90404d5a 2558 "X-Declude-" ; http://www.declude.com/x-note.htm
7911d1c8 2559 "X-Dedicated:"
dda00b2c 2560 "X-Delivered"
7911d1c8
BW
2561 "X-DH-Virus-"
2562 "X-DMCA"
2563 "X-Domain:"
2564 "X-Echelon-Distraction"
efd5b7df 2565 "X-EFL-Spamscore:" ; MIT alumni spam filtering
7911d1c8 2566 "X-eGroups-" ; Egroups/yahoogroups mailing list manager
5cb66178 2567 "X-EID:"
dda00b2c 2568 "X-ELNK-Trace:" ; Earthlink mailer
243256f8 2569 "X-Enigmail-Version:"
dda00b2c 2570 "X-Envelope-Date:" ; GNU mailutils
243256f8 2571 "X-Envelope-From:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2572 "X-Envelope-Sender:"
243256f8 2573 "X-Envelope-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
c50115f1 2574 "X-EviteMessageId:" ; evite.com
dda00b2c 2575 "X-Evolution:" ; Evolution mail client
243256f8
JH
2576 "X-ExtLoop"
2577 "X-Face:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
90404d5a 2578 "X-fmx-"
dda00b2c
BW
2579 "X-Folder:" ; Spam
2580 "X-From-Line"
2581 "X-Gmail-" ; Gmail
2582 "X-Gnus-Mail-Source:" ; gnus
243256f8 2583 "X-Google-" ; Google mail
7911d1c8 2584 "X-Google-Sender-Auth:"
dda00b2c 2585 "X-Greylist:" ; milter-greylist-1.2.1
243256f8 2586 "X-Habeas-SWE-" ; Spam
201a821a 2587 "X-Hashcash:" ; hashcash
7911d1c8
BW
2588 "X-HPL-"
2589 "X-HR-"
2590 "X-HTTP-UserAgent:"
2cefb8a7 2591 "X-Hz" ; Hertz
90404d5a 2592 "X-Identity:" ; http://www.declude.com/x-note.htm
243256f8 2593 "X-Image-URL:"
7911d1c8 2594 "X-IMAP:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2595 "X-Info:" ; NTMail
243256f8 2596 "X-IronPort-" ; IronPort AV
7911d1c8
BW
2597 "X-ISI-4-30-3-MailScanner:"
2598 "X-J2-"
dda00b2c 2599 "X-Juno-" ; Juno
7911d1c8 2600 "X-Key:"
243256f8 2601 "X-List-Host:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2602 "X-List-Subscribe:" ; Unknown mailing list managers
2603 "X-List-Unsubscribe:" ; Unknown mailing list managers
2604 "X-Listprocessor-" ; ListProc(tm) by CREN
243256f8
JH
2605 "X-Listserver:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2606 "X-Loop:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
c50115f1 2607 "X-Lrde-Mailscanner:"
dda00b2c 2608 "X-Lumos-SenderID:" ; Roving ConstantContact
efd5b7df 2609 "X-Mail-from:" ; fastmail.fm
7911d1c8 2610 "X-MAIL-INFO:" ; NetZero
90404d5a 2611 "X-Mailer_"
dda00b2c 2612 "X-Mailing-List:" ; Unknown mailing list managers
efd5b7df 2613 "X-Mailman-Approved-At:" ; Mailman mailing list manager
dda00b2c 2614 "X-Mailman-Version:" ; Mailman mailing list manager
7911d1c8 2615 "X-MailScanner" ; ListProc(tm) by CREN
243256f8 2616 "X-Mailutils-Message-Id" ; GNU Mailutils
dda00b2c 2617 "X-Majordomo:" ; Majordomo mailing list manager
7911d1c8
BW
2618 "X-MB-Message-" ; AOL WebMail
2619 "X-MDaemon-Deliver-To:"
2620 "X-MDRemoteIP:"
dda00b2c 2621 "X-Message-Id"
7911d1c8 2622 "X-Message-Type:"
dda00b2c 2623 "X-MessageWall-Score:" ; Unknown mailing list manager, AUC TeX
7911d1c8
BW
2624 "X-MHE-Checksum:" ; Checksum added during index search
2625 "X-MIME-Autoconverted:" ; sendmail
2626 "X-MIMEOLE:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/sendmail
2627 "X-MIMETrack:"
dda00b2c
BW
2628 "X-Mms-" ; T-Mobile pictures
2629 "X-Mozilla-Status:" ; Netscape/Mozilla
7911d1c8 2630 "X-MS-" ; MS Outlook
dda00b2c 2631 "X-Msmail-" ; MS Outlook
7911d1c8 2632 "X-MSMail-Priority" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2633 "X-NAI-Spam-" ; Network Associates Inc. SpamKiller
2634 "X-News:" ; News
243256f8
JH
2635 "X-Newsreader:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2636 "X-No-Archive:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2637 "X-Notes-Item:" ; Lotus Notes Domino structured header
2638 "X-OperatingSystem:"
7911d1c8 2639 "X-ORBL:"
dda00b2c 2640 "X-Orcl-Content-Type:"
7911d1c8 2641 "X-Organization:"
243256f8 2642 "X-Original-Arrival-Type:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2643 "X-Original-Complaints-To:"
2644 "X-Original-Date:" ; SourceForge mailing list manager
2645 "X-Original-To:"
2646 "X-Original-Trace:"
2647 "X-OriginalArrivalTime:" ; Hotmail
243256f8 2648 "X-Originating-Email:" ; Hotmail
dda00b2c 2649 "X-Originating-IP:" ; Hotmail
90404d5a 2650 "X-pair-"
7911d1c8
BW
2651 "X-PGP:"
2652 "X-PID:"
243256f8 2653 "X-PMG-"
7911d1c8 2654 "X-PMX-Version:"
dda00b2c
BW
2655 "X-Postfilter:"
2656 "X-Priority:" ; MS Outlook
2cefb8a7 2657 "X-Proofpoint-" ; Proofpoint mail filter
13384ea6 2658 "X-Provags-ID:"
7911d1c8 2659 "X-PSTN-"
dda00b2c 2660 "X-Qotd-" ; User added
243256f8 2661 "X-RCPT-TO:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2662 "X-Received-Date:"
2663 "X-Received:"
243256f8 2664 "X-Report-Abuse-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2665 "X-Request-"
efd5b7df 2666 "X-Resolved-to:" ; fastmail.fm
dda00b2c 2667 "X-Return-Path-Hint:" ; Roving ConstantContact
2cefb8a7 2668 "X-RIM-" ; Research In Motion (i.e. BlackBerry)
7911d1c8 2669 "X-RM"
c50115f1 2670 "X-RocketYMMF:" ; Yahoo
efd5b7df
ED
2671 "X-Roving-" ; Roving ConstantContact
2672 "X-SA-Exim-" ; Exim SpamAssassin
7911d1c8 2673 "X-Sasl-enc:" ; Apple Mail
dda00b2c
BW
2674 "X-SBClass:" ; Spam
2675 "X-SBNote:" ; Spam
2676 "X-SBPass:" ; Spam
7911d1c8 2677 "X-SBRS:"
dda00b2c 2678 "X-SBRule:" ; Spam
f12d6a4a 2679 "X-Scanned-By:"
243256f8 2680 "X-Sender:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c
BW
2681 "X-Server-Date:"
2682 "X-Server-Uuid:"
7911d1c8 2683 "X-Service-Code:"
dda00b2c 2684 "X-Sieve:" ; Sieve filtering
7911d1c8 2685 "X-SMTP-"
dda00b2c
BW
2686 "X-Source"
2687 "X-Spam-" ; Spamassassin
2688 "X-SpamBouncer:" ; Spam
90404d5a 2689 "X-SPF-"
dda00b2c 2690 "X-Status"
7911d1c8 2691 "X-Submission-Address:"
dda00b2c 2692 "X-Submissions-To:"
7911d1c8 2693 "X-Sun-Charset:"
dda00b2c
BW
2694 "X-Telecom-Digest"
2695 "X-Trace:"
2696 "X-UID"
243256f8 2697 "X-UIDL:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
7911d1c8 2698 "X-Unity"
dda00b2c 2699 "X-UNTD-" ; NetZero
243256f8
JH
2700 "X-URI:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
2701 "X-URL:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2702 "X-USANET-" ; usa.net
90404d5a 2703 "X-Usenet-Provider"
dda00b2c 2704 "X-UserInfo1:"
24b2be09 2705 "X-Virus-" ;
dda00b2c 2706 "X-Vms-To:"
7911d1c8 2707 "X-VSMLoop:" ; NTMail
dda00b2c
BW
2708 "X-WebTV-Signature:"
2709 "X-Wss-Id:" ; Worldtalk gateways
243256f8 2710 "X-X-Sender:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
dda00b2c 2711 "X-Yahoo"
7911d1c8
BW
2712 "X-Yahoo-Newman-"
2713 "X-YMail-"
dda00b2c 2714 "X400-" ; X400
243256f8
JH
2715 "Xref:" ; RFC 1036
2716 )
dda00b2c
BW
2717 "List of default header fields that are not to be shown.
2718
2719Do not alter this variable directly. Instead, add entries from
2720here that you would like to be displayed in
2721`mh-invisible-header-fields-default' and add entries to hide in
2722`mh-invisible-header-fields'.")
2723
2724(eval-and-compile
2725 (unless (fboundp 'mh-invisible-headers)
2726 (defun mh-invisible-headers ()
2727 "Temporary definition.
2728Real definition, below, uses variables that aren't defined yet."
2729 nil)))
2730
2731(defvar mh-delay-invisible-header-generation-flag t
2732 "Non-nil means to delay the generation of invisible header fields.
2733Because the function `mh-invisible-headers' uses both
2734`mh-invisible-header-fields' and `mh-invisible-header-fields', it
2735cannot be run until both variables have been initialized.")
2736
c90c4cf1 2737(defcustom-mh mh-invisible-header-fields nil
dda00b2c
BW
2738 "*Additional header fields to hide.
2739
2740Header fields that you would like to hide that aren't listed in
2741`mh-invisible-header-fields-default' can be added to this option
2742with a couple of caveats. Regular expressions are not allowed.
2743Unique fields should have a \":\" suffix; otherwise, the element
2744can be used to render invisible an entire class of fields that
4690fe3f
BW
2745start with the same prefix.
2746
2747If you think a header field should be generally ignored, please
2748update SF #1916032 (see URL
2749`https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357').
dda00b2c
BW
2750
2751See also `mh-clean-message-header-flag'."
2752
2753 :type '(repeat (string :tag "Header field"))
2754 :set (lambda (symbol value)
2755 (set-default symbol value)
2756 (mh-invisible-headers))
23347d76 2757 :group 'mh-show
70a1d47e 2758 :package-version '(MH-E . "7.1"))
dda00b2c 2759
c90c4cf1 2760(defcustom-mh mh-invisible-header-fields-default nil
dda00b2c
BW
2761 "*List of hidden header fields.
2762
2763The header fields listed in this option are hidden, although you
2764can check off any field that you would like to see.
2765
2766Header fields that you would like to hide that aren't listed can
2767be added to the option `mh-invisible-header-fields'.
2768
4690fe3f
BW
2769See also `mh-clean-message-header-flag'.
2770
2771If you think a header field should be added to this list, please
2772update SF #1916032 (see URL
2773`https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357')."
dda00b2c
BW
2774 :type `(set ,@(mapcar (lambda (x) `(const ,x))
2775 mh-invisible-header-fields-internal))
2776 :set (lambda (symbol value)
2777 (set-default symbol value)
2778 (mh-invisible-headers))
23347d76 2779 :group 'mh-show
70a1d47e 2780 :package-version '(MH-E . "8.0"))
dda00b2c
BW
2781
2782(defvar mh-invisible-header-fields-compiled nil
2783 "*Regexp matching lines in a message header that are not to be shown.
2784Do not alter this variable directly. Instead, customize
2785`mh-invisible-header-fields-default' checking for fields normally
2786hidden that you wish to display, and add extra entries to hide in
2787`mh-invisible-header-fields'.")
2788
2789(defun mh-invisible-headers ()
2790 "Make or remake the variable `mh-invisible-header-fields-compiled'.
2791Done using `mh-invisible-header-fields-internal' as input, from
2792which entries from `mh-invisible-header-fields-default' are
2793removed and entries from `mh-invisible-header-fields' are added."
2794 (let ((fields mh-invisible-header-fields-internal))
2795 (when mh-invisible-header-fields-default
2796 ;; Remove entries from `mh-invisible-header-fields-default'
2797 (setq fields
2798 (loop for x in fields
2799 unless (member x mh-invisible-header-fields-default)
2800 collect x)))
2801 (when (and (boundp 'mh-invisible-header-fields)
2802 mh-invisible-header-fields)
2803 (dolist (x mh-invisible-header-fields)
2804 (unless (member x fields) (setq fields (cons x fields)))))
2805 (if fields
2806 (setq mh-invisible-header-fields-compiled
2807 (concat
2808 "^"
2809 ;; workaround for insufficient default
2810 (let ((max-specpdl-size 1000))
2811 (regexp-opt fields t))))
2812 (setq mh-invisible-header-fields-compiled nil))))
2813
2814;; Compile invisible header fields.
2815(mh-invisible-headers)
2816
c90c4cf1 2817(defcustom-mh mh-lpr-command-format "lpr -J '%s'"
dda00b2c
BW
2818 "*Command used to print\\<mh-folder-mode-map>.
2819
2820This option contains the Unix command line which performs the
2821actual printing for the \\[mh-print-msg] command. The string can
2822contain one escape, \"%s\", which is replaced by the name of the
2823folder and the message number and is useful for print job names.
2824I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a
2825nice header and adds a bit of margin so the text fits within my
2826printer's margins.
2827
2828This options is not used by the commands \\[mh-ps-print-msg] or
2829\\[mh-ps-print-msg-file]."
2830 :type 'string
23347d76 2831 :group 'mh-show
70a1d47e 2832 :package-version '(MH-E . "6.0"))
dda00b2c 2833
c90c4cf1 2834(defcustom-mh mh-max-inline-image-height nil
dda00b2c
BW
2835 "*Maximum inline image height if \"Content-Disposition:\" is not present.
2836
2837Some older mail programs do not insert this needed plumbing to
2838tell MH-E whether to display the attachments inline or not. If
2839this is the case, MH-E will display these images inline if they
2840are smaller than the window. However, you might want to allow
2841larger images to be displayed inline. To do this, you can change
2842the options `mh-max-inline-image-width' and
2843`mh-max-inline-image-height' from their default value of zero to
2844a large number. The size of your screen is a good choice for
2845these numbers."
2846 :type '(choice (const nil) integer)
23347d76 2847 :group 'mh-show
70a1d47e 2848 :package-version '(MH-E . "7.0"))
dda00b2c 2849
c90c4cf1 2850(defcustom-mh mh-max-inline-image-width nil
dda00b2c
BW
2851 "*Maximum inline image width if \"Content-Disposition:\" is not present.
2852
2853Some older mail programs do not insert this needed plumbing to
2854tell MH-E whether to display the attachments inline or not. If
2855this is the case, MH-E will display these images inline if they
2856are smaller than the window. However, you might want to allow
2857larger images to be displayed inline. To do this, you can change
2858the options `mh-max-inline-image-width' and
2859`mh-max-inline-image-height' from their default value of zero to
2860a large number. The size of your screen is a good choice for
2861these numbers."
2862 :type '(choice (const nil) integer)
23347d76 2863 :group 'mh-show
70a1d47e 2864 :package-version '(MH-E . "7.0"))
dda00b2c 2865
c90c4cf1 2866(defcustom-mh mh-mhl-format-file nil
dda00b2c
BW
2867 "*Specifies the format file to pass to the \"mhl\" program.
2868
2869Normally MH-E takes care of displaying messages itself (rather than
2870calling an MH program to do the work). If you'd rather have \"mhl\"
2871display the message (within MH-E), change this option from its default
2872value of \"Use Default mhl Format (Printing Only)\".
2873
2874You can set this option to \"Use Default mhl Format\" to get the same
2875output as you would get if you ran \"mhl\" from the shell.
2876
2877If you have a format file that you want MH-E to use, you can set this
2878option to \"Specify an mhl Format File\" and enter the name of your
2879format file. Your format file should specify a non-zero value for
2880\"overflowoffset\" to allow MH-E to parse the header. Note that
2881\"mhl\" is always used for printing and forwarding; in this case, the
2882value of this option is consulted if you have specified a format
2883file."
2884 :type '(choice (const :tag "Use Default mhl Format (Printing Only)" nil)
2885 (const :tag "Use Default mhl Format" t)
2886 (file :tag "Specify an mhl Format File"))
23347d76 2887 :group 'mh-show
70a1d47e 2888 :package-version '(MH-E . "8.0"))
dda00b2c 2889
c90c4cf1 2890(defcustom-mh mh-mime-save-parts-default-directory t
dda00b2c
BW
2891 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts].
2892
2893The default value for this option is \"Prompt Always\" so that
2894you are always prompted for the directory in which to save the
2895attachments. However, if you usually use the same directory
2896within a session, then you can set this option to \"Prompt the
2897First Time\" to avoid the prompt each time. you can make this
2898directory permanent by choosing \"Directory\" and entering the
2899directory's name."
2900 :type '(choice (const :tag "Prompt the First Time" nil)
2901 (const :tag "Prompt Always" t)
2902 directory)
23347d76 2903 :group 'mh-show
70a1d47e 2904 :package-version '(MH-E . "7.0"))
dda00b2c 2905
c90c4cf1 2906(defcustom-mh mh-print-background-flag nil
dda00b2c
BW
2907 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>.
2908
2909Normally messages are printed in the foreground. If this is slow on
2910your system, you may elect to turn off this option to print in the
2911background.
2912
2913WARNING: If you do this, do not delete the message until it is printed
2914or else the output may be truncated.
2915
2916This option is not used by the commands \\[mh-ps-print-msg] or
2917\\[mh-ps-print-msg-file]."
2918 :type 'boolean
23347d76 2919 :group 'mh-show
70a1d47e 2920 :package-version '(MH-E . "7.0"))
dda00b2c 2921
c90c4cf1 2922(defcustom-mh mh-show-maximum-size 0
dda00b2c
BW
2923 "*Maximum size of message (in bytes) to display automatically.
2924
2925This option provides an opportunity to skip over large messages
2926which may be slow to load. The default value of 0 means that all
2927message are shown regardless of size."
2928 :type 'integer
23347d76 2929 :group 'mh-show
70a1d47e 2930 :package-version '(MH-E . "8.0"))
dda00b2c 2931
c90c4cf1 2932(defcustom-mh mh-show-use-xface-flag (>= emacs-major-version 21)
dda00b2c
BW
2933 "*Non-nil means display face images in MH-show buffers.
2934
2935MH-E can display the content of \"Face:\", \"X-Face:\", and
2936\"X-Image-URL:\" header fields. If any of these fields occur in the
2937header of your message, the sender's face will appear in the \"From:\"
2938header field. If more than one of these fields appear, then the first
2939field found in the order \"Face:\", \"X-Face:\", and \"X-Image-URL:\"
2940will be used.
2941
2942The option `mh-show-use-xface-flag' is used to turn this feature on
2943and off. This feature will be turned on by default if your system
2944supports it.
2945
2946The first header field used, if present, is the Gnus-specific
2947\"Face:\" field. The \"Face:\" field appeared in GNU Emacs 21 and
2948XEmacs. For more information, see URL
2949`http://quimby.gnus.org/circus/face/'. Next is the traditional
2950\"X-Face:\" header field. The display of this field requires the
2951\"uncompface\" program (see URL
2952`ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent
2953versions of XEmacs have internal support for \"X-Face:\" images. If
2954your version of XEmacs does not, then you'll need both \"uncompface\"
2955and the x-face package (see URL `ftp://ftp.jpl.org/pub/elisp/').
2956
2957Finally, MH-E will display images referenced by the \"X-Image-URL:\"
2958header field if neither the \"Face:\" nor the \"X-Face:\" fields are
2959present. The display of the images requires \"wget\" (see URL
2960`http://www.gnu.org/software/wget/wget.html'), \"fetch\", or \"curl\"
2961to fetch the image and the \"convert\" program from the ImageMagick
2962suite (see URL `http://www.imagemagick.org/'). Of the three header
2963fields this is the most efficient in terms of network usage since the
2964image doesn't need to be transmitted with every single mail.
2965
2966The option `mh-fetch-x-image-url' controls the fetching of the
2967\"X-Image-URL:\" header field image."
2968 :type 'boolean
23347d76 2969 :group 'mh-show
70a1d47e 2970 :package-version '(MH-E . "7.0"))
dda00b2c 2971
c90c4cf1 2972(defcustom-mh mh-store-default-directory nil
dda00b2c
BW
2973 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg].
2974
2975If you would like to change the initial default directory,
2976customize this option, change the value from \"Current\" to
2977\"Directory\", and then enter the name of the directory for storing
2978the content of these messages."
2979 :type '(choice (const :tag "Current" nil)
2980 directory)
23347d76 2981 :group 'mh-show
70a1d47e 2982 :package-version '(MH-E . "6.0"))
dda00b2c 2983
c90c4cf1 2984(defcustom-mh mh-summary-height nil
dda00b2c
BW
2985 "*Number of lines in MH-Folder buffer (including the mode line).
2986
2987The default value of this option is \"Automatic\" which means
2988that the MH-Folder buffer will maintain the same proportional
2989size if the frame is resized. If you'd prefer a fixed height,
2990then choose the \"Fixed Size\" option and enter the number of
2991lines you'd like to see."
2992 :type '(choice (const :tag "Automatic" nil)
2993 (integer :tag "Fixed Size"))
23347d76 2994 :group 'mh-show
70a1d47e 2995 :package-version '(MH-E . "7.4"))
dda00b2c
BW
2996
2997;;; The Speedbar (:group 'mh-speedbar)
2998
c90c4cf1 2999(defcustom-mh mh-speed-update-interval 60
dda00b2c
BW
3000 "Time between speedbar updates in seconds.
3001Set to 0 to disable automatic update."
3002 :type 'integer
23347d76 3003 :group 'mh-speedbar
70a1d47e 3004 :package-version '(MH-E . "8.0"))
dda00b2c
BW
3005
3006;;; Threading (:group 'mh-thread)
3007
c90c4cf1 3008(defcustom-mh mh-show-threads-flag nil
dda00b2c
BW
3009 "*Non-nil means new folders start in threaded mode.
3010
3011Threading large number of messages can be time consuming so this
3012option is turned off by default. If you turn this option on, then
3013threading will be done only if the number of messages being
3014threaded is less than `mh-large-folder'."
3015 :type 'boolean
23347d76 3016 :group 'mh-thread
70a1d47e 3017 :package-version '(MH-E . "7.1"))
c26cf6c8 3018
dda00b2c
BW
3019;;; The Tool Bar (:group 'mh-tool-bar)
3020
3021;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined
3022;; dynamically in mh-tool-bar.el.
3023
c90c4cf1 3024(defcustom-mh mh-tool-bar-search-function 'mh-search
dda00b2c
BW
3025 "*Function called by the tool bar search button.
3026
3027By default, this is set to `mh-search'. You can also choose
3028\"Other Function\" from the \"Value Menu\" and enter a function
3029of your own choosing."
3030 :type '(choice (const mh-search)
3031 (function :tag "Other Function"))
23347d76 3032 :group 'mh-tool-bar
70a1d47e 3033 :package-version '(MH-E . "7.0"))
dda00b2c
BW
3034
3035;; XEmacs has a couple of extra customizations...
3036(mh-do-in-xemacs
c90c4cf1 3037 (defcustom-mh mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
dda00b2c
BW
3038 "*If non-nil, use tool bar.
3039
3040This option controls whether to show the MH-E icons at all. By
3041default, this option is turned on if the window system supports
3042tool bars. If your system doesn't support tool bars, then you
3043won't be able to turn on this option."
3044 :type 'boolean
3045 :group 'mh-tool-bar
3046 :set (lambda (symbol value)
3047 (if (and (eq value t)
3048 (not mh-xemacs-has-tool-bar-flag))
3049 (error "Tool bar not supported"))
23347d76 3050 (set-default symbol value))
70a1d47e 3051 :package-version '(MH-E . "7.3"))
dda00b2c 3052
c90c4cf1 3053 (defcustom-mh mh-xemacs-tool-bar-position nil
dda00b2c
BW
3054 "*Tool bar location.
3055
3056This option controls the placement of the tool bar along the four
3057edges of the frame. You can choose from one of \"Same As Default
3058Tool Bar\", \"Top\", \"Bottom\", \"Left\", or \"Right\". If this
3059variable is set to anything other than \"Same As Default Tool
3060Bar\" and the default tool bar is in a different location, then
3061two tool bars will be displayed: the MH-E tool bar and the
3062default tool bar."
3063 :type '(radio (const :tag "Same As Default Tool Bar" :value nil)
3064 (const :tag "Top" :value top)
3065 (const :tag "Bottom" :value bottom)
3066 (const :tag "Left" :value left)
3067 (const :tag "Right" :value right))
23347d76 3068 :group 'mh-tool-bar
70a1d47e 3069 :package-version '(MH-E . "7.3")))
942fc772 3070
c26cf6c8
RS
3071\f
3072
dda00b2c
BW
3073;;; Hooks (:group 'mh-hooks + group where hook described)
3074
c90c4cf1 3075(defcustom-mh mh-after-commands-processed-hook nil
e5d763d8 3076 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests.
dda00b2c
BW
3077
3078Variables that are useful in this hook include
3079`mh-folders-changed', which lists which folders were affected by
3080deletes and refiles. This list will always include the current
3081folder, which is also available in `mh-current-folder'."
3082 :type 'hook
3083 :group 'mh-hooks
23347d76 3084 :group 'mh-folder
70a1d47e 3085 :package-version '(MH-E . "8.0"))
dda00b2c 3086
c90c4cf1 3087(defcustom-mh mh-alias-reloaded-hook nil
dda00b2c
BW
3088 "Hook run by `mh-alias-reload' after loading aliases."
3089 :type 'hook
3090 :group 'mh-hooks
23347d76 3091 :group 'mh-alias
70a1d47e 3092 :package-version '(MH-E . "8.0"))
dda00b2c 3093
aad5673d 3094(defcustom-mh mh-annotate-msg-hook nil
7106a02d
BW
3095 "Hook run whenever a message is sent and after the scan lines and message are annotated.
3096Hook functions can access the current folder name with
3097`mh-current-folder' and obtain the message numbers of the
3098annotated messages with `mh-annotate-list'."
aad5673d
SG
3099 :type 'hook
3100 :group 'mh-hooks
3101 :group 'mh-sending-mail
3102 :package-version '(MH-E . "8.1"))
3103
c90c4cf1 3104(defcustom-mh mh-before-commands-processed-hook nil
e5d763d8 3105 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests.
dda00b2c
BW
3106
3107Variables that are useful in this hook include `mh-delete-list'
3108and `mh-refile-list' which can be used to see which changes will
3109be made to the current folder, `mh-current-folder'."
3110 :type 'hook
3111 :group 'mh-hooks
23347d76 3112 :group 'mh-folder
70a1d47e 3113 :package-version '(MH-E . "8.0"))
dda00b2c 3114
c90c4cf1 3115(defcustom-mh mh-before-quit-hook nil
dda00b2c
BW
3116 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E.
3117
3118This hook is called before the quit occurs, so you might use it
3119to perform any MH-E operations; you could perform some query and
3120abort the quit or call `mh-execute-commands', for example.
3121
3122See also `mh-quit-hook'."
3123 :type 'hook
3124 :group 'mh-hooks
23347d76 3125 :group 'mh-folder
70a1d47e 3126 :package-version '(MH-E . "6.0"))
dda00b2c 3127
c90c4cf1 3128(defcustom-mh mh-before-send-letter-hook nil
dda00b2c
BW
3129 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.
3130
3131For example, if you want to check your spelling in your message
3132before sending, add the `ispell-message' function."
3133 :type 'hook
3134 :options '(ispell-message)
3135 :group 'mh-hooks
23347d76 3136 :group 'mh-letter
70a1d47e 3137 :package-version '(MH-E . "6.0"))
dda00b2c 3138
c90c4cf1 3139(defcustom-mh mh-delete-msg-hook nil
dda00b2c
BW
3140 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
3141
3142For example, a past maintainer of MH-E used this once when he
3143kept statistics on his mail usage."
3144 :type 'hook
3145 :group 'mh-hooks
23347d76 3146 :group 'mh-show
70a1d47e 3147 :package-version '(MH-E . "6.0"))
dda00b2c 3148
c90c4cf1 3149(defcustom-mh mh-find-path-hook nil
dda00b2c
BW
3150 "Hook run by `mh-find-path' after reading the user's MH profile.
3151
3152This hook can be used the change the value of the variables that
3153`mh-find-path' sets if you need to run with different values
3154between MH and MH-E."
3155 :type 'hook
3156 :group 'mh-hooks
23347d76 3157 :group 'mh-e
70a1d47e 3158 :package-version '(MH-E . "7.0"))
dda00b2c 3159
c90c4cf1 3160(defcustom-mh mh-folder-mode-hook nil
dda00b2c
BW
3161 "Hook run by `mh-folder-mode' when visiting a new folder."
3162 :type 'hook
3163 :group 'mh-hooks
23347d76 3164 :group 'mh-folder
70a1d47e 3165 :package-version '(MH-E . "6.0"))
dda00b2c 3166
c90c4cf1 3167(defcustom-mh mh-forward-hook nil
dda00b2c
BW
3168 "Hook run by `mh-forward' on a forwarded letter."
3169 :type 'hook
3170 :group 'mh-hooks
23347d76 3171 :group 'mh-sending-mail
70a1d47e 3172 :package-version '(MH-E . "8.0"))
dda00b2c 3173
c90c4cf1 3174(defcustom-mh mh-inc-folder-hook nil
dda00b2c
BW
3175 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder."
3176 :type 'hook
3177 :group 'mh-hooks
23347d76 3178 :group 'mh-inc
70a1d47e 3179 :package-version '(MH-E . "6.0"))
dda00b2c 3180
c90c4cf1 3181(defcustom-mh mh-insert-signature-hook nil
dda00b2c
BW
3182 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted.
3183
3184Hook functions may access the actual name of the file or the
3185function used to insert the signature with
3186`mh-signature-file-name'."
3187 :type 'hook
3188 :group 'mh-hooks
23347d76 3189 :group 'mh-letter
70a1d47e 3190 :package-version '(MH-E . "8.0"))
dda00b2c 3191
c90c4cf1 3192(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
dda00b2c
BW
3193 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
3194
3195The hook functions are called with no arguments and should return
3196a non-nil value to suppress the normal prompt when you remove a
3197folder. This is useful for folders that are easily regenerated.
3198
3199The default value of `mh-search-p' suppresses the prompt on
3200folders generated by searching.
3201
3202WARNING: Use this hook with care. If there is a bug in your hook
3203which returns t on \"+inbox\" and you hit \\[mh-kill-folder] by
3204accident in the \"+inbox\" folder, you will not be happy."
3205 :type 'hook
3206 :group 'mh-hooks
23347d76 3207 :group 'mh-folder
70a1d47e 3208 :package-version '(MH-E . "7.4"))
dda00b2c 3209
c90c4cf1 3210(defcustom-mh mh-letter-mode-hook nil
dda00b2c
BW
3211 "Hook run by `mh-letter-mode' on a new letter.
3212
3213This hook allows you to do some processing before editing a
3214letter. For example, you may wish to modify the header after
3215\"repl\" has done its work, or you may have a complicated
3216\"components\" file and need to tell MH-E where the cursor should
3217go."
3218 :type 'hook
3219 :group 'mh-hooks
23347d76 3220 :group 'mh-sending-mail
70a1d47e 3221 :package-version '(MH-E . "6.0"))
dda00b2c 3222
c90c4cf1 3223(defcustom-mh mh-mh-to-mime-hook nil
dda00b2c
BW
3224 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]."
3225 :type 'hook
3226 :group 'mh-hooks
23347d76 3227 :group 'mh-letter
70a1d47e 3228 :package-version '(MH-E . "8.0"))
dda00b2c 3229
c90c4cf1 3230(defcustom-mh mh-search-mode-hook nil
dda00b2c
BW
3231 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>.
3232
3233If you find that you do the same thing over and over when editing
3234the search template, you may wish to bind some shortcuts to keys.
3235This can be done with this hook which is called when
3236\\[mh-search] is run on a new pattern."
3237 :type 'hook
3238 :group 'mh-hooks
23347d76 3239 :group 'mh-search
70a1d47e 3240 :package-version '(MH-E . "8.0"))
dda00b2c 3241
031c6757
SG
3242(defcustom-mh mh-pack-folder-hook nil
3243 "Hook run by \\<mh-folder-mode-map>\\[mh-pack-folder] after renumbering the messages.
3244Hook functions can access the current folder name with `mh-current-folder'."
3245 :type 'hook
3246 :group 'mh-hooks
3247 :group 'mh-folder
7f1a6a6f 3248 :package-version '(MH-E . "8.2"))
031c6757 3249
c90c4cf1 3250(defcustom-mh mh-quit-hook nil
dda00b2c
BW
3251 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E.
3252
3253This hook is not run in an MH-E context, so you might use it to
3254modify the window setup.
3255
3256See also `mh-before-quit-hook'."
3257 :type 'hook
3258 :group 'mh-hooks
23347d76 3259 :group 'mh-folder
70a1d47e 3260 :package-version '(MH-E . "6.0"))
dda00b2c 3261
c90c4cf1 3262(defcustom-mh mh-refile-msg-hook nil
dda00b2c
BW
3263 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling."
3264 :type 'hook
3265 :group 'mh-hooks
23347d76 3266 :group 'mh-folder
70a1d47e 3267 :package-version '(MH-E . "6.0"))
dda00b2c 3268
c90c4cf1 3269(defcustom-mh mh-show-hook nil
dda00b2c
BW
3270 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message.
3271
3272It is the last thing called after messages are displayed. It's
3273used to affect the behavior of MH-E in general or when
3274`mh-show-mode-hook' is too early. See `mh-show-mode-hook'."
3275 :type 'hook
3276 :group 'mh-hooks
23347d76 3277 :group 'mh-show
70a1d47e 3278 :package-version '(MH-E . "6.0"))
dda00b2c 3279
c90c4cf1 3280(defcustom-mh mh-show-mode-hook nil
dda00b2c
BW
3281 "Hook run upon entry to `mh-show-mode'.
3282
3283This hook is called early on in the process of the message
3284display. It is usually used to perform some action on the
3285message's content. See `mh-show-hook'."
3286 :type 'hook
3287 :group 'mh-hooks
23347d76 3288 :group 'mh-show
70a1d47e 3289 :package-version '(MH-E . "6.0"))
dda00b2c 3290
c90c4cf1 3291(defcustom-mh mh-unseen-updated-hook nil
dda00b2c
BW
3292 "Hook run after the unseen sequence has been updated.
3293
3294The variable `mh-seen-list' can be used by this hook to obtain
3295the list of messages which were removed from the unseen
3296sequence."
3297 :type 'hook
3298 :group 'mh-hooks
23347d76 3299 :group 'mh-sequences
70a1d47e 3300 :package-version '(MH-E . "6.0"))
a1b4049d 3301
bdcfe844 3302\f
a1b4049d 3303
dda00b2c
BW
3304;;; Faces (:group 'mh-faces + group where faces described)
3305
3306(if (boundp 'facemenu-unlisted-faces)
3307 (add-to-list 'facemenu-unlisted-faces "^mh-"))
3308
367c48ef
BW
3309;; To add a new face:
3310;; 1. Add entry to variable mh-face-data.
c90c4cf1 3311;; 2. Create face using defface-mh (which removes min-color spec and
367c48ef
BW
3312;; :package-version keyword where these are not supported),
3313;; accessing face data with function mh-face-data.
3314;; 3. Add inherit argument to function mh-face-data if applicable.
6d21875b
BW
3315(defvar mh-face-data
3316 '((mh-folder-followup
3317 ((((class color) (background light))
3318 (:foreground "blue3"))
3319 (((class color) (background dark))
3320 (:foreground "LightGoldenRod"))
3321 (t
3322 (:bold t))))
3323 (mh-folder-msg-number
3324 ((((class color) (min-colors 64) (background light))
3325 (:foreground "snow4"))
3326 (((class color) (min-colors 64) (background dark))
3327 (:foreground "snow3"))
b95d0a24
BW
3328 (((class color) (background light))
3329 (:foreground "purple"))
3330 (((class color) (background dark))
6d21875b
BW
3331 (:foreground "cyan"))))
3332 (mh-folder-refiled
3333 ((((class color) (min-colors 64) (background light))
3334 (:foreground "DarkGoldenrod"))
3335 (((class color) (min-colors 64) (background dark))
3336 (:foreground "LightGoldenrod"))
3337 (((class color))
3338 (:foreground "yellow" :weight light))
3339 (((class grayscale) (background light))
3340 (:foreground "Gray90" :bold t :italic t))
3341 (((class grayscale) (background dark))
3342 (:foreground "DimGray" :bold t :italic t))
3343 (t
3344 (:bold t :italic t))))
3345 (mh-folder-subject
3346 ((((class color) (background light))
3347 (:foreground "blue4"))
3348 (((class color) (background dark))
3349 (:foreground "yellow"))
3350 (t
3351 (:bold t))))
3352 (mh-folder-tick
b95d0a24 3353 ((((class color) (background light))
6d21875b 3354 (:background "#dddf7e"))
b95d0a24 3355 (((class color) (background dark))
6d21875b
BW
3356 (:background "#dddf7e"))
3357 (t
3358 (:underline t))))
3359 (mh-folder-to
3360 ((((class color) (min-colors 64) (background light))
3361 (:foreground "RosyBrown"))
3362 (((class color) (min-colors 64) (background dark))
3363 (:foreground "LightSalmon"))
3364 (((class color))
3365 (:foreground "green"))
3366 (((class grayscale) (background light))
3367 (:foreground "DimGray" :italic t))
3368 (((class grayscale) (background dark))
3369 (:foreground "LightGray" :italic t))
3370 (t
3371 (:italic t))))
3372 (mh-letter-header-field
3373 ((((class color) (background light))
3374 (:background "gray90"))
3375 (((class color) (background dark))
3376 (:background "gray10"))
3377 (t
3378 (:bold t))))
3379 (mh-search-folder
3380 ((((class color) (background light))
3381 (:foreground "dark green" :bold t))
3382 (((class color) (background dark))
3383 (:foreground "indian red" :bold t))
3384 (t
3385 (:bold t))))
3386 (mh-show-cc
3387 ((((class color) (min-colors 64) (background light))
3388 (:foreground "DarkGoldenrod"))
3389 (((class color) (min-colors 64) (background dark))
3390 (:foreground "LightGoldenrod"))
3391 (((class color))
3392 (:foreground "yellow" :weight light))
3393 (((class grayscale) (background light))
3394 (:foreground "Gray90" :bold t :italic t))
3395 (((class grayscale) (background dark))
3396 (:foreground "DimGray" :bold t :italic t))
3397 (t
3398 (:bold t :italic t))))
3399 (mh-show-date
3400 ((((class color) (min-colors 64) (background light))
3401 (:foreground "ForestGreen"))
3402 (((class color) (min-colors 64) (background dark))
3403 (:foreground "PaleGreen"))
3404 (((class color))
3405 (:foreground "green"))
3406 (((class grayscale) (background light))
3407 (:foreground "Gray90" :bold t))
3408 (((class grayscale) (background dark))
3409 (:foreground "DimGray" :bold t))
3410 (t
3411 (:bold t :underline t))))
3412 (mh-show-from
3413 ((((class color) (background light))
3414 (:foreground "red3"))
3415 (((class color) (background dark))
3416 (:foreground "cyan"))
3417 (t
3418 (:bold t))))
3419 (mh-show-header
3420 ((((class color) (min-colors 64) (background light))
3421 (:foreground "RosyBrown"))
3422 (((class color) (min-colors 64) (background dark))
3423 (:foreground "LightSalmon"))
3424 (((class color))
3425 (:foreground "green"))
3426 (((class grayscale) (background light))
3427 (:foreground "DimGray" :italic t))
3428 (((class grayscale) (background dark))
3429 (:foreground "LightGray" :italic t))
3430 (t
3431 (:italic t))))
3432 (mh-show-pgg-bad ((t (:bold t :foreground "DeepPink1"))))
3433 (mh-show-pgg-good ((t (:bold t :foreground "LimeGreen"))))
3434 (mh-show-pgg-unknown ((t (:bold t :foreground "DarkGoldenrod2"))))
3435 (mh-show-signature ((t (:italic t))))
3436 (mh-show-to
3437 ((((class color) (background light))
3438 (:foreground "SaddleBrown"))
3439 (((class color) (background dark))
3440 (:foreground "burlywood"))
3441 (((class grayscale) (background light))
3442 (:foreground "DimGray" :underline t))
3443 (((class grayscale) (background dark))
3444 (:foreground "LightGray" :underline t))
3445 (t (:underline t))))
3446 (mh-speedbar-folder
3447 ((((class color) (background light))
3448 (:foreground "blue4"))
3449 (((class color) (background dark))
3450 (:foreground "light blue"))))
3451 (mh-speedbar-selected-folder
3452 ((((class color) (background light))
3453 (:foreground "red1" :underline t))
3454 (((class color) (background dark))
3455 (:foreground "red1" :underline t))
3456 (t
367c48ef
BW
3457 (:underline t)))))
3458 "MH-E face data.
3459Used by function `mh-face-data' which returns spec that is
c90c4cf1 3460consumed by `defface-mh'.")
367c48ef
BW
3461
3462(require 'cus-face)
3463
3464(defvar mh-inherit-face-flag (assq :inherit custom-face-attributes)
3465 "Non-nil means that the `defface' :inherit keyword is available.
3466The :inherit keyword is available on all supported versions of
3467GNU Emacs and XEmacs from at least 21.5.23 on.")
3468
a3269bc4 3469(defvar mh-min-colors-defined-flag (and (not (featurep 'xemacs))
367c48ef
BW
3470 (>= emacs-major-version 22))
3471 "Non-nil means `defface' supports min-colors display requirement.")
6d21875b
BW
3472
3473(defun mh-face-data (face &optional inherit)
3474 "Return spec for FACE.
367c48ef 3475See `defface' for the spec definition.
6d21875b 3476
367c48ef
BW
3477If INHERIT is non-nil and `defface' supports the :inherit
3478keyword, return INHERIT literally; otherwise, return spec for
3479FACE from the variable `mh-face-data'. This isn't a perfect
3480implementation. In the case that the :inherit keyword is not
3481supported, any additional attributes in the inherit parameter are
3482not added to the returned spec.
3483
3484Furthermore, when `mh-min-colors-defined-flag' is nil, this
3485function finds display entries with \"min-colors\" requirements
3486and either removes the \"min-colors\" requirement or strips the
3487display entirely if the display does not support the number of
3488specified colors."
3489 (let ((spec
3490 (if (and inherit mh-inherit-face-flag)
3491 inherit
3492 (or (cadr (assq face mh-face-data))
3493 (error "Could not find %s in mh-face-data" face)))))
3494
3495 (if mh-min-colors-defined-flag
3496 spec
3497 (let ((cells (mh-display-color-cells))
3498 new-spec)
3499 ;; Remove entries with min-colors, or delete them if we have
3500 ;; fewer colors than they specify.
3501 (loop for entry in (reverse spec) do
3502 (let ((requirement (if (eq (car entry) t)
3503 nil
3504 (assq 'min-colors (car entry)))))
3505 (if requirement
3506 (when (>= cells (nth 1 requirement))
3507 (setq new-spec (cons (cons (delq requirement (car entry))
3508 (cdr entry))
3509 new-spec)))
3510 (setq new-spec (cons entry new-spec)))))
3511 new-spec))))
6d21875b 3512
c90c4cf1 3513(defface-mh mh-folder-address
6d21875b 3514 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
dda00b2c
BW
3515 "Recipient face."
3516 :group 'mh-faces
23347d76 3517 :group 'mh-folder
70a1d47e 3518 :package-version '(MH-E . "8.0"))
dda00b2c 3519
c90c4cf1 3520(defface-mh mh-folder-body
6d21875b
BW
3521 (mh-face-data 'mh-folder-msg-number
3522 '((((class color))
3523 (:inherit mh-folder-msg-number))
3524 (t
3525 (:inherit mh-folder-msg-number :italic t))))
dda00b2c
BW
3526 "Body text face."
3527 :group 'mh-faces
23347d76 3528 :group 'mh-folder
70a1d47e 3529 :package-version '(MH-E . "8.0"))
dda00b2c 3530
c90c4cf1 3531(defface-mh mh-folder-cur-msg-number
6d21875b
BW
3532 (mh-face-data 'mh-folder-msg-number
3533 '((t (:inherit mh-folder-msg-number :bold t))))
dda00b2c
BW
3534 "Current message number face."
3535 :group 'mh-faces
23347d76 3536 :group 'mh-folder
70a1d47e 3537 :package-version '(MH-E . "8.0"))
dda00b2c 3538
c90c4cf1 3539(defface-mh mh-folder-date
6d21875b 3540 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
dda00b2c
BW
3541 "Date face."
3542 :group 'mh-faces
23347d76 3543 :group 'mh-folder
70a1d47e 3544 :package-version '(MH-E . "8.0"))
dda00b2c 3545
c90c4cf1 3546(defface-mh mh-folder-deleted
6d21875b 3547 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
dda00b2c
BW
3548 "Deleted message face."
3549 :group 'mh-faces
23347d76 3550 :group 'mh-folder
70a1d47e 3551 :package-version '(MH-E . "8.0"))
dda00b2c 3552
c90c4cf1 3553(defface-mh mh-folder-followup (mh-face-data 'mh-folder-followup)
dda00b2c
BW
3554 "\"Re:\" face."
3555 :group 'mh-faces
23347d76 3556 :group 'mh-folder
70a1d47e 3557 :package-version '(MH-E . "8.0"))
dda00b2c 3558
c90c4cf1 3559(defface-mh mh-folder-msg-number (mh-face-data 'mh-folder-msg-number)
dda00b2c
BW
3560 "Message number face."
3561 :group 'mh-faces
23347d76 3562 :group 'mh-folder
70a1d47e 3563 :package-version '(MH-E . "8.0"))
dda00b2c 3564
c90c4cf1 3565(defface-mh mh-folder-refiled (mh-face-data 'mh-folder-refiled)
dda00b2c
BW
3566 "Refiled message face."
3567 :group 'mh-faces
23347d76 3568 :group 'mh-folder
70a1d47e 3569 :package-version '(MH-E . "8.0"))
dda00b2c 3570
c90c4cf1 3571(defface-mh mh-folder-sent-to-me-hint
6d21875b 3572 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date))))
dda00b2c
BW
3573 "Fontification hint face in messages sent directly to us.
3574The detection of messages sent to us is governed by the scan
3575format `mh-scan-format-nmh' and the regular expression
3576`mh-scan-sent-to-me-sender-regexp'."
3577 :group 'mh-faces
23347d76 3578 :group 'mh-folder
70a1d47e 3579 :package-version '(MH-E . "8.0"))
dda00b2c 3580
c90c4cf1 3581(defface-mh mh-folder-sent-to-me-sender
6d21875b 3582 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup))))
dda00b2c
BW
3583 "Sender face in messages sent directly to us.
3584The detection of messages sent to us is governed by the scan
3585format `mh-scan-format-nmh' and the regular expression
3586`mh-scan-sent-to-me-sender-regexp'."
3587 :group 'mh-faces
23347d76 3588 :group 'mh-folder
70a1d47e 3589 :package-version '(MH-E . "8.0"))
dda00b2c 3590
c90c4cf1 3591(defface-mh mh-folder-subject (mh-face-data 'mh-folder-subject)
dda00b2c
BW
3592 "Subject face."
3593 :group 'mh-faces
23347d76 3594 :group 'mh-folder
70a1d47e 3595 :package-version '(MH-E . "8.0"))
dda00b2c 3596
c90c4cf1 3597(defface-mh mh-folder-tick (mh-face-data 'mh-folder-tick)
dda00b2c
BW
3598 "Ticked message face."
3599 :group 'mh-faces
23347d76 3600 :group 'mh-folder
70a1d47e 3601 :package-version '(MH-E . "8.0"))
dda00b2c 3602
c90c4cf1 3603(defface-mh mh-folder-to (mh-face-data 'mh-folder-to)
dda00b2c
BW
3604 "\"To:\" face."
3605 :group 'mh-faces
23347d76 3606 :group 'mh-folder
70a1d47e 3607 :package-version '(MH-E . "8.0"))
dda00b2c 3608
c90c4cf1 3609(defface-mh mh-letter-header-field (mh-face-data 'mh-letter-header-field)
dda00b2c
BW
3610 "Editable header field value face in draft buffers."
3611 :group 'mh-faces
23347d76 3612 :group 'mh-letter
70a1d47e 3613 :package-version '(MH-E . "8.0"))
dda00b2c 3614
c90c4cf1 3615(defface-mh mh-search-folder (mh-face-data 'mh-search-folder)
6d21875b
BW
3616 "Folder heading face in MH-Folder buffers created by searches."
3617 :group 'mh-faces
23347d76 3618 :group 'mh-search
70a1d47e 3619 :package-version '(MH-E . "8.0"))
6d21875b 3620
c90c4cf1 3621(defface-mh mh-show-cc (mh-face-data 'mh-show-cc)
dda00b2c
BW
3622 "Face used to highlight \"cc:\" header fields."
3623 :group 'mh-faces
23347d76 3624 :group 'mh-show
70a1d47e 3625 :package-version '(MH-E . "8.0"))
dda00b2c 3626
c90c4cf1 3627(defface-mh mh-show-date (mh-face-data 'mh-show-date)
dda00b2c
BW
3628 "Face used to highlight \"Date:\" header fields."
3629 :group 'mh-faces
23347d76 3630 :group 'mh-show
70a1d47e 3631 :package-version '(MH-E . "8.0"))
dda00b2c 3632
c90c4cf1 3633(defface-mh mh-show-from (mh-face-data 'mh-show-from)
dda00b2c
BW
3634 "Face used to highlight \"From:\" header fields."
3635 :group 'mh-faces
23347d76 3636 :group 'mh-show
70a1d47e 3637 :package-version '(MH-E . "8.0"))
dda00b2c 3638
c90c4cf1 3639(defface-mh mh-show-header (mh-face-data 'mh-show-header)
dda00b2c
BW
3640 "Face used to deemphasize less interesting header fields."
3641 :group 'mh-faces
23347d76 3642 :group 'mh-show
70a1d47e 3643 :package-version '(MH-E . "8.0"))
dda00b2c 3644
c90c4cf1 3645(defface-mh mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad)
dda00b2c
BW
3646 "Bad PGG signature face."
3647 :group 'mh-faces
23347d76 3648 :group 'mh-show
70a1d47e 3649 :package-version '(MH-E . "8.0"))
dda00b2c 3650
c90c4cf1 3651(defface-mh mh-show-pgg-good (mh-face-data 'mh-show-pgg-good)
dda00b2c
BW
3652 "Good PGG signature face."
3653 :group 'mh-faces
23347d76 3654 :group 'mh-show
70a1d47e 3655 :package-version '(MH-E . "8.0"))
dda00b2c 3656
c90c4cf1 3657(defface-mh mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown)
dda00b2c
BW
3658 "Unknown or untrusted PGG signature face."
3659 :group 'mh-faces
23347d76 3660 :group 'mh-show
70a1d47e 3661 :package-version '(MH-E . "8.0"))
dda00b2c 3662
c90c4cf1 3663(defface-mh mh-show-signature (mh-face-data 'mh-show-signature)
dda00b2c
BW
3664 "Signature face."
3665 :group 'mh-faces
23347d76 3666 :group 'mh-show
70a1d47e 3667 :package-version '(MH-E . "8.0"))
dda00b2c 3668
c90c4cf1 3669(defface-mh mh-show-subject
6d21875b 3670 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
dda00b2c
BW
3671 "Face used to highlight \"Subject:\" header fields."
3672 :group 'mh-faces
23347d76 3673 :group 'mh-show
70a1d47e 3674 :package-version '(MH-E . "8.0"))
dda00b2c 3675
c90c4cf1 3676(defface-mh mh-show-to (mh-face-data 'mh-show-to)
dda00b2c
BW
3677 "Face used to highlight \"To:\" header fields."
3678 :group 'mh-faces
23347d76 3679 :group 'mh-show
70a1d47e 3680 :package-version '(MH-E . "8.0"))
dda00b2c 3681
c90c4cf1 3682(defface-mh mh-show-xface
6d21875b 3683 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight)))))
6d21875b 3684"X-Face image face.
dda00b2c
BW
3685The background and foreground are used in the image."
3686 :group 'mh-faces
23347d76 3687 :group 'mh-show
70a1d47e 3688 :package-version '(MH-E . "8.0"))
dda00b2c 3689
c90c4cf1 3690(defface-mh mh-speedbar-folder (mh-face-data 'mh-speedbar-folder)
dda00b2c
BW
3691 "Basic folder face."
3692 :group 'mh-faces
23347d76 3693 :group 'mh-speedbar
70a1d47e 3694 :package-version '(MH-E . "8.0"))
dda00b2c 3695
c90c4cf1 3696(defface-mh mh-speedbar-folder-with-unseen-messages
6d21875b
BW
3697 (mh-face-data 'mh-speedbar-folder
3698 '((t (:inherit mh-speedbar-folder :bold t))))
dda00b2c
BW
3699 "Folder face when folder contains unread messages."
3700 :group 'mh-faces
23347d76 3701 :group 'mh-speedbar
70a1d47e 3702 :package-version '(MH-E . "8.0"))
dda00b2c 3703
c90c4cf1 3704(defface-mh mh-speedbar-selected-folder
6d21875b 3705 (mh-face-data 'mh-speedbar-selected-folder)
dda00b2c
BW
3706 "Selected folder face."
3707 :group 'mh-faces
23347d76 3708 :group 'mh-speedbar
70a1d47e 3709 :package-version '(MH-E . "8.0"))
dda00b2c 3710
c90c4cf1 3711(defface-mh mh-speedbar-selected-folder-with-unseen-messages
6d21875b
BW
3712 (mh-face-data 'mh-speedbar-selected-folder
3713 '((t (:inherit mh-speedbar-selected-folder :bold t))))
dda00b2c
BW
3714 "Selected folder face when folder contains unread messages."
3715 :group 'mh-faces
23347d76 3716 :group 'mh-speedbar
70a1d47e 3717 :package-version '(MH-E . "8.0"))
f1ed9461 3718
bdcfe844
BW
3719(provide 'mh-e)
3720
cee9f5c6
BW
3721;; Local Variables:
3722;; indent-tabs-mode: nil
3723;; sentence-end-double-space: nil
3724;; End:
bdcfe844 3725
c26cf6c8 3726;;; mh-e.el ends here