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