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