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