1 ;;; mh-e.el --- GNU Emacs interface to the MH mail system
3 ;; Copyright (C) 1985, 1986, 1987, 1988,
4 ;; 1990, 1992, 1993, 1994, 1995, 1997, 1999,
5 ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7 ;; Author: Bill Wohler <wohler@newt.com>
8 ;; Maintainer: Bill Wohler <wohler@newt.com>
12 ;; This file is part of GNU Emacs.
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by
16 ;; the Free Software Foundation; either version 2, or (at your option)
19 ;; GNU Emacs is distributed in the hope that it will be useful,
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;; GNU General Public License for more details.
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27 ;; Boston, MA 02110-1301, USA.
32 ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands.
33 ;; C-u M-x mh-rmail to visit any folder.
34 ;; M-x mh-smail to send mail. From within the mail reader, "s" works, too.
36 ;; Your .emacs might benefit from these bindings:
37 ;; (global-set-key "\C-cr" 'mh-rmail)
38 ;; (global-set-key "\C-xm" 'mh-smail)
39 ;; (global-set-key "\C-x4m" 'mh-smail-other-window)
41 ;; If Emacs can't find mh-rmail or mh-smail, add the following to ~/.emacs:
42 ;; (require 'mh-autoloads)
44 ;; If you want to customize MH-E before explicitly loading it, add this:
45 ;; (require 'mh-cus-load)
47 ;; MH (Message Handler) is a powerful mail reader.
49 ;; The MH newsgroup is comp.mail.mh; the mailing list is mh-users@ics.uci.edu
50 ;; (send to mh-users-request to be added). See the monthly Frequently Asked
51 ;; Questions posting there for information on getting MH and MH-E:
52 ;; http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html
54 ;; N.B. MH must have been compiled with the MHE compiler flag or several
55 ;; features necessary for MH-E will be missing from MH commands, specifically
56 ;; the -build switch to repl and forw.
58 ;; MH-E is an Emacs interface to the MH mail system.
60 ;; MH-E is supported in GNU Emacs 21 and 22 as well as XEmacs 21
61 ;; (except for versions 21.5.9-21.5.16), with MH 6.8.4 on, nmh 1.0.4
62 ;; on, and GNU mailutils 0.4 on.
65 ;; mh-e-users@lists.sourceforge.net
66 ;; mh-e-announce@lists.sourceforge.net
67 ;; mh-e-devel@lists.sourceforge.net
69 ;; Subscribe by sending a "subscribe" message to
70 ;; <list>-request@lists.sourceforge.net, or by using the web interface at
71 ;; https://sourceforge.net/mail/?group_id=13357
74 ;; https://sourceforge.net/tracker/?group_id=13357&atid=113357
75 ;; Include the output of M-x mh-version in the bug report unless
76 ;; you're 110% sure we won't ask for it.
79 ;; https://sourceforge.net/tracker/?group_id=13357&atid=363357
82 ;; https://sourceforge.net/tracker/?group_id=13357&atid=213357
86 ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982.
87 ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985.
88 ;; Rewritten for GNU Emacs, James Larus, 1985.
89 ;; Modified by Stephen Gildea, 1988.
90 ;; Maintenance picked up by Bill Wohler and the
91 ;; SourceForge Crew <http://mh-e.sourceforge.net/>, 2001.
95 ;; Provide functions to the rest of MH-E. However, mh-e.el must not
96 ;; use any definitions in files that require mh-e from mh-loaddefs,
97 ;; for if it does it will introduce a require loop.
98 (require 'mh-loaddefs)
103 (defvar mh-xemacs-flag (featurep 'xemacs)
104 "Non-nil means the current Emacs is XEmacs."))
107 (require 'mh-xemacs))
109 (require 'mh-buffers)
116 ;; Try to keep variables local to a single file. Provide accessors if
117 ;; variables are shared. Use this section as a last resort.
119 (defconst mh-version "7.93+cvs" "Version number of MH-E.")
124 '("/usr/local/nmh/bin" ; nmh default
127 "/usr/bin/mh/" ; Ultrix 4.2, Linux
128 "/usr/new/mh/" ; Ultrix < 4.2
129 "/usr/contrib/mh/bin/" ; BSDI
130 "/usr/pkg/bin/" ; NetBSD
132 "/usr/local/bin/mu-mh/" ; GNU mailutils - default
133 "/usr/bin/mu-mh/") ; GNU mailutils - packaged
134 "List of directories to search for variants of the MH variant.
135 The list `exec-path' is searched in addition to this list.
136 There's no need for users to modify this list. Instead add extra
137 directories to the customizable variable `mh-path'.")
139 (defvar mh-variants nil
140 "List describing known MH variants.
141 Do not access this variable directly as it may not have yet been initialized.
142 Use the function `mh-variants' instead.")
144 (defvar mh-variant-in-use nil
145 "The MH variant currently in use; a string with variant and version number.
146 This differs from `mh-variant' when the latter is set to
150 "Directory containing MH commands, such as inc, repl, and rmm.")
153 (put 'mh-progs 'risky-local-variable t)
156 "Directory containing the MH library.
157 This directory contains, among other things, the components file.")
160 (put 'mh-lib 'risky-local-variable t)
162 (defvar mh-lib-progs nil
163 "Directory containing MH helper programs.
164 This directory contains, among other things, the mhl program.")
167 (put 'mh-lib-progs 'risky-local-variable t)
169 ;; Profile Components
171 (defvar mh-draft-folder nil
172 "Cached value of the \"Draft-Folder:\" MH profile component.
173 Name of folder containing draft messages.
174 Nil means do not use a draft folder.")
177 "Cached value of the \"Inbox:\" MH profile component.
178 Set to \"+inbox\" if no such component.
179 Name of the Inbox folder.")
181 (defvar mh-user-path nil
182 "Cached value of the \"Path:\" MH profile component.
183 User's mail folder directory.")
185 ;; Maps declared here so that they can be used in docstrings.
187 (defvar mh-folder-mode-map (make-keymap)
188 "Keymap for MH-Folder mode.")
190 (defvar mh-folder-seq-tool-bar-map nil
191 "Keymap for MH-Folder tool bar.")
193 (defvar mh-folder-tool-bar-map nil
194 "Keymap for MH-Folder tool bar.")
196 (defvar mh-inc-spool-map (make-sparse-keymap)
197 "Keymap for MH-E's mh-inc-spool commands.")
199 (defvar mh-letter-mode-map (copy-keymap text-mode-map)
200 "Keymap for MH-Letter mode.")
202 (defvar mh-letter-tool-bar-map nil
203 "Keymap for MH-Letter tool bar.")
205 (defvar mh-search-mode-map (make-sparse-keymap)
206 "Keymap for MH-Search mode.")
208 (defvar mh-show-mode-map (make-sparse-keymap)
209 "Keymap MH-Show mode.")
211 (defvar mh-show-seq-tool-bar-map nil
212 "Keymap for MH-Show tool bar.")
214 (defvar mh-show-tool-bar-map nil
215 "Keymap for MH-Show tool bar.")
217 ;; MH-Folder Locals (alphabetical)
219 (defvar mh-arrow-marker nil
220 "Marker for arrow display in fringe.")
222 (defvar mh-colors-available-flag nil
223 "Non-nil means colors are available.")
225 (defvar mh-current-folder nil
226 "Name of current folder, a string.")
228 (defvar mh-delete-list nil
229 "List of message numbers to delete.
230 This variable can be used by
231 `mh-before-commands-processed-hook'.")
233 (defvar mh-folder-view-stack nil
234 "Stack of previous folder views.")
236 (defvar mh-index-data nil
237 "Info about index search results.")
239 (defvar mh-index-previous-search nil)
241 (defvar mh-index-msg-checksum-map nil)
243 (defvar mh-index-checksum-origin-map nil)
245 (defvar mh-index-sequence-search-flag nil)
247 (defvar mh-mode-line-annotation nil
248 "Message range displayed in buffer.")
250 (defvar mh-next-direction 'forward
251 "Direction to move to next message.")
253 (defvar mh-previous-window-config nil
254 "Window configuration before MH-E command.")
256 (defvar mh-refile-list nil
257 "List of folder names in `mh-seq-list'.
258 This variable can be used by
259 `mh-before-commands-processed-hook'.")
261 (defvar mh-seen-list nil
262 "List of displayed messages to be removed from the \"Unseen\" sequence.")
264 (defvar mh-seq-list nil
265 "Alist of this folder's sequences.
266 Elements have the form (SEQUENCE . MESSAGES).")
268 (defvar mh-sequence-notation-history nil
269 "Remember original notation that is overwritten by `mh-note-seq'.")
271 (defvar mh-show-buffer nil
272 "Buffer that displays message for this folder.")
274 (defvar mh-showing-mode nil
275 "If non-nil, show the message in a separate window.")
277 (defvar mh-view-ops nil
278 "Stack of operations that change the folder view.
279 These operations include narrowing or threading.")
281 ;; MH-Show Locals (alphabetical)
283 (defvar mh-globals-hash (make-hash-table)
284 "Keeps track of MIME data on a per buffer basis.")
286 (defvar mh-show-folder-buffer nil
287 "Keeps track of folder whose message is being displayed.")
291 (defvar mh-folders-changed nil
292 "Lists which folders were affected by deletes and refiles.
293 This list will always include the current folder
294 `mh-current-folder'. This variable can be used by
295 `mh-after-commands-processed-hook'.")
297 (defvar mh-mail-header-separator "--------"
298 "*Line used by MH to separate headers from text in messages being composed.
300 This variable should not be used directly in programs. Programs
301 should use `mail-header-separator' instead.
302 `mail-header-separator' is initialized to
303 `mh-mail-header-separator' in `mh-letter-mode'; in other
304 contexts, you may have to perform this initialization yourself.
306 Do not make this a regular expression as it may be the argument
307 to `insert' and it is passed through `regexp-quote' before being
308 used by functions like `re-search-forward'.")
310 (defvar mh-sent-from-folder nil
311 "Folder of msg assoc with this letter.")
313 (defvar mh-sent-from-msg nil
314 "Number of msg assoc with this letter.")
318 (defvar mh-unseen-seq nil
319 "Cached value of the \"Unseen-Sequence:\" MH profile component.
320 Name of the Unseen sequence.")
322 (defvar mh-previous-seq nil
323 "Cached value of the \"Previous-Sequence:\" MH profile component.
324 Name of the Previous sequence.")
326 ;; Etc. (alphabetical)
328 (defvar mh-flists-present-flag nil
329 "Non-nil means that we have \"flists\".")
331 (defvar mh-index-data-file ".mhe_index"
332 "MH-E specific file where index seach info is stored.")
334 (defvar mh-letter-header-field-regexp "^\\([A-Za-z][A-Za-z0-9-]*\\):")
336 (defvar mh-page-to-next-msg-flag nil
337 "Non-nil means next SPC or whatever goes to next undeleted message.")
339 (defvar mh-pgp-support-flag (not (not (locate-library "mml2015")))
340 "Non-nil means PGP support is available.")
342 (defvar mh-signature-separator "-- \n"
343 "Text of a signature separator.
345 A signature separator is used to separate the body of a message
346 from the signature. This can be used by user agents such as MH-E
347 to render the signature differently or to suppress the inclusion
348 of the signature in a reply. Use `mh-signature-separator-regexp'
349 when searching for a separator.")
351 (defvar mh-signature-separator-regexp "^-- $"
352 "This regular expression matches the signature separator.
353 See `mh-signature-separator'.")
355 (defvar mh-thread-scan-line-map nil
356 "Map of message index to various parts of the scan line.")
357 (make-variable-buffer-local 'mh-thread-scan-line-map)
359 (defvar mh-thread-scan-line-map-stack nil
360 "Old map of message index to various parts of the scan line.
361 This is the original map that is stored when the folder is
363 (make-variable-buffer-local 'mh-thread-scan-line-map-stack)
365 (defvar mh-x-mailer-string nil
366 "*String containing the contents of the X-Mailer header field.
367 If nil, this variable is initialized to show the version of MH-E,
368 Emacs, and MH the first time a message is composed.")
372 ;;; MH-E Entry Points
374 (eval-when-compile (require 'gnus))
376 (defmacro mh-macro-expansion-time-gnus-version ()
377 "Return Gnus version available at macro expansion time.
378 The macro evaluates the Gnus version at macro expansion time. If
379 MH-E was compiled then macro expansion happens at compile time."
382 (defun mh-run-time-gnus-version ()
383 "Return Gnus version available at run time."
389 "Display version information about MH-E and the MH mail handling system."
391 (set-buffer (get-buffer-create mh-info-buffer))
394 (insert "MH-E " mh-version "\n\n")
395 ;; MH-E compilation details.
396 (insert "MH-E compilation details:\n")
397 (let* ((compiled-mhe (byte-code-function-p (symbol-function 'mh-version)))
398 (gnus-compiled-version (if compiled-mhe
399 (mh-macro-expansion-time-gnus-version)
401 (insert " Byte compiled:\t\t" (if compiled-mhe "yes" "no") "\n"
402 " Gnus (compile-time):\t" gnus-compiled-version "\n"
403 " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n"))
405 (insert (emacs-version) "\n\n")
407 (if mh-variant-in-use
408 (insert mh-variant-in-use "\n"
409 " mh-progs:\t" mh-progs "\n"
410 " mh-lib:\t" mh-lib "\n"
411 " mh-lib-progs:\t" mh-lib-progs "\n\n")
412 (insert "No MH variant detected\n"))
415 (call-process "uname" nil t nil "-a")
417 (goto-char (point-min))
418 (display-buffer mh-info-buffer))
424 (defun mh-list-to-string (l)
425 "Flatten the list L and make every element of the new list into a string."
426 (nreverse (mh-list-to-string-1 l)))
428 (defun mh-list-to-string-1 (l)
429 "Flatten the list L and make every element of the new list into a string."
432 (cond ((null element))
434 (push (symbol-name element) new-list))
436 (push (int-to-string element) new-list))
439 (push element new-list))
441 (setq new-list (nconc (mh-list-to-string-1 element) new-list)))
443 (error "Bad element: %s" element))))
448 ;;; MH-E Process Support
450 (defvar mh-index-max-cmdline-args 500
451 "Maximum number of command line args.")
453 (defun mh-xargs (cmd &rest args)
454 "Partial imitation of xargs.
455 The current buffer contains a list of strings, one on each line.
456 The function will execute CMD with ARGS and pass the first
457 `mh-index-max-cmdline-args' strings to it. This is repeated till
458 all the strings have been used."
459 (goto-char (point-min))
460 (let ((current-buffer (current-buffer)))
462 (let ((out (current-buffer)))
463 (set-buffer current-buffer)
465 (let ((arg-list (reverse args))
467 (while (and (not (eobp)) (< count mh-index-max-cmdline-args))
468 (push (buffer-substring-no-properties (point)
469 (mh-line-end-position))
473 (apply #'call-process cmd nil (list out nil) nil
474 (nreverse arg-list))))
476 (insert-buffer-substring out)))))
478 ;; XXX This should be applied anywhere MH-E calls out to /bin/sh.
479 (defun mh-quote-for-shell (string)
480 "Quote STRING for /bin/sh.
481 Adds double-quotes around entire string and quotes the characters
482 \\, `, and $ with a backslash."
484 (loop for x across string
485 concat (format (if (memq x '(?\\ ?` ?$)) "\\%c" "%c") x))
488 (defun mh-exec-cmd (command &rest args)
489 "Execute mh-command COMMAND with ARGS.
490 The side effects are what is desired. Any output is assumed to be
491 an error and is shown to the user. The output is not read or
494 (set-buffer (get-buffer-create mh-log-buffer))
495 (let* ((initial-size (mh-truncate-log-buffer))
497 (args (mh-list-to-string args)))
498 (apply 'call-process (expand-file-name command mh-progs) nil t nil args)
499 (when (> (buffer-size) initial-size)
502 (insert "Errors when executing: " command)
503 (loop for arg in args do (insert " " arg))
505 (save-window-excursion
506 (switch-to-buffer-other-window mh-log-buffer)
509 (defun mh-exec-cmd-error (env command &rest args)
510 "In environment ENV, execute mh-command COMMAND with ARGS.
511 ENV is nil or a string of space-separated \"var=value\" elements.
512 Signals an error if process does not complete successfully."
514 (set-buffer (get-buffer-create mh-temp-buffer))
516 (let ((process-environment process-environment))
517 ;; XXX: We should purge the list that split-string returns of empty
518 ;; strings. This can happen in XEmacs if leading or trailing spaces
520 (dolist (elem (if (stringp env) (split-string env " ") ()))
521 (push elem process-environment))
522 (mh-handle-process-error
523 command (apply #'call-process (expand-file-name command mh-progs)
524 nil t nil (mh-list-to-string args))))))
526 (defun mh-exec-cmd-daemon (command filter &rest args)
527 "Execute MH command COMMAND in the background.
529 If FILTER is non-nil then it is used to process the output
530 otherwise the default filter `mh-process-daemon' is used. See
531 `set-process-filter' for more details of FILTER.
533 ARGS are passed to COMMAND as command line arguments."
535 (set-buffer (get-buffer-create mh-log-buffer))
536 (mh-truncate-log-buffer))
537 (let* ((process-connection-type nil)
538 (process (apply 'start-process
540 (expand-file-name command mh-progs)
541 (mh-list-to-string args))))
542 (set-process-filter process (or filter 'mh-process-daemon))
545 (defun mh-exec-cmd-env-daemon (env command filter &rest args)
546 "In ennvironment ENV, execute mh-command COMMAND in the background.
548 ENV is nil or a string of space-separated \"var=value\" elements.
549 Signals an error if process does not complete successfully.
551 If FILTER is non-nil then it is used to process the output
552 otherwise the default filter `mh-process-daemon' is used. See
553 `set-process-filter' for more details of FILTER.
555 ARGS are passed to COMMAND as command line arguments."
556 (let ((process-environment process-environment))
557 (dolist (elem (if (stringp env) (split-string env " ") ()))
558 (push elem process-environment))
559 (apply #'mh-exec-cmd-daemon command filter args)))
561 (defun mh-process-daemon (process output)
562 "PROCESS daemon that puts OUTPUT into a temporary buffer.
563 Any output from the process is displayed in an asynchronous
565 (with-current-buffer (get-buffer-create mh-log-buffer)
566 (insert-before-markers output)
567 (display-buffer mh-log-buffer)))
569 (defun mh-exec-cmd-quiet (raise-error command &rest args)
570 "Signal RAISE-ERROR if COMMAND with ARGS fails.
571 Execute MH command COMMAND with ARGS. ARGS is a list of strings.
572 Return at start of mh-temp buffer, where output can be parsed and
574 Returns value of `call-process', which is 0 for success, unless
575 RAISE-ERROR is non-nil, in which case an error is signaled if
576 `call-process' returns non-0."
577 (set-buffer (get-buffer-create mh-temp-buffer))
581 (expand-file-name command mh-progs) nil t nil
583 (goto-char (point-min))
585 (mh-handle-process-error command value)
588 (defun mh-exec-cmd-output (command display &rest args)
589 "Execute MH command COMMAND with DISPLAY flag and ARGS.
590 Put the output into buffer after point.
591 Set mark after inserted text.
592 Output is expected to be shown to user, not parsed by MH-E."
593 (push-mark (point) t)
595 (expand-file-name command mh-progs) nil t display
596 (mh-list-to-string args))
598 ;; The following is used instead of 'exchange-point-and-mark because the
599 ;; latter activates the current region (between point and mark), which
600 ;; turns on highlighting. So prior to this bug fix, doing "inc" would
601 ;; highlight a region containing the new messages, which is undesirable.
602 ;; The bug wasn't seen in emacs21 but still occurred in XEmacs21.4.
603 (mh-exchange-point-and-mark-preserving-active-mark))
606 (eval-when-compile (mh-do-in-xemacs (defvar mark-active)))
608 (defun mh-exchange-point-and-mark-preserving-active-mark ()
609 "Put the mark where point is now, and point where the mark is now.
610 This command works even when the mark is not active, and
611 preserves whether the mark is active or not."
613 (let ((is-active (and (boundp 'mark-active) mark-active)))
614 (let ((omark (mark t)))
616 (error "No mark set in this buffer"))
619 (if (boundp 'mark-active)
620 (setq mark-active is-active))
623 (defun mh-exec-lib-cmd-output (command &rest args)
624 "Execute MH library command COMMAND with ARGS.
625 Put the output into buffer after point.
626 Set mark after inserted text."
627 (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args))
629 (defun mh-handle-process-error (command status)
630 "Raise error if COMMAND returned non-zero STATUS, otherwise return STATUS."
633 (goto-char (point-min))
634 (insert (if (integerp status)
635 (format "%s: exit code %d\n" command status)
636 (format "%s: %s\n" command status)))
638 (let ((error-message (buffer-substring (point-min) (point-max))))
639 (set-buffer (get-buffer-create mh-log-buffer))
640 (mh-truncate-log-buffer)
641 (insert error-message)))
642 (error "%s failed, check buffer %s for error message"
643 command mh-log-buffer)))
649 (defcustom mh-path nil
650 "*Additional list of directories to search for MH.
653 :type '(repeat (directory)))
655 (defun mh-variants ()
656 "Return a list of installed variants of MH on the system.
657 This function looks for MH in `mh-sys-path', `mh-path' and
658 `exec-path'. The format of the list of variants that is returned
659 is described by the variable `mh-variants'."
663 ;; Make a unique list of directories, keeping the given order.
664 ;; We don't want the same MH variant to be listed multiple times.
665 (loop for dir in (append mh-path mh-sys-path exec-path) do
666 (setq dir (file-chase-links (directory-file-name dir)))
667 (add-to-list 'list-unique dir))
668 (loop for dir in (nreverse list-unique) do
669 (when (and dir (file-directory-p dir) (file-readable-p dir))
670 (let ((variant (mh-variant-info dir)))
672 (add-to-list 'mh-variants variant)))))
675 (defun mh-variant-info (dir)
676 "Return MH variant found in DIR, or nil if none present."
678 (let ((tmp-buffer (get-buffer-create mh-temp-buffer)))
679 (set-buffer tmp-buffer)
681 ((mh-variant-mh-info dir))
682 ((mh-variant-nmh-info dir))
683 ((mh-variant-mu-mh-info dir))))))
685 (defun mh-variant-mh-info (dir)
686 "Return info for MH variant in DIR assuming a temporary buffer is setup."
687 ;; MH does not have the -version option.
688 ;; Its version number is included in the output of "-help" as:
690 ;; version: MH 6.8.4 #2[UCI] (burrito) of Fri Jan 15 20:01:39 EST 1999
691 ;; options: [ATHENA] [BIND] [DUMB] [LIBLOCKFILE] [LOCALE] [MAILGROUP] [MHE]
692 ;; [MHRC] [MIME] [MORE='"/usr/bin/sensible-pager"'] [NLINK_HACK]
693 ;; [NORUSERPASS] [OVERHEAD] [POP] [POPSERVICE='"pop-3"'] [RENAME]
694 ;; [RFC1342] [RPATHS] [RPOP] [SENDMTS] [SMTP] [SOCKETS]
695 ;; [SPRINTFTYPE=int] [SVR4] [SYS5] [SYS5DIR] [TERMINFO]
696 ;; [TYPESIG=void] [UNISTD] [UTK] [VSPRINTF]
697 (let ((mhparam (expand-file-name "mhparam" dir)))
698 (when (mh-file-command-p mhparam)
700 (call-process mhparam nil '(t nil) nil "-help")
701 (goto-char (point-min))
702 (when (search-forward-regexp "version: MH \\(\\S +\\)" nil t)
703 (let ((version (format "MH %s" (match-string 1))))
705 (call-process mhparam nil '(t nil) nil "libdir")
706 (goto-char (point-min))
707 (when (search-forward-regexp "^.*$" nil t)
708 (let ((libdir (match-string 0)))
711 (mh-lib-progs ,libdir)
716 (defun mh-variant-mu-mh-info (dir)
717 "Return info for GNU mailutils variant in DIR.
718 This assumes that a temporary buffer is setup."
719 ;; 'mhparam -version' output:
720 ;; mhparam (GNU mailutils 0.3.2)
721 (let ((mhparam (expand-file-name "mhparam" dir)))
722 (when (mh-file-command-p mhparam)
724 (call-process mhparam nil '(t nil) nil "-version")
725 (goto-char (point-min))
726 (when (search-forward-regexp "mhparam (\\(GNU [Mm]ailutils \\S +\\))"
728 (let ((version (match-string 1))
732 (mh-lib-progs ,(mh-profile-component "libdir"))
733 (mh-lib ,(mh-profile-component "etcdir"))
735 (flists ,(file-exists-p
736 (expand-file-name "flists" dir)))))))))
738 (defun mh-variant-nmh-info (dir)
739 "Return info for nmh variant in DIR assuming a temporary buffer is setup."
740 ;; `mhparam -version' outputs:
741 ;; mhparam -- nmh-1.1-RC1 [compiled on chaak at Fri Jun 20 11:03:28 PDT 2003]
742 (let ((mhparam (expand-file-name "mhparam" dir)))
743 (when (mh-file-command-p mhparam)
745 (call-process mhparam nil '(t nil) nil "-version")
746 (goto-char (point-min))
747 (when (search-forward-regexp "mhparam -- nmh-\\(\\S +\\)" nil t)
748 (let ((version (format "nmh %s" (match-string 1)))
752 (mh-lib-progs ,(mh-profile-component "libdir"))
753 (mh-lib ,(mh-profile-component "etcdir"))
755 (flists ,(file-exists-p
756 (expand-file-name "flists" dir)))))))))
758 (defun mh-file-command-p (file)
759 "Return t if file FILE is the name of a executable regular file."
760 (and (file-regular-p file) (file-executable-p file)))
762 (defun mh-variant-set-variant (variant)
763 "Setup the system variables for the MH variant named VARIANT.
764 If VARIANT is a string, use that key in the alist returned by the
765 function `mh-variants'.
766 If VARIANT is a symbol, select the first entry that matches that
769 ((stringp variant) ;e.g. "nmh 1.1-RC1"
770 (when (assoc variant (mh-variants))
771 (let* ((alist (cdr (assoc variant (mh-variants))))
772 (lib-progs (cadr (assoc 'mh-lib-progs alist)))
773 (lib (cadr (assoc 'mh-lib alist)))
774 (progs (cadr (assoc 'mh-progs alist)))
775 (flists (cadr (assoc 'flists alist))))
776 ;;(set-default mh-variant variant)
777 (setq mh-x-mailer-string nil
778 mh-flists-present-flag flists
779 mh-lib-progs lib-progs
782 mh-variant-in-use variant))))
783 ((symbolp variant) ;e.g. 'nmh (pick the first match)
784 (loop for variant-list in (mh-variants)
785 when (eq variant (cadr (assoc 'variant (cdr variant-list))))
786 return (let* ((version (car variant-list))
787 (alist (cdr variant-list))
788 (lib-progs (cadr (assoc 'mh-lib-progs alist)))
789 (lib (cadr (assoc 'mh-lib alist)))
790 (progs (cadr (assoc 'mh-progs alist)))
791 (flists (cadr (assoc 'flists alist))))
792 ;;(set-default mh-variant flavor)
793 (setq mh-x-mailer-string nil
794 mh-flists-present-flag flists
795 mh-lib-progs lib-progs
798 mh-variant-in-use version)
801 (defun mh-variant-p (&rest variants)
802 "Return t if variant is any of VARIANTS.
803 Currently known variants are 'MH, 'nmh, and 'mu-mh."
804 (let ((variant-in-use
805 (cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants))))))
806 (not (null (member variant-in-use variants)))))
808 (defun mh-profile-component (component)
809 "Return COMPONENT value from mhparam, or nil if unset."
811 ;; MH and nmh use -components, Mailutils uses -component. Since MH
812 ;; and nmh work with an unambiguous prefix, the `s' is dropped here.
813 (mh-exec-cmd-quiet nil "mhparam" "-component" component)
814 (mh-profile-component-value component)))
816 (defun mh-profile-component-value (component)
817 "Find and return the value of COMPONENT in the current buffer.
818 Returns nil if the component is not in the buffer."
819 (let ((case-fold-search t))
820 (goto-char (point-min))
821 (cond ((not (re-search-forward (format "^%s:" component) nil t)) nil)
822 ((looking-at "[\t ]*$") nil)
824 (re-search-forward "[\t ]*\\([^\t \n].*\\)$" nil t)
825 (let ((start (match-beginning 1)))
827 (buffer-substring start (point)))))))
829 (defun mh-variant-set (variant)
830 "Set the MH variant to VARIANT.
831 Sets `mh-progs', `mh-lib', `mh-lib-progs' and
832 `mh-flists-present-flag'.
833 If the VARIANT is \"autodetect\", then first try nmh, then MH and
834 finally GNU mailutils."
836 (list (completing-read
838 (mapcar (lambda (x) (list (car x))) (mh-variants))
840 (let ((valid-list (mapcar (lambda (x) (car x)) (mh-variants))))
843 ((eq variant 'autodetect)
845 ((mh-variant-set-variant 'nmh)
846 (message "%s installed as MH variant" mh-variant-in-use))
847 ((mh-variant-set-variant 'mh)
848 (message "%s installed as MH variant" mh-variant-in-use))
849 ((mh-variant-set-variant 'mu-mh)
850 (message "%s installed as MH variant" mh-variant-in-use))
852 (message "No MH variant found on the system"))))
853 ((member variant valid-list)
854 (when (not (mh-variant-set-variant variant))
855 (message "Warning: %s variant not found. Autodetecting..." variant)
856 (mh-variant-set 'autodetect)))
858 (message "Unknown variant; use %s"
859 (mapconcat '(lambda (x) (format "%s" (car x)))
860 (mh-variants) " or "))))))
862 (defcustom mh-variant 'autodetect
863 "*Specifies the variant used by MH-E.
865 The default setting of this option is \"Auto-detect\" which means
866 that MH-E will automatically choose the first of nmh, MH, or GNU
867 mailutils that it finds in the directories listed in
868 `mh-path' (which you can customize), `mh-sys-path', and
869 `exec-path'. If MH-E can't find MH at all, you may have to
870 customize `mh-path' and add the directory in which the command
871 \"mhparam\" is located. If, on the other hand, you have both nmh
872 and mailutils installed (for example) and `mh-variant-in-use' was
873 initialized to nmh but you want to use mailutils, then you can
874 set this option to \"mailutils\".
876 When this variable is changed, MH-E resets `mh-progs', `mh-lib',
877 `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
878 accordingly. Prior to version 8, it was often necessary to set
879 some of these variables in \"~/.emacs\"; now it is no longer
880 necessary and can actually cause problems."
882 (const :tag "Auto-detect" autodetect)
883 ,@(mapcar (lambda (x) `(const ,(car x))) (mh-variants)))
884 :set (lambda (symbol value)
885 (set-default symbol value) ;Done in mh-variant-set-variant!
886 (mh-variant-set value))
891 ;;; MH-E Customization Support Routines
893 ;; Shush compiler (Emacs 21 and XEmacs).
894 (defvar customize-package-emacs-version-alist)
896 ;; Temporary function and data structure used customization.
897 ;; These will be unbound after the options are defined.
898 (defun mh-strip-package-version (args)
899 "Strip :package-version keyword and its value from ARGS.
900 In Emacs versions that support the :package-version keyword,
901 ARGS is returned unchanged."
902 (if (boundp 'customize-package-emacs-version-alist)
905 (loop for keyword in args
906 if (cond ((eq keyword ':package-version) (setq seen t) nil)
907 (seen (setq seen nil) nil)
911 (defmacro mh-defgroup (symbol members doc &rest args)
912 "Declare SYMBOL as a customization group containing MEMBERS.
913 See documentation for `defgroup' for a description of the arguments
914 SYMBOL, MEMBERS, DOC and ARGS.
915 This macro is used by Emacs versions that lack the :package-version
916 keyword, introduced in Emacs 22."
917 (declare (doc-string 3))
918 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
919 (put 'mh-defgroup 'lisp-indent-function 'defun)
921 (defmacro mh-defcustom (symbol value doc &rest args)
922 "Declare SYMBOL as a customizable variable that defaults to VALUE.
923 See documentation for `defcustom' for a description of the arguments
924 SYMBOL, VALUE, DOC and ARGS.
925 This macro is used by Emacs versions that lack the :package-version
926 keyword, introduced in Emacs 22."
927 (declare (doc-string 3))
928 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
929 (put 'mh-defcustom 'lisp-indent-function 'defun)
931 (defmacro mh-defface (face spec doc &rest args)
932 "Declare FACE as a customizable face that defaults to SPEC.
933 See documentation for `defface' for a description of the arguments
934 FACE, SPEC, DOC and ARGS.
935 This macro is used by Emacs versions that lack the :package-version
936 keyword, introduced in Emacs 22."
937 (declare (doc-string 3))
938 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
939 (put 'mh-defface 'lisp-indent-function 'defun)
943 ;;; MH-E Customization
945 ;; All of the defgroups, defcustoms, and deffaces in MH-E are found
946 ;; here. This makes it possible to customize modules that aren't
947 ;; loaded yet. It also makes it easier to organize the customization
950 ;; This section contains the following sub-sections:
952 ;; 1. MH-E Customization Groups
954 ;; These are the customization group definitions. Every group has a
955 ;; associated manual node. The ordering is alphabetical, except for
956 ;; the groups mh-faces and mh-hooks which are last .
958 ;; 2. MH-E Customization
960 ;; These are the actual customization variables. There is a
961 ;; sub-section for each group in the MH-E Customization Groups
962 ;; section, in the same order, separated by page breaks. Within
963 ;; each section, variables are sorted alphabetically.
967 ;; All hooks must be placed in the mh-hook group; in addition, add
968 ;; the group associated with the manual node in which the hook is
969 ;; described. Since the mh-hook group appears near the end of this
970 ;; section, the hooks will appear at the end of these other groups.
974 ;; All faces must be placed in the mh-faces group; in addition, add
975 ;; the group associated with the manual node in which the face is
976 ;; described. Since the mh-faces group appears near the end of this
977 ;; section, the faces will appear at the end of these other groups.
979 (defun mh-customize (&optional delete-other-windows-flag)
980 "Customize MH-E variables.
981 If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other
982 windows in the frame are removed."
984 (customize-group 'mh-e)
985 (when delete-other-windows-flag
986 (delete-other-windows)))
988 (if (boundp 'customize-package-emacs-version-alist)
989 (add-to-list 'customize-package-emacs-version-alist
990 '(MH-E ("6.0" "22.1") ("6.1" "22.1") ("7.0" "22.1")
991 ("7.1" "22.1") ("7.2" "22.1") ("7.3" "22.1")
992 ("7.4" "22.1") ("8.0" "22.1"))))
996 ;;; MH-E Customization Groups
998 (mh-defgroup mh-e nil
999 "Emacs interface to the MH mail system.
1000 MH is the Rand Mail Handler. Other implementations include nmh
1002 :link '(custom-manual "(mh-e)Top")
1004 :package-version '(MH-E "8.0"))
1006 (mh-defgroup mh-alias nil
1008 :link '(custom-manual "(mh-e)Aliases")
1011 :package-version '(MH-E "7.1"))
1013 (mh-defgroup mh-folder nil
1014 "Organizing your mail with folders."
1016 :link '(custom-manual "(mh-e)Folders")
1018 :package-version '(MH-E "7.1"))
1020 (mh-defgroup mh-folder-selection nil
1023 :link '(custom-manual "(mh-e)Folder Selection")
1025 :package-version '(MH-E "8.0"))
1027 (mh-defgroup mh-identity nil
1029 :link '(custom-manual "(mh-e)Identities")
1030 :prefix "mh-identity-"
1032 :package-version '(MH-E "7.1"))
1034 (mh-defgroup mh-inc nil
1035 "Incorporating your mail."
1037 :link '(custom-manual "(mh-e)Incorporating Mail")
1039 :package-version '(MH-E "8.0"))
1041 (mh-defgroup mh-junk nil
1042 "Dealing with junk mail."
1043 :link '(custom-manual "(mh-e)Junk")
1046 :package-version '(MH-E "7.3"))
1048 (mh-defgroup mh-letter nil
1051 :link '(custom-manual "(mh-e)Editing Drafts")
1053 :package-version '(MH-E "7.1"))
1055 (mh-defgroup mh-ranges nil
1058 :link '(custom-manual "(mh-e)Ranges")
1060 :package-version '(MH-E "8.0"))
1062 (mh-defgroup mh-scan-line-formats nil
1063 "Scan line formats."
1064 :link '(custom-manual "(mh-e)Scan Line Formats")
1067 :package-version '(MH-E "8.0"))
1069 (mh-defgroup mh-search nil
1071 :link '(custom-manual "(mh-e)Searching")
1072 :prefix "mh-search-"
1074 :package-version '(MH-E "8.0"))
1076 (mh-defgroup mh-sending-mail nil
1079 :link '(custom-manual "(mh-e)Sending Mail")
1081 :package-version '(MH-E "8.0"))
1083 (mh-defgroup mh-sequences nil
1086 :link '(custom-manual "(mh-e)Sequences")
1088 :package-version '(MH-E "8.0"))
1090 (mh-defgroup mh-show nil
1091 "Reading your mail."
1093 :link '(custom-manual "(mh-e)Reading Mail")
1095 :package-version '(MH-E "7.1"))
1097 (mh-defgroup mh-speedbar nil
1100 :link '(custom-manual "(mh-e)Speedbar")
1102 :package-version '(MH-E "8.0"))
1104 (mh-defgroup mh-thread nil
1106 :prefix "mh-thread-"
1107 :link '(custom-manual "(mh-e)Threading")
1109 :package-version '(MH-E "8.0"))
1111 (mh-defgroup mh-tool-bar nil
1113 :link '(custom-manual "(mh-e)Tool Bar")
1116 :package-version '(MH-E "8.0"))
1118 (mh-defgroup mh-hooks nil
1120 :link '(custom-manual "(mh-e)Top")
1123 :package-version '(MH-E "7.1"))
1125 (mh-defgroup mh-faces nil
1126 "Faces used in MH-E."
1127 :link '(custom-manual "(mh-e)Top")
1131 :package-version '(MH-E "7.1"))
1135 ;;; MH-E Customization
1137 ;; See Variant Support, above, for mh-e group.
1139 ;;; Aliases (:group 'mh-alias)
1141 (mh-defcustom mh-alias-completion-ignore-case-flag t
1142 "*Non-nil means don't consider case significant in MH alias completion.
1144 As MH ignores case in the aliases, so too does MH-E. However, you
1145 may turn off this option to make case significant which can be
1146 used to segregate completion of your aliases. You might use
1147 lowercase for mailing lists and uppercase for people."
1150 :package-version '(MH-E "7.1"))
1152 (mh-defcustom mh-alias-expand-aliases-flag nil
1153 "*Non-nil means to expand aliases entered in the minibuffer.
1155 In other words, aliases entered in the minibuffer will be
1156 expanded to the full address in the message draft. By default,
1157 this expansion is not performed."
1160 :package-version '(MH-E "7.1"))
1162 (mh-defcustom mh-alias-flash-on-comma t
1163 "*Specify whether to flash address or warn on translation.
1165 This option controls the behavior when a [comma] is pressed while
1166 entering aliases or addresses. The default setting flashes the
1167 address associated with an address in the minibuffer briefly, but
1168 does not display a warning if the alias is not found."
1169 :type '(choice (const :tag "Flash but Don't Warn If No Alias" t)
1170 (const :tag "Flash and Warn If No Alias" 1)
1171 (const :tag "Don't Flash Nor Warn If No Alias" nil))
1173 :package-version '(MH-E "7.1"))
1175 (mh-defcustom mh-alias-insert-file nil
1176 "*Filename used to store a new MH-E alias.
1178 The default setting of this option is \"Use Aliasfile Profile
1179 Component\". This option can also hold the name of a file or a
1180 list a file names. If this option is set to a list of file names,
1181 or the \"Aliasfile:\" profile component contains more than one file
1182 name, MH-E will prompt for one of them when MH-E adds an alias."
1183 :type '(choice (const :tag "Use Aliasfile Profile Component" nil)
1184 (file :tag "Alias File")
1185 (repeat :tag "List of Alias Files" file))
1187 :package-version '(MH-E "7.1"))
1189 (mh-defcustom mh-alias-insertion-location 'sorted
1190 "Specifies where new aliases are entered in alias files.
1192 This option is set to \"Alphabetical\" by default. If you organize
1193 your alias file in other ways, then adding aliases to the \"Top\"
1194 or \"Bottom\" of your alias file might be more appropriate."
1195 :type '(choice (const :tag "Alphabetical" sorted)
1196 (const :tag "Top" top)
1197 (const :tag "Bottom" bottom))
1199 :package-version '(MH-E "7.1"))
1201 (mh-defcustom mh-alias-local-users t
1202 "*If on, local users are added to alias completion.
1204 Aliases are created from \"/etc/passwd\" entries with a user ID
1205 larger than a magical number, typically 200. This can be a handy
1206 tool on a machine where you and co-workers exchange messages.
1207 These aliases have the form \"local.first.last\" if a real name is
1208 present in the password file. Otherwise, the alias will have the
1209 form \"local.login\".
1211 If you're on a system with thousands of users you don't know, and
1212 the loading of local aliases slows MH-E down noticeably, then
1213 turn this option off.
1215 This option also takes a string which is executed to generate the
1216 password file. For example, use \"ypcat passwd\" to obtain the
1218 :type '(choice (boolean) (string))
1220 :package-version '(MH-E "7.1"))
1222 (mh-defcustom mh-alias-local-users-prefix "local."
1223 "*String prefixed to the real names of users from the password file.
1224 This option can also be set to \"Use Login\".
1226 For example, consider the following password file entry:
1228 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
1230 The following settings of this option will produce the associated
1233 \"local.\" local.peter.galbraith
1234 \"\" peter.galbraith
1237 This option has no effect if variable `mh-alias-local-users' is
1239 :type '(choice (const :tag "Use Login" nil)
1242 :package-version '(MH-E "7.4"))
1244 (mh-defcustom mh-alias-passwd-gecos-comma-separator-flag t
1245 "*Non-nil means the gecos field in the password file uses a comma separator.
1247 In the example in `mh-alias-local-users-prefix', commas are used
1248 to separate different values within the so-called gecos field.
1249 This is a fairly common usage. However, in the rare case that the
1250 gecos field in your password file is not separated by commas and
1251 whose contents may contain commas, you can turn this option off."
1254 :package-version '(MH-E "7.4"))
1256 ;;; Organizing Your Mail with Folders (:group 'mh-folder)
1258 (mh-defcustom mh-new-messages-folders t
1259 "Folders searched for the \"unseen\" sequence.
1261 Set this option to \"Inbox\" to search the \"+inbox\" folder or
1262 \"All\" to search all of the top level folders. Otherwise, list
1263 the folders that should be searched with the \"Choose Folders\"
1266 See also `mh-recursive-folders-flag'."
1267 :type '(choice (const :tag "Inbox" t)
1268 (const :tag "All" nil)
1269 (repeat :tag "Choose Folders" (string :tag "Folder")))
1271 :package-version '(MH-E "8.0"))
1273 (mh-defcustom mh-ticked-messages-folders t
1274 "Folders searched for `mh-tick-seq'.
1276 Set this option to \"Inbox\" to search the \"+inbox\" folder or
1277 \"All\" to search all of the top level folders. Otherwise, list
1278 the folders that should be searched with the \"Choose Folders\"
1281 See also `mh-recursive-folders-flag'."
1282 :type '(choice (const :tag "Inbox" t)
1283 (const :tag "All" nil)
1284 (repeat :tag "Choose Folders" (string :tag "Folder")))
1286 :package-version '(MH-E "8.0"))
1288 (mh-defcustom mh-large-folder 200
1289 "The number of messages that indicates a large folder.
1291 If a folder is deemed to be large, that is the number of messages
1292 in it exceed this value, then confirmation is needed when it is
1293 visited. Even when `mh-show-threads-flag' is non-nil, the folder
1294 is not automatically threaded, if it is large. If set to nil all
1295 folders are treated as if they are small."
1296 :type '(choice (const :tag "No Limit") integer)
1298 :package-version '(MH-E "7.0"))
1300 (mh-defcustom mh-recenter-summary-flag nil
1301 "*Non-nil means to recenter the summary window.
1303 If this option is turned on, recenter the summary window when the
1304 show window is toggled off."
1307 :package-version '(MH-E "7.0"))
1309 (mh-defcustom mh-recursive-folders-flag nil
1310 "*Non-nil means that commands which operate on folders do so recursively."
1313 :package-version '(MH-E "7.0"))
1315 (mh-defcustom mh-sortm-args nil
1316 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>.
1318 This option is consulted when a prefix argument is used with
1319 \\[mh-sort-folder]. Normally default arguments to \"sortm\" are
1320 specified in the MH profile. This option may be used to provide
1321 an alternate view. For example, \"'(\"-nolimit\" \"-textfield\"
1322 \"subject\")\" is a useful setting."
1325 :package-version '(MH-E "8.0"))
1327 ;;; Folder Selection (:group 'mh-folder-selection)
1329 (mh-defcustom mh-default-folder-for-message-function nil
1330 "Function to select a default folder for refiling or \"Fcc:\".
1332 When this function is called, the current buffer contains the message
1333 being refiled and point is at the start of the message. This function
1334 should return the default folder as a string with a leading \"+\"
1335 sign. It can also return nil so that the last folder name is used as
1336 the default, or an empty string to suppress the default entirely."
1338 :group 'mh-folder-selection
1339 :package-version '(MH-E "8.0"))
1341 (mh-defcustom mh-default-folder-list nil
1342 "*List of addresses and folders.
1344 The folder name associated with the first address found in this
1345 list is used as the default for `mh-refile-msg' and similar
1346 functions. Each element in this list contains a \"Check Recipient\"
1347 item. If this item is turned on, then the address is checked
1348 against the recipient instead of the sender. This is useful for
1351 See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1352 for more information."
1353 :type '(repeat (list (regexp :tag "Address")
1354 (string :tag "Folder")
1355 (boolean :tag "Check Recipient")))
1356 :group 'mh-folder-selection
1357 :package-version '(MH-E "7.2"))
1359 (mh-defcustom mh-default-folder-must-exist-flag t
1360 "*Non-nil means guessed folder name must exist to be used.
1362 If the derived folder does not exist, and this option is on, then
1363 the last folder name used is suggested. This is useful if you get
1364 mail from various people for whom you have an alias, but file
1365 them all in the same project folder.
1367 See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1368 for more information."
1370 :group 'mh-folder-selection
1371 :package-version '(MH-E "7.2"))
1373 (mh-defcustom mh-default-folder-prefix ""
1374 "*Prefix used for folder names generated from aliases.
1375 The prefix is used to prevent clutter in your mail directory.
1377 See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1378 for more information."
1380 :group 'mh-folder-selection
1381 :package-version '(MH-E "7.2"))
1383 ;;; Identities (:group 'mh-identity)
1386 (unless (fboundp 'mh-identity-make-menu-no-autoload)
1387 (defun mh-identity-make-menu-no-autoload ()
1388 "Temporary definition.
1389 Real definition will take effect when mh-identity is loaded."
1392 (mh-defcustom mh-identity-list nil
1393 "*List of identities.
1395 To customize this option, click on the \"INS\" button and enter a label
1396 such as \"Home\" or \"Work\". Then click on the \"INS\" button with the
1397 label \"Add at least one item below\". Then choose one of the items in
1400 You can specify an alternate \"From:\" header field using the \"From
1401 Field\" menu item. You must include a valid email address. A standard
1402 format is \"First Last <login@@host.domain>\". If you use an initial
1403 with a period, then you must quote your name as in '\"First I. Last\"
1404 <login@@host.domain>'. People usually list the name of the company
1405 where they work using the \"Organization Field\" menu item. Set any
1406 arbitrary header field and value in the \"Other Field\" menu item.
1407 Unless the header field is a standard one, precede the name of your
1408 field's label with \"X-\", as in \"X-Fruit-of-the-Day:\". The value of
1409 \"Attribution Verb\" overrides the setting of
1410 `mh-extract-from-attribution-verb'. Set your signature with the
1411 \"Signature\" menu item. You can specify the contents of
1412 `mh-signature-file-name', a file, or a function. Specify a different
1413 key to sign or encrypt messages with the \"GPG Key ID\" menu item.
1415 You can select the identities you have added via the menu called
1416 \"Identity\" in the MH-Letter buffer. You can also use
1417 \\[mh-insert-identity]. To clear the fields and signature added by the
1418 identity, select the \"None\" identity.
1420 The \"Identity\" menu contains two other items to save you from having
1421 to set the identity on every message. The menu item \"Set Default for
1422 Session\" can be used to set the default identity to the current
1423 identity until you exit Emacs. The menu item \"Save as Default\" sets
1424 the option `mh-identity-default' to the current identity setting. You
1425 can also customize the `mh-identity-default' option in the usual
1427 :type '(repeat (list :tag ""
1428 (string :tag "Label")
1429 (repeat :tag "Add at least one item below"
1431 (cons :tag "From Field"
1433 (string :tag "Value"))
1434 (cons :tag "Organization Field"
1435 (const "Organization")
1436 (string :tag "Value"))
1437 (cons :tag "Other Field"
1438 (string :tag "Field")
1439 (string :tag "Value"))
1440 (cons :tag "Attribution Verb"
1441 (const ":attribution-verb")
1442 (string :tag "Value"))
1443 (cons :tag "Signature"
1444 (const :tag "Signature"
1447 (const :tag "mh-signature-file-name"
1451 (cons :tag "GPG Key ID"
1452 (const :tag "GPG Key ID"
1453 ":pgg-default-user-id")
1454 (string :tag "Value"))))))
1455 :set (lambda (symbol value)
1456 (set-default symbol value)
1457 (mh-identity-make-menu-no-autoload))
1459 :package-version '(MH-E "7.1"))
1461 (mh-defcustom mh-auto-fields-list nil
1462 "List of recipients for which header lines are automatically inserted.
1464 This option can be used to set the identity depending on the
1465 recipient. To customize this option, click on the \"INS\" button and
1466 enter a regular expression for the recipient's address. Click on the
1467 \"INS\" button with the \"Add at least one item below\" label. Then choose
1468 one of the items in the \"Value Menu\".
1470 The \"Identity\" menu item is used to select an identity from those
1471 configured in `mh-identity-list'. All of the information for that
1472 identity will be added if the recipient matches. The \"Fcc Field\" menu
1473 item is used to select a folder that is used in the \"Fcc:\" header.
1474 When you send the message, MH will put a copy of your message in this
1475 folder. The \"Mail-Followup-To Field\" menu item is used to insert an
1476 \"Mail-Followup-To:\" header field with the recipients you provide. If
1477 the recipient's mail user agent supports this header field (as nmh
1478 does), then their replies will go to the addresses listed. This is
1479 useful if their replies go both to the list and to you and you don't
1480 have a mechanism to suppress duplicates. If you reply to someone not
1481 on the list, you must either remove the \"Mail-Followup-To:\" field, or
1482 ensure the recipient is also listed there so that he receives replies
1483 to your reply. Other header fields may be added using the \"Other
1486 These fields can only be added after the recipient is known. Once the
1487 header contains one or more recipients, run the
1488 \\[mh-insert-auto-fields] command or choose the \"Identity -> Insert
1489 Auto Fields\" menu item to insert these fields manually. However, you
1490 can just send the message and the fields will be added automatically.
1491 You are given a chance to see these fields and to confirm them before
1492 the message is actually sent. You can do away with this confirmation
1493 by turning off the option `mh-auto-fields-prompt-flag'.
1495 You should avoid using the same header field in `mh-auto-fields-list'
1496 and `mh-identity-list' definitions that may apply to the same message
1497 as the result is undefined."
1500 (string :tag "Recipient")
1501 (repeat :tag "Add at least one item below"
1503 (cons :tag "Identity"
1508 (function (lambda (arg) `(const ,arg)))
1509 (mapcar 'car mh-identity-list))))
1510 (cons :tag "Fcc Field"
1512 (string :tag "Value"))
1513 (cons :tag "Mail-Followup-To Field"
1514 (const "Mail-Followup-To")
1515 (string :tag "Value"))
1516 (cons :tag "Other Field"
1517 (string :tag "Field")
1518 (string :tag "Value"))))))
1520 :package-version '(MH-E "7.3"))
1522 (mh-defcustom mh-auto-fields-prompt-flag t
1523 "*Non-nil means to prompt before sending if fields inserted.
1524 See `mh-auto-fields-list'."
1527 :package-version '(MH-E "8.0"))
1529 (mh-defcustom mh-identity-default nil
1530 "Default identity to use when `mh-letter-mode' is called.
1531 See `mh-identity-list'."
1534 (cons '(const :tag "None" nil)
1535 (mapcar (function (lambda (arg) `(const ,arg)))
1536 (mapcar 'car mh-identity-list))))
1538 :package-version '(MH-E "7.1"))
1540 (mh-defcustom mh-identity-handlers
1541 '(("From" . mh-identity-handler-top)
1542 (":default" . mh-identity-handler-bottom)
1543 (":attribution-verb" . mh-identity-handler-attribution-verb)
1544 (":signature" . mh-identity-handler-signature)
1545 (":pgg-default-user-id" . mh-identity-handler-gpg-identity))
1546 "Handler functions for fields in `mh-identity-list'.
1548 This option is used to change the way that fields, signatures,
1549 and attributions in `mh-identity-list' are added. To customize
1550 `mh-identity-handlers', replace the name of an existing handler
1551 function associated with the field you want to change with the
1552 name of a function you have written. You can also click on an
1553 \"INS\" button and insert a field of your choice and the name of
1554 the function you have written to handle it.
1556 The \"Field\" field can be any field that you've used in your
1557 `mh-identity-list'. The special fields \":attribution-verb\",
1558 \":signature\", or \":pgg-default-user-id\" are used for the
1559 `mh-identity-list' choices \"Attribution Verb\", \"Signature\", and
1560 \"GPG Key ID\" respectively.
1562 The handler associated with the \":default\" field is used when no
1563 other field matches.
1565 The handler functions are passed two or three arguments: the
1566 FIELD itself (for example, \"From\"), or one of the special
1567 fields (for example, \":signature\"), and the ACTION 'remove or
1568 'add. If the action is 'add, an additional argument
1569 containing the VALUE for the field is given."
1570 :type '(repeat (cons (string :tag "Field") function))
1572 :package-version '(MH-E "8.0"))
1574 ;;; Incorporating Your Mail (:group 'mh-inc)
1576 (mh-defcustom mh-inc-prog "inc"
1577 "*Program to incorporate new mail into a folder.
1579 This program generates a one-line summary for each of the new
1580 messages. Unless it is an absolute pathname, the file is assumed
1581 to be in the `mh-progs' directory. You may also link a file to
1582 \"inc\" that uses a different format. You'll then need to modify
1583 several scan line format variables appropriately."
1586 :package-version '(MH-E "6.0"))
1589 (unless (fboundp 'mh-inc-spool-make-no-autoload)
1590 (defun mh-inc-spool-make-no-autoload ()
1591 "Temporary definition.
1592 Real definition will take effect when mh-inc is loaded."
1595 (mh-defcustom mh-inc-spool-list nil
1596 "*Alternate spool files.
1598 You can use the `mh-inc-spool-list' variable to direct MH-E to
1599 retrieve mail from arbitrary spool files other than your system
1600 mailbox, file it in folders other than your \"+inbox\", and assign
1601 key bindings to incorporate this mail.
1603 Suppose you are subscribed to the \"mh-e-devel\" mailing list and
1604 you use \"procmail\" to filter this mail into \"~/mail/mh-e\" with
1605 the following recipe in \".procmailrc\":
1609 * ^From mh-e-devel-admin@stop.mail-abuse.org
1612 In order to incorporate \"~/mail/mh-e\" into \"+mh-e\" with an
1613 \"I m\" (mh-inc-spool-mh-e) command, customize this option, and click
1614 on the \"INS\" button. Enter a \"Spool File\" of \"~/mail/mh-e\", a
1615 \"Folder\" of \"mh-e\", and a \"Key Binding\" of \"m\".
1617 You can use \"xbuffy\" to automate the incorporation of this mail
1618 using the Emacs 22 command \"emacsclient\" as follows:
1625 command emacsclient --eval '(mh-inc-spool-mh-e)'
1627 In XEmacs, the command \"gnuclient\" is used in a similar
1629 :type '(repeat (list (file :tag "Spool File")
1630 (string :tag "Folder")
1631 (character :tag "Key Binding")))
1632 :set (lambda (symbol value)
1633 (set-default symbol value)
1634 (mh-inc-spool-make-no-autoload))
1636 :package-version '(MH-E "7.3"))
1638 ;;; Dealing with Junk Mail (:group 'mh-junk)
1640 (defvar mh-junk-choice nil
1641 "Chosen spam fighting program.")
1643 ;; Available spam filter interfaces
1644 (defvar mh-junk-function-alist
1645 '((spamassassin mh-spamassassin-blacklist mh-spamassassin-whitelist)
1646 (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist)
1647 (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist))
1648 "Available choices of spam programs to use.
1650 This is an alist. For each element there are functions that
1651 blacklist a message as spam and whitelist a message incorrectly
1652 classified as spam.")
1654 (defun mh-junk-choose (symbol value)
1655 "Choose spam program to use.
1657 The function is always called with SYMBOL bound to
1658 `mh-junk-program' and VALUE bound to the new value of
1659 `mh-junk-program'. The function sets the variable
1660 `mh-junk-choice' in addition to `mh-junk-program'."
1661 (set symbol value) ;XXX shouldn't this be set-default?
1662 (setq mh-junk-choice
1664 (loop for element in mh-junk-function-alist
1665 until (executable-find (symbol-name (car element)))
1666 finally return (car element)))))
1668 (mh-defcustom mh-junk-background nil
1669 "If on, spam programs are run in background.
1671 By default, the programs are run in the foreground, but this can
1672 be slow when junking large numbers of messages. If you have
1673 enough memory or don't junk that many messages at the same time,
1674 you might try turning on this option."
1675 :type '(choice (const :tag "Off" nil)
1676 (const :tag "On" 0))
1678 :package-version '(MH-E "8.0"))
1680 (mh-defcustom mh-junk-disposition nil
1681 "Disposition of junk mail."
1682 :type '(choice (const :tag "Delete Spam" nil)
1683 (string :tag "Spam Folder"))
1685 :package-version '(MH-E "8.0"))
1687 (mh-defcustom mh-junk-program nil
1688 "Spam program that MH-E should use.
1690 The default setting of this option is \"Auto-detect\" which means
1691 that MH-E will automatically choose one of SpamAssassin,
1692 bogofilter, or SpamProbe in that order. If, for example, you have
1693 both SpamAssassin and bogofilter installed and you want to use
1694 bogofilter, then you can set this option to \"Bogofilter\"."
1695 :type '(choice (const :tag "Auto-detect" nil)
1696 (const :tag "SpamAssassin" spamassassin)
1697 (const :tag "Bogofilter" bogofilter)
1698 (const :tag "SpamProbe" spamprobe))
1699 :set 'mh-junk-choose
1701 :package-version '(MH-E "7.3"))
1703 ;;; Editing a Draft (:group 'mh-letter)
1705 (mh-defcustom mh-compose-insertion (if (locate-library "mml") 'mml 'mh)
1706 "Type of tags used when composing MIME messages.
1708 In addition to MH-style directives, MH-E also supports MML (MIME
1709 Meta Language) tags. (see Info node `(emacs-mime)Composing').
1710 This option can be used to choose between them. By default, this
1711 option is set to \"MML\" if it is supported since it provides a
1712 lot more functionality. This option can also be set to \"MH\" if
1713 MH-style directives are preferred."
1714 :type '(choice (const :tag "MML" mml)
1715 (const :tag "MH" mh))
1717 :package-version '(MH-E "7.0"))
1719 (mh-defcustom mh-compose-skipped-header-fields
1720 '("From" "Organization" "References" "In-Reply-To"
1721 "X-Face" "Face" "X-Image-URL" "X-Mailer")
1722 "List of header fields to skip over when navigating in draft."
1723 :type '(repeat (string :tag "Field"))
1725 :package-version '(MH-E "7.4"))
1727 (mh-defcustom mh-compose-space-does-completion-flag nil
1728 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header."
1731 :package-version '(MH-E "7.4"))
1733 (mh-defcustom mh-delete-yanked-msg-window-flag nil
1734 "*Non-nil means delete any window displaying the message.
1736 This deletes the window containing the original message after
1737 yanking it with \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make
1738 more room on your screen for your reply."
1741 :package-version '(MH-E "7.0"))
1743 (mh-defcustom mh-extract-from-attribution-verb "wrote:"
1744 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1746 The attribution consists of the sender's name and email address
1747 followed by the content of this option. This option can be set to
1748 \"wrote:\", \"a écrit:\", and \"schrieb:\". You can also use the
1749 \"Custom String\" menu item to enter your own verb."
1750 :type '(choice (const "wrote:")
1753 (string :tag "Custom String"))
1755 :package-version '(MH-E "7.0"))
1757 (mh-defcustom mh-ins-buf-prefix "> "
1758 "*String to put before each line of a yanked or inserted message.
1760 The prefix \"> \" is the default setting of this option. I
1761 suggest that you not modify this option since it is used by many
1762 mailers and news readers: messages are far easier to read if
1763 several included messages have all been indented by the same
1766 This prefix is not inserted if you use one of the supercite
1767 flavors of `mh-yank-behavior' or you have added a
1768 `mail-citation-hook'."
1771 :package-version '(MH-E "6.0"))
1773 (mh-defcustom mh-letter-complete-function 'ispell-complete-word
1774 "*Function to call when completing outside of address or folder fields.
1776 In the body of the message,
1777 \\<mh-letter-mode-map>\\[mh-letter-complete] runs this function,
1778 which is set to \"ispell-complete-word\" by default."
1779 :type '(choice function (const nil))
1781 :package-version '(MH-E "7.1"))
1783 (mh-defcustom mh-letter-fill-column 72
1784 "*Fill column to use in MH Letter mode.
1786 By default, this option is 72 to allow others to quote your
1787 message without line wrapping."
1790 :package-version '(MH-E "6.0"))
1792 (mh-defcustom mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none")
1793 "Default method to use in security tags.
1795 This option is used to select between a variety of mail security
1796 mechanisms. The default is \"PGP (MIME)\" if it is supported\;
1797 otherwise, the default is \"None\". Other mechanisms include
1798 vanilla \"PGP\" and \"S/MIME\".
1800 The `pgg' customization group may have some settings which may
1801 interest you (see Info node `(pgg)').
1803 In particular, I turn on the option `pgg-encrypt-for-me' so that
1804 all messages I encrypt are encrypted with my public key as well.
1805 If you keep a copy of all of your outgoing mail with a \"Fcc:\"
1806 header field, this setting is vital so that you can read the mail
1808 :type '(choice (const :tag "PGP (MIME)" "pgpmime")
1809 (const :tag "PGP" "pgp")
1810 (const :tag "S/MIME" "smime")
1811 (const :tag "None" "none"))
1813 :package-version '(MH-E "8.0"))
1815 (mh-defcustom mh-signature-file-name "~/.signature"
1816 "*Source of user's signature.
1818 By default, the text of your signature is taken from the file
1819 \"~/.signature\". You can read from other sources by changing this
1820 option. This file may contain a vCard in which case an attachment is
1821 added with the vCard.
1823 This option may also be a symbol, in which case that function is
1824 called. You may not want a signature separator to be added for you;
1825 instead you may want to insert one yourself. Options that you may find
1826 useful to do this include `mh-signature-separator' (when inserting a
1827 signature separator) and `mh-signature-separator-regexp' (for finding
1828 said separator). The function `mh-signature-separator-p', which
1829 reports t if the buffer contains a separator, may be useful as well.
1831 The signature is inserted into your message with the command
1832 \\<mh-letter-mode-map>\\[mh-insert-signature] or with the option
1833 `mh-identity-list'."
1836 :package-version '(MH-E "6.0"))
1838 (mh-defcustom mh-signature-separator-flag t
1839 "*Non-nil means a signature separator should be inserted.
1841 It is not recommended that you change this option since various
1842 mail user agents, including MH-E, use the separator to present
1843 the signature differently, and to suppress the signature when
1844 replying or yanking a letter into a draft."
1847 :package-version '(MH-E "8.0"))
1849 (mh-defcustom mh-x-face-file "~/.face"
1850 "*File containing face header field to insert in outgoing mail.
1852 If the file starts with either of the strings \"X-Face:\", \"Face:\"
1853 or \"X-Image-URL:\" then the contents are added to the message header
1854 verbatim. Otherwise it is assumed that the file contains the value of
1855 the \"X-Face:\" header field.
1857 The \"X-Face:\" header field, which is a low-resolution, black and
1858 white image, can be generated using the \"compface\" command (see URL
1859 `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). The
1860 \"Online X-Face Converter\" is a useful resource for quick conversion
1861 of images into \"X-Face:\" header fields (see URL
1862 `http://www.dairiki.org/xface/').
1864 Use the \"make-face\" script to convert a JPEG image to the higher
1865 resolution, color, \"Face:\" header field (see URL
1866 `http://quimby.gnus.org/circus/face/make-face').
1868 The URL of any image can be used for the \"X-Image-URL:\" field and no
1869 processing of the image is required.
1871 To prevent the setting of any of these header fields, either set
1872 `mh-x-face-file' to nil, or simply ensure that the file defined by
1873 this option doesn't exist."
1876 :package-version '(MH-E "7.0"))
1878 (mh-defcustom mh-yank-behavior 'attribution
1879 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1881 To include the entire message, including the entire header, use
1882 \"Body and Header\". Use \"Body\" to yank just the body without
1883 the header. To yank only the portion of the message following the
1884 point, set this option to \"Below Point\".
1886 Choose \"Invoke supercite\" to pass the entire message and header
1889 If the \"Body With Attribution\" setting is used, then the
1890 message minus the header is yanked and a simple attribution line
1891 is added at the top using the value of the option
1892 `mh-extract-from-attribution-verb'. This is the default.
1894 If the \"Invoke supercite\" or \"Body With Attribution\" settings
1895 are used, the \"-noformat\" argument is passed to the \"repl\"
1896 program to override a \"-filter\" or \"-format\" argument. These
1897 settings also have \"Automatically\" variants that perform the
1898 action automatically when you reply so that you don't need to use
1899 \\[mh-yank-cur-msg] at all. Note that this automatic action is
1900 only performed if the show buffer matches the message being
1901 replied to. People who use the automatic variants tend to turn on
1902 the option `mh-delete-yanked-msg-window-flag' as well so that the
1903 show window is never displayed.
1905 If the show buffer has a region, the option `mh-yank-behavior' is
1906 ignored unless its value is one of Attribution variants in which
1907 case the attribution is added to the yanked region.
1909 If this option is set to one of the supercite flavors, the hook
1910 `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not
1912 :type '(choice (const :tag "Body and Header" t)
1913 (const :tag "Body" body)
1914 (const :tag "Below Point" nil)
1915 (const :tag "Invoke supercite" supercite)
1916 (const :tag "Invoke supercite, Automatically" autosupercite)
1917 (const :tag "Body With Attribution" attribution)
1918 (const :tag "Body With Attribution, Automatically"
1921 :package-version '(MH-E "8.0"))
1923 ;;; Ranges (:group 'mh-ranges)
1925 (mh-defcustom mh-interpret-number-as-range-flag t
1926 "*Non-nil means interpret a number as a range.
1928 Since one of the most frequent ranges used is \"last:N\", MH-E
1929 will interpret input such as \"200\" as \"last:200\" if this
1930 option is on (which is the default). If you need to scan just the
1931 message 200, then use the range \"200:200\"."
1934 :package-version '(MH-E "7.4"))
1936 ;;; Scan Line Formats (:group 'mh-scan-line-formats)
1939 (unless (fboundp 'mh-adaptive-cmd-note-flag-check)
1940 (defun mh-adaptive-cmd-note-flag-check (symbol value)
1941 "Temporary definition.
1942 Real definition, below, uses variables that aren't defined yet."
1943 (set-default symbol value))))
1945 (mh-defcustom mh-adaptive-cmd-note-flag t
1946 "*Non-nil means that the message number width is determined dynamically.
1948 If you've created your own format to handle long message numbers,
1949 you'll be pleased to know you no longer need it since MH-E adapts its
1950 internal format based upon the largest message number if this option
1951 is on (the default). This option may only be turned on when
1952 `mh-scan-format-file' is set to \"Use MH-E scan Format\".
1954 If you prefer fixed-width message numbers, turn off this option and
1955 call `mh-set-cmd-note' with the width specified by your format file
1956 \(see `mh-scan-format-file'). For example, the default width is 4, so
1957 you would use \"(mh-set-cmd-note 4)\"."
1959 :group 'mh-scan-line-formats
1960 :set 'mh-adaptive-cmd-note-flag-check
1961 :package-version '(MH-E "7.0"))
1963 (defun mh-scan-format-file-check (symbol value)
1964 "Check if desired setting is legal.
1965 Throw an error if user tries to set `mh-scan-format-file' to
1966 anything but t when `mh-adaptive-cmd-note-flag' is on. Otherwise,
1967 set SYMBOL to VALUE."
1968 (if (and (not (eq value t))
1969 mh-adaptive-cmd-note-flag)
1970 (error "%s %s" "You must turn off `mh-adaptive-cmd-note-flag'"
1971 "unless you use \"Use MH-E scan Format\"")
1972 (set-default symbol value)))
1974 (mh-defcustom mh-scan-format-file t
1975 "Specifies the format file to pass to the scan program.
1977 The default setting for this option is \"Use MH-E scan Format\". This
1978 means that the format string will be taken from the either
1979 `mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or
1980 nmh (or GNU mailutils) is in use. This setting also enables you to
1981 turn on the `mh-adaptive-cmd-note-flag' option.
1983 You can also set this option to \"Use Default scan Format\" to get the
1984 same output as you would get if you ran \"scan\" from the shell. If
1985 you have a format file that you want MH-E to use but not MH, you can
1986 set this option to \"Specify a scan Format File\" and enter the name
1987 of your format file.
1989 If you change the format of the scan lines you'll need to tell MH-E
1990 how to parse the new format. As you will see, quite a lot of variables
1991 are involved to do that. Use \"\\[apropos] RET mh-scan.*regexp\" to
1992 obtain a list of these variables. You will also have to call
1993 `mh-set-cmd-note' if your notations are not in column 4 (columns in
1994 Emacs start with 0)."
1995 :type '(choice (const :tag "Use MH-E scan Format" t)
1996 (const :tag "Use Default scan Format" nil)
1997 (file :tag "Specify a scan Format File"))
1998 :group 'mh-scan-line-formats
1999 :set 'mh-scan-format-file-check
2000 :package-version '(MH-E "6.0"))
2002 (defun mh-adaptive-cmd-note-flag-check (symbol value)
2003 "Check if desired setting is legal.
2004 Throw an error if user tries to turn on
2005 `mh-adaptive-cmd-note-flag' when `mh-scan-format-file' isn't t.
2006 Otherwise, set SYMBOL to VALUE."
2008 (not (eq mh-scan-format-file t)))
2009 (error "%s %s" "Can't turn on unless `mh-scan-format-file'"
2010 "is set to \"Use MH-E scan Format\"")
2011 (set-default symbol value)))
2013 (mh-defcustom mh-scan-prog "scan"
2014 "*Program used to scan messages.
2016 The name of the program that generates a listing of one line per
2017 message is held in this option. Unless this variable contains an
2018 absolute pathname, it is assumed to be in the `mh-progs'
2019 directory. You may link another program to `scan' (see
2020 \"mh-profile(5)\") to produce a different type of listing."
2022 :group 'mh-scan-line-formats
2023 :package-version '(MH-E "6.0"))
2024 (make-variable-buffer-local 'mh-scan-prog)
2026 ;;; Searching (:group 'mh-search)
2028 (mh-defcustom mh-search-program nil
2029 "Search program that MH-E shall use.
2031 The default setting of this option is \"Auto-detect\" which means
2032 that MH-E will automatically choose one of swish++, swish-e,
2033 mairix, namazu, pick and grep in that order. If, for example, you
2034 have both swish++ and mairix installed and you want to use
2035 mairix, then you can set this option to \"mairix\".
2037 More information about setting up an indexing program to use with
2038 MH-E can be found in the documentation of `mh-search'."
2039 :type '(choice (const :tag "Auto-detect" nil)
2040 (const :tag "swish++" swish++)
2041 (const :tag "swish-e" swish)
2042 (const :tag "mairix" mairix)
2043 (const :tag "namazu" namazu)
2044 (const :tag "pick" pick)
2045 (const :tag "grep" grep))
2047 :package-version '(MH-E "8.0"))
2049 ;;; Sending Mail (:group 'mh-sending-mail)
2051 (mh-defcustom mh-compose-forward-as-mime-flag t
2052 "*Non-nil means that messages are forwarded as attachments.
2054 By default, this option is on which means that the forwarded
2055 messages are included as attachments. If you would prefer to
2056 forward your messages verbatim (as text, inline), then turn off
2057 this option. Forwarding messages verbatim works well for short,
2058 textual messages, but your recipient won't be able to view any
2059 non-textual attachments that were in the forwarded message. Be
2060 aware that if you have \"forw: -mime\" in your MH profile, then
2061 forwarded messages will always be included as attachments
2062 regardless of the settings of this option."
2064 :group 'mh-sending-mail
2065 :package-version '(MH-E "8.0"))
2067 (mh-defcustom mh-compose-letter-function nil
2068 "Invoked when starting a new draft.
2070 However, it is the last function called before you edit your
2071 message. The consequence of this is that you can write a function
2072 to write and send the message for you. This function is passed
2073 three arguments: the contents of the TO, SUBJECT, and CC header
2075 :type '(choice (const nil) function)
2076 :group 'mh-sending-mail
2077 :package-version '(MH-E "6.0"))
2079 (mh-defcustom mh-compose-prompt-flag nil
2080 "*Non-nil means prompt for header fields when composing a new draft."
2082 :group 'mh-sending-mail
2083 :package-version '(MH-E "7.4"))
2085 (mh-defcustom mh-forward-subject-format "%s: %s"
2086 "*Format string for forwarded message subject.
2088 This option is a string which includes two escapes (\"%s\"). The
2089 first \"%s\" is replaced with the sender of the original message,
2090 and the second one is replaced with the original \"Subject:\"."
2092 :group 'mh-sending-mail
2093 :package-version '(MH-E "6.0"))
2095 (mh-defcustom mh-insert-x-mailer-flag t
2096 "*Non-nil means append an \"X-Mailer:\" header field to the header.
2098 This header field includes the version of MH-E and Emacs that you
2099 are using. If you don't want to participate in our marketing, you
2100 can turn this option off."
2102 :group 'mh-sending-mail
2103 :package-version '(MH-E "7.0"))
2105 (mh-defcustom mh-redist-full-contents-flag nil
2106 "*Non-nil means the \"dist\" command needs entire letter for redistribution.
2108 This option must be turned on if \"dist\" requires the whole
2109 letter for redistribution, which is the case if \"send\" is
2110 compiled with the BERK option (which many people abhor). If you
2111 find that MH will not allow you to redistribute a message that
2112 has been redistributed before, turn off this option."
2114 :group 'mh-sending-mail
2115 :package-version '(MH-E "8.0"))
2117 (mh-defcustom mh-reply-default-reply-to nil
2118 "*Sets the person or persons to whom a reply will be sent.
2120 This option is set to \"Prompt\" by default so that you are
2121 prompted for the recipient of a reply. If you find that most of
2122 the time that you specify \"cc\" when you reply to a message, set
2123 this option to \"cc\". Other choices include \"from\", \"to\", or
2124 \"all\". You can always edit the recipients in the draft."
2125 :type '(choice (const :tag "Prompt" nil)
2130 :group 'mh-sending-mail
2131 :package-version '(MH-E "6.0"))
2133 (mh-defcustom mh-reply-show-message-flag t
2134 "*Non-nil means the MH-Show buffer is displayed when replying.
2136 If you include the message automatically, you can hide the
2137 MH-Show buffer by turning off this option.
2139 See also `mh-reply'."
2141 :group 'mh-sending-mail
2142 :package-version '(MH-E "7.0"))
2144 ;;; Sequences (:group 'mh-sequences)
2146 ;; If `mh-unpropagated-sequences' becomes a defcustom, add the following to
2147 ;; the docstring: "Additional sequences that should not to be preserved can be
2148 ;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
2150 (mh-defcustom mh-refile-preserves-sequences-flag t
2151 "*Non-nil means that sequences are preserved when messages are refiled.
2153 If a message is in any sequence (except \"Previous-Sequence:\"
2154 and \"cur\") when it is refiled, then it will still be in those
2155 sequences in the destination folder. If this behavior is not
2156 desired, then turn off this option."
2158 :group 'mh-sequences
2159 :package-version '(MH-E "7.4"))
2161 (mh-defcustom mh-tick-seq 'tick
2162 "The name of the MH sequence for ticked messages.
2164 You can customize this option if you already use the \"tick\"
2165 sequence for your own use. You can also disable all of the
2166 ticking functions by choosing the \"Disable Ticking\" item but
2167 there isn't much advantage to that."
2168 :type '(choice (const :tag "Disable Ticking" nil)
2170 :group 'mh-sequences
2171 :package-version '(MH-E "7.3"))
2173 (mh-defcustom mh-update-sequences-after-mh-show-flag t
2174 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>.
2176 Three sequences are maintained internally by MH-E and pushed out
2177 to MH when a message is shown. They include the sequence
2178 specified by your \"Unseen-Sequence:\" profile entry, \"cur\",
2179 and the sequence listed by the option `mh-tick-seq' which is
2180 \"tick\" by default. If you do not like this behavior, turn off
2181 this option. You can then update the state manually with the
2182 \\[mh-execute-commands], \\[mh-quit], or \\[mh-update-sequences]
2185 :group 'mh-sequences
2186 :package-version '(MH-E "7.0"))
2188 ;;; Reading Your Mail (:group 'mh-show)
2190 (mh-defcustom mh-bury-show-buffer-flag t
2191 "*Non-nil means show buffer is buried.
2193 One advantage of not burying the show buffer is that one can
2194 delete the show buffer more easily in an electric buffer list
2195 because of its proximity to its associated MH-Folder buffer. Try
2196 running \\[electric-buffer-list] to see what I mean."
2199 :package-version '(MH-E "7.0"))
2201 (mh-defcustom mh-clean-message-header-flag t
2202 "*Non-nil means remove extraneous header fields.
2204 See also `mh-invisible-header-fields-default' and
2205 `mh-invisible-header-fields'."
2208 :package-version '(MH-E "7.0"))
2210 (mh-defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode")))
2211 "*Non-nil means attachments are handled\\<mh-folder-mode-map>.
2213 MH-E can handle attachments as well if the Gnus `mm-decode'
2214 library is present. If so, this option will be on. Otherwise,
2215 you'll see the MIME body parts rather than text or attachments.
2216 There isn't much point in turning off this option; however, you
2217 can inspect it if it appears that the body parts are not being
2218 interpreted correctly or toggle it with the command
2219 \\[mh-toggle-mh-decode-mime-flag] to view the raw message.
2221 This option also controls the display of quoted-printable
2222 messages and other graphical widgets. See the options
2223 `mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'."
2226 :package-version '(MH-E "7.0"))
2228 (mh-defcustom mh-display-buttons-for-alternatives-flag nil
2229 "*Non-nil means display buttons for all alternative attachments.
2231 Sometimes, a mail program will produce multiple alternatives of
2232 the attachment in increasing degree of faithfulness to the
2233 original content. By default, only the preferred alternative is
2234 displayed. If this option is on, then the preferred part is shown
2235 inline and buttons are shown for each of the other alternatives."
2238 :package-version '(MH-E "7.4"))
2240 (mh-defcustom mh-display-buttons-for-inline-parts-flag nil
2241 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>.
2243 The sender can request that attachments should be viewed inline so
2244 that they do not really appear like an attachment at all to the
2245 reader. Most of the time, this is desirable, so by default MH-E
2246 suppresses the buttons for inline attachments. On the other hand, you
2247 may receive code or HTML which the sender has added to his message as
2248 inline attachments so that you can read them in MH-E. In this case, it
2249 is useful to see the buttons so that you know you don't have to cut
2250 and paste the code into a file; you can simply save the attachment.
2252 If you want to make the buttons visible for inline attachments, you
2253 can use the command \\[mh-toggle-mime-buttons] to toggle the
2254 visibility of these buttons. You can turn on these buttons permanently
2255 by turning on this option.
2257 MH-E cannot display all attachments inline however. It can display
2258 text (including HTML) and images."
2261 :package-version '(MH-E "7.0"))
2263 (mh-defcustom mh-do-not-confirm-flag nil
2264 "*Non-nil means non-reversible commands do not prompt for confirmation.
2266 Commands such as `mh-pack-folder' prompt to confirm whether to
2267 process outstanding moves and deletes or not before continuing.
2268 Turning on this option means that these actions will be
2269 performed--which is usually desired but cannot be
2270 retracted--without question."
2273 :package-version '(MH-E "7.0"))
2275 (mh-defcustom mh-fetch-x-image-url nil
2276 "*Control fetching of \"X-Image-URL:\" header field image.
2278 Ths option controls the fetching of the \"X-Image-URL:\" header
2279 field image with the following values:
2282 You are prompted before the image is fetched. MH-E will
2283 remember your reply and will either use the already fetched
2284 image the next time the same URL is encountered or silently
2285 skip it if you didn't fetch it the first time. This is a
2289 Images are never fetched and only displayed if they are
2290 already present in the cache. This is the default.
2292 There isn't a value of \"Always Fetch\" for privacy and DOS (denial of
2293 service) reasons. For example, fetching a URL can tip off a spammer
2294 that you've read his email (which is why you shouldn't blindly answer
2295 yes if you've set this option to \"Ask Before Fetching\"). Someone may
2296 also flood your network and fill your disk drive by sending a torrent
2297 of messages, each specifying a unique URL to a very large file.
2299 The cache of images is found in the directory \".mhe-x-image-cache\"
2300 within your MH directory. You can add your own face to the \"From:\"
2301 field too. See Info node `(mh-e)Picture'.
2303 This setting only has effect if the option `mh-show-use-xface-flag' is
2306 :type '(choice (const :tag "Ask Before Fetching" ask)
2307 (const :tag "Never Fetch" nil))
2309 :package-version '(MH-E "7.3"))
2311 (mh-defcustom mh-graphical-smileys-flag t
2312 "*Non-nil means graphical smileys are displayed.
2314 It is a long standing custom to inject body language using a
2315 cornucopia of punctuation, also known as the \"smileys\". MH-E
2316 can render these as graphical widgets if this option is turned
2317 on, which it is by default. Smileys include patterns such as :-)
2320 This option is disabled if the option `mh-decode-mime-flag' is
2324 :package-version '(MH-E "7.0"))
2326 (mh-defcustom mh-graphical-emphasis-flag t
2327 "*Non-nil means graphical emphasis is displayed.
2329 A few typesetting features are indicated in ASCII text with
2330 certain characters. If your terminal supports it, MH-E can render
2331 these typesetting directives naturally if this option is turned
2332 on, which it is by default. For example, _underline_ will be
2333 underlined, *bold* will appear in bold, /italics/ will appear in
2334 italics, and so on. See the option `gnus-emphasis-alist' for the
2337 This option is disabled if the option `mh-decode-mime-flag' is
2341 :package-version '(MH-E "7.0"))
2343 (mh-defcustom mh-highlight-citation-style 'gnus
2344 "Style for highlighting citations.
2346 If the sender of the message has cited other messages in his
2347 message, then MH-E will highlight these citations to emphasize
2348 the sender's actual response. This option can be customized to
2349 change the highlighting style. The \"Multicolor\" method uses a
2350 different color for each indentation while the \"Monochrome\"
2351 method highlights all citations in red. To disable highlighting
2352 of citations entirely, choose \"None\"."
2353 :type '(choice (const :tag "Multicolor" gnus)
2354 (const :tag "Monochrome" font-lock)
2355 (const :tag "None" nil))
2357 :package-version '(MH-E "8.0"))
2359 ;; Keep fields alphabetized. Mention source, if known.
2360 (defvar mh-invisible-header-fields-internal
2364 "Cancel-Lock:" ; NNTP posts
2365 "Content-" ; RFC 2045
2366 "Delivered-To:" ; Egroups/yahoogroups mailing list manager
2367 "Delivery-Date:" ; MH
2369 "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys
2373 "Face:" ; Gnus Face header
2376 "Importance:" ; MS Outlook
2379 "List-" ; Mailman mailing list manager
2380 "List-" ; Unknown mailing list managers
2381 "List-Subscribe:" ; Unknown mailing list managers
2382 "List-Unsubscribe:" ; Unknown mailing list managers
2384 "Mailing-List:" ; Egroups/yahoogroups mailing list manager
2385 "Message-Id:" ; RFC 822
2386 "Mime-Version" ; RFC 2045
2389 "Original-Encoded-Information-Types:" ; X400
2390 "Original-Lines:" ; mail to news
2391 "Original-NNTP-" ; mail to news
2392 "Original-Newsgroups:" ; mail to news
2393 "Original-Path:" ; mail to news
2394 "Original-Received:" ; mail to news
2395 "Original-To:" ; mail to news
2396 "Original-X-" ; mail to news
2398 "P1-Content-Type:" ; X400
2399 "P1-Message-Id:" ; X400
2400 "P1-Recipient:" ; X400
2405 "Received:" ; RFC 822
2406 "Received-SPF:" ; Gmail
2411 "Return-Path:" ; RFC 822
2412 "Sensitivity:" ; MS Outlook
2413 "Status:" ; sendmail
2415 "Ua-Content-Id:" ; X400
2416 ;; "User-Agent:" ; Similar to X-Mailer, so display it.
2418 "X-AOL-IP:" ; AOL WebMail
2421 "X-Accept-Language:"
2422 "X-Accept-Language:" ; Netscape/Mozilla
2424 "X-Administrivia-To:"
2425 "X-AntiAbuse:" ; cPanel
2426 "X-Apparently-From:" ; MS Outlook
2427 "X-Apparently-To:" ; Egroups/yahoogroups mailing list manager
2428 "X-Authenticated-Sender:" ; AT&T Message Center (webmail)
2429 "X-Authentication-Warning:" ; sendmail
2430 "X-Barracuda-" ; Barracuda spam scores
2431 "X-Beenthere:" ; Mailman mailing list manager
2432 "X-Bogosity:" ; bogofilter
2433 "X-BrightmailFiltered:" ; Brightmail
2434 "X-Brightmail-Tracker:" ; Brightmail
2435 "X-Bugzilla-" ; Bugzilla
2437 "X-ContentStamp:" ; NetZero
2441 "X-EFL-Spamscore:" ; MIT alumni spam filtering
2442 "X-ELNK-Trace:" ; Earthlink mailer
2443 "X-Envelope-Date:" ; GNU mailutils
2445 "X-Envelope-Sender:"
2447 "X-Evolution:" ; Evolution mail client
2452 "X-Gnus-Mail-Source:" ; gnus
2453 "X-Greylist:" ; milter-greylist-1.2.1
2454 "X-Habeas-SWE-1:" ; Spam
2455 "X-Habeas-SWE-2:" ; Spam
2456 "X-Habeas-SWE-3:" ; Spam
2457 "X-Habeas-SWE-4:" ; Spam
2458 "X-Habeas-SWE-5:" ; Spam
2459 "X-Habeas-SWE-6:" ; Spam
2460 "X-Habeas-SWE-7:" ; Spam
2461 "X-Habeas-SWE-8:" ; Spam
2462 "X-Habeas-SWE-9:" ; Spam
2463 "X-Hashcash:" ; hashcash
2465 "X-IronPort-AV:" ; IronPort AV
2467 "X-List-Host:" ; Unknown mailing list managers
2468 "X-List-Subscribe:" ; Unknown mailing list managers
2469 "X-List-Unsubscribe:" ; Unknown mailing list managers
2470 "X-Listprocessor-" ; ListProc(tm) by CREN
2471 "X-Listserver:" ; Unknown mailing list managers
2472 "X-Loop:" ; Unknown mailing list managers
2473 "X-Lumos-SenderID:" ; Roving ConstantContact
2474 "X-MAIL-INFO:" ; NetZero
2475 "X-MB-Message-" ; AOL WebMail
2476 "X-MHE-Checksum:" ; Checksum added during index search
2477 "X-MIME-Autoconverted:" ; sendmail
2479 "X-MS-" ; MS Outlook
2480 "X-Mail-from:" ; fastmail.fm
2481 "X-MailScanner" ; ListProc(tm) by CREN
2482 "X-Mailing-List:" ; Unknown mailing list managers
2483 "X-Mailman-Approved-At:" ; Mailman mailing list manager
2484 "X-Mailman-Version:" ; Mailman mailing list manager
2485 "X-Majordomo:" ; Majordomo mailing list manager
2487 "X-MessageWall-Score:" ; Unknown mailing list manager, AUC TeX
2488 "X-MimeOLE:" ; MS Outlook
2489 "X-Mms-" ; T-Mobile pictures
2490 "X-Mozilla-Status:" ; Netscape/Mozilla
2491 "X-Msmail-" ; MS Outlook
2492 "X-NAI-Spam-" ; Network Associates Inc. SpamKiller
2495 "X-Notes-Item:" ; Lotus Notes Domino structured header
2496 "X-OperatingSystem:"
2497 ;;"X-Operator:" ; Similar to X-Mailer, so display it
2498 "X-Orcl-Content-Type:"
2499 "X-Original-Complaints-To:"
2500 "X-Original-Date:" ; SourceForge mailing list manager
2503 "X-OriginalArrivalTime:" ; Hotmail
2504 "X-Originating-IP:" ; Hotmail
2506 "X-Priority:" ; MS Outlook
2507 "X-Qotd-" ; User added
2512 "X-Resolved-to:" ; fastmail.fm
2513 "X-Return-Path-Hint:" ; Roving ConstantContact
2514 "X-Roving-" ; Roving ConstantContact
2515 "X-SA-Exim-" ; Exim SpamAssassin
2521 "X-Sasl-enc:" ; Apple Mail
2526 "X-Sieve:" ; Sieve filtering
2528 "X-Spam-" ; Spamassassin
2529 "X-SpamBouncer:" ; Spam
2537 "X-USANET-" ; usa.net
2539 "X-VSMLoop:" ; NTMail
2540 "X-Virus-Scanned" ; amavisd-new
2542 "X-WebTV-Signature:"
2543 "X-Wss-Id:" ; Worldtalk gateways
2545 "X-eGroups-" ; Egroups/yahoogroups mailing list manager
2547 "X-submission-address:"
2550 "List of default header fields that are not to be shown.
2552 Do not alter this variable directly. Instead, add entries from
2553 here that you would like to be displayed in
2554 `mh-invisible-header-fields-default' and add entries to hide in
2555 `mh-invisible-header-fields'.")
2558 (unless (fboundp 'mh-invisible-headers)
2559 (defun mh-invisible-headers ()
2560 "Temporary definition.
2561 Real definition, below, uses variables that aren't defined yet."
2564 (defvar mh-delay-invisible-header-generation-flag t
2565 "Non-nil means to delay the generation of invisible header fields.
2566 Because the function `mh-invisible-headers' uses both
2567 `mh-invisible-header-fields' and `mh-invisible-header-fields', it
2568 cannot be run until both variables have been initialized.")
2570 (mh-defcustom mh-invisible-header-fields nil
2571 "*Additional header fields to hide.
2573 Header fields that you would like to hide that aren't listed in
2574 `mh-invisible-header-fields-default' can be added to this option
2575 with a couple of caveats. Regular expressions are not allowed.
2576 Unique fields should have a \":\" suffix; otherwise, the element
2577 can be used to render invisible an entire class of fields that
2578 start with the same prefix. If you think a header field should be
2579 generally ignored, report a bug (see URL
2580 `https://sourceforge.net/tracker/?group_id=13357&atid=113357').
2582 See also `mh-clean-message-header-flag'."
2584 :type '(repeat (string :tag "Header field"))
2585 :set (lambda (symbol value)
2586 (set-default symbol value)
2587 (mh-invisible-headers))
2589 :package-version '(MH-E "7.1"))
2591 (mh-defcustom mh-invisible-header-fields-default nil
2592 "*List of hidden header fields.
2594 The header fields listed in this option are hidden, although you
2595 can check off any field that you would like to see.
2597 Header fields that you would like to hide that aren't listed can
2598 be added to the option `mh-invisible-header-fields'.
2600 See also `mh-clean-message-header-flag'."
2601 :type `(set ,@(mapcar (lambda (x) `(const ,x))
2602 mh-invisible-header-fields-internal))
2603 :set (lambda (symbol value)
2604 (set-default symbol value)
2605 (mh-invisible-headers))
2607 :package-version '(MH-E "8.0"))
2609 (defvar mh-invisible-header-fields-compiled nil
2610 "*Regexp matching lines in a message header that are not to be shown.
2611 Do not alter this variable directly. Instead, customize
2612 `mh-invisible-header-fields-default' checking for fields normally
2613 hidden that you wish to display, and add extra entries to hide in
2614 `mh-invisible-header-fields'.")
2616 (defun mh-invisible-headers ()
2617 "Make or remake the variable `mh-invisible-header-fields-compiled'.
2618 Done using `mh-invisible-header-fields-internal' as input, from
2619 which entries from `mh-invisible-header-fields-default' are
2620 removed and entries from `mh-invisible-header-fields' are added."
2621 (let ((fields mh-invisible-header-fields-internal))
2622 (when mh-invisible-header-fields-default
2623 ;; Remove entries from `mh-invisible-header-fields-default'
2625 (loop for x in fields
2626 unless (member x mh-invisible-header-fields-default)
2628 (when (and (boundp 'mh-invisible-header-fields)
2629 mh-invisible-header-fields)
2630 (dolist (x mh-invisible-header-fields)
2631 (unless (member x fields) (setq fields (cons x fields)))))
2633 (setq mh-invisible-header-fields-compiled
2636 ;; workaround for insufficient default
2637 (let ((max-specpdl-size 1000))
2638 (regexp-opt fields t))))
2639 (setq mh-invisible-header-fields-compiled nil))))
2641 ;; Compile invisible header fields.
2642 (mh-invisible-headers)
2644 (mh-defcustom mh-lpr-command-format "lpr -J '%s'"
2645 "*Command used to print\\<mh-folder-mode-map>.
2647 This option contains the Unix command line which performs the
2648 actual printing for the \\[mh-print-msg] command. The string can
2649 contain one escape, \"%s\", which is replaced by the name of the
2650 folder and the message number and is useful for print job names.
2651 I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a
2652 nice header and adds a bit of margin so the text fits within my
2655 This options is not used by the commands \\[mh-ps-print-msg] or
2656 \\[mh-ps-print-msg-file]."
2659 :package-version '(MH-E "6.0"))
2661 (mh-defcustom mh-max-inline-image-height nil
2662 "*Maximum inline image height if \"Content-Disposition:\" is not present.
2664 Some older mail programs do not insert this needed plumbing to
2665 tell MH-E whether to display the attachments inline or not. If
2666 this is the case, MH-E will display these images inline if they
2667 are smaller than the window. However, you might want to allow
2668 larger images to be displayed inline. To do this, you can change
2669 the options `mh-max-inline-image-width' and
2670 `mh-max-inline-image-height' from their default value of zero to
2671 a large number. The size of your screen is a good choice for
2673 :type '(choice (const nil) integer)
2675 :package-version '(MH-E "7.0"))
2677 (mh-defcustom mh-max-inline-image-width nil
2678 "*Maximum inline image width if \"Content-Disposition:\" is not present.
2680 Some older mail programs do not insert this needed plumbing to
2681 tell MH-E whether to display the attachments inline or not. If
2682 this is the case, MH-E will display these images inline if they
2683 are smaller than the window. However, you might want to allow
2684 larger images to be displayed inline. To do this, you can change
2685 the options `mh-max-inline-image-width' and
2686 `mh-max-inline-image-height' from their default value of zero to
2687 a large number. The size of your screen is a good choice for
2689 :type '(choice (const nil) integer)
2691 :package-version '(MH-E "7.0"))
2693 (mh-defcustom mh-mhl-format-file nil
2694 "*Specifies the format file to pass to the \"mhl\" program.
2696 Normally MH-E takes care of displaying messages itself (rather than
2697 calling an MH program to do the work). If you'd rather have \"mhl\"
2698 display the message (within MH-E), change this option from its default
2699 value of \"Use Default mhl Format (Printing Only)\".
2701 You can set this option to \"Use Default mhl Format\" to get the same
2702 output as you would get if you ran \"mhl\" from the shell.
2704 If you have a format file that you want MH-E to use, you can set this
2705 option to \"Specify an mhl Format File\" and enter the name of your
2706 format file. Your format file should specify a non-zero value for
2707 \"overflowoffset\" to allow MH-E to parse the header. Note that
2708 \"mhl\" is always used for printing and forwarding; in this case, the
2709 value of this option is consulted if you have specified a format
2711 :type '(choice (const :tag "Use Default mhl Format (Printing Only)" nil)
2712 (const :tag "Use Default mhl Format" t)
2713 (file :tag "Specify an mhl Format File"))
2715 :package-version '(MH-E "8.0"))
2717 (mh-defcustom mh-mime-save-parts-default-directory t
2718 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts].
2720 The default value for this option is \"Prompt Always\" so that
2721 you are always prompted for the directory in which to save the
2722 attachments. However, if you usually use the same directory
2723 within a session, then you can set this option to \"Prompt the
2724 First Time\" to avoid the prompt each time. you can make this
2725 directory permanent by choosing \"Directory\" and entering the
2727 :type '(choice (const :tag "Prompt the First Time" nil)
2728 (const :tag "Prompt Always" t)
2731 :package-version '(MH-E "7.0"))
2733 (mh-defcustom mh-print-background-flag nil
2734 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>.
2736 Normally messages are printed in the foreground. If this is slow on
2737 your system, you may elect to turn off this option to print in the
2740 WARNING: If you do this, do not delete the message until it is printed
2741 or else the output may be truncated.
2743 This option is not used by the commands \\[mh-ps-print-msg] or
2744 \\[mh-ps-print-msg-file]."
2747 :package-version '(MH-E "7.0"))
2749 (mh-defcustom mh-show-maximum-size 0
2750 "*Maximum size of message (in bytes) to display automatically.
2752 This option provides an opportunity to skip over large messages
2753 which may be slow to load. The default value of 0 means that all
2754 message are shown regardless of size."
2757 :package-version '(MH-E "8.0"))
2759 (mh-defcustom mh-show-use-xface-flag (>= emacs-major-version 21)
2760 "*Non-nil means display face images in MH-show buffers.
2762 MH-E can display the content of \"Face:\", \"X-Face:\", and
2763 \"X-Image-URL:\" header fields. If any of these fields occur in the
2764 header of your message, the sender's face will appear in the \"From:\"
2765 header field. If more than one of these fields appear, then the first
2766 field found in the order \"Face:\", \"X-Face:\", and \"X-Image-URL:\"
2769 The option `mh-show-use-xface-flag' is used to turn this feature on
2770 and off. This feature will be turned on by default if your system
2773 The first header field used, if present, is the Gnus-specific
2774 \"Face:\" field. The \"Face:\" field appeared in GNU Emacs 21 and
2775 XEmacs. For more information, see URL
2776 `http://quimby.gnus.org/circus/face/'. Next is the traditional
2777 \"X-Face:\" header field. The display of this field requires the
2778 \"uncompface\" program (see URL
2779 `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent
2780 versions of XEmacs have internal support for \"X-Face:\" images. If
2781 your version of XEmacs does not, then you'll need both \"uncompface\"
2782 and the x-face package (see URL `ftp://ftp.jpl.org/pub/elisp/').
2784 Finally, MH-E will display images referenced by the \"X-Image-URL:\"
2785 header field if neither the \"Face:\" nor the \"X-Face:\" fields are
2786 present. The display of the images requires \"wget\" (see URL
2787 `http://www.gnu.org/software/wget/wget.html'), \"fetch\", or \"curl\"
2788 to fetch the image and the \"convert\" program from the ImageMagick
2789 suite (see URL `http://www.imagemagick.org/'). Of the three header
2790 fields this is the most efficient in terms of network usage since the
2791 image doesn't need to be transmitted with every single mail.
2793 The option `mh-fetch-x-image-url' controls the fetching of the
2794 \"X-Image-URL:\" header field image."
2797 :package-version '(MH-E "7.0"))
2799 (mh-defcustom mh-store-default-directory nil
2800 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg].
2802 If you would like to change the initial default directory,
2803 customize this option, change the value from \"Current\" to
2804 \"Directory\", and then enter the name of the directory for storing
2805 the content of these messages."
2806 :type '(choice (const :tag "Current" nil)
2809 :package-version '(MH-E "6.0"))
2811 (mh-defcustom mh-summary-height nil
2812 "*Number of lines in MH-Folder buffer (including the mode line).
2814 The default value of this option is \"Automatic\" which means
2815 that the MH-Folder buffer will maintain the same proportional
2816 size if the frame is resized. If you'd prefer a fixed height,
2817 then choose the \"Fixed Size\" option and enter the number of
2818 lines you'd like to see."
2819 :type '(choice (const :tag "Automatic" nil)
2820 (integer :tag "Fixed Size"))
2822 :package-version '(MH-E "7.4"))
2824 ;;; The Speedbar (:group 'mh-speedbar)
2826 (mh-defcustom mh-speed-update-interval 60
2827 "Time between speedbar updates in seconds.
2828 Set to 0 to disable automatic update."
2831 :package-version '(MH-E "8.0"))
2833 ;;; Threading (:group 'mh-thread)
2835 (mh-defcustom mh-show-threads-flag nil
2836 "*Non-nil means new folders start in threaded mode.
2838 Threading large number of messages can be time consuming so this
2839 option is turned off by default. If you turn this option on, then
2840 threading will be done only if the number of messages being
2841 threaded is less than `mh-large-folder'."
2844 :package-version '(MH-E "7.1"))
2846 ;;; The Tool Bar (:group 'mh-tool-bar)
2848 ;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined
2849 ;; dynamically in mh-tool-bar.el.
2851 (mh-defcustom mh-tool-bar-search-function 'mh-search
2852 "*Function called by the tool bar search button.
2854 By default, this is set to `mh-search'. You can also choose
2855 \"Other Function\" from the \"Value Menu\" and enter a function
2856 of your own choosing."
2857 :type '(choice (const mh-search)
2858 (function :tag "Other Function"))
2860 :package-version '(MH-E "7.0"))
2862 ;; XEmacs has a couple of extra customizations...
2864 (mh-defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
2865 "*If non-nil, use tool bar.
2867 This option controls whether to show the MH-E icons at all. By
2868 default, this option is turned on if the window system supports
2869 tool bars. If your system doesn't support tool bars, then you
2870 won't be able to turn on this option."
2873 :set (lambda (symbol value)
2874 (if (and (eq value t)
2875 (not mh-xemacs-has-tool-bar-flag))
2876 (error "Tool bar not supported"))
2877 (set-default symbol value))
2878 :package-version '(MH-E "7.3"))
2880 (mh-defcustom mh-xemacs-tool-bar-position nil
2881 "*Tool bar location.
2883 This option controls the placement of the tool bar along the four
2884 edges of the frame. You can choose from one of \"Same As Default
2885 Tool Bar\", \"Top\", \"Bottom\", \"Left\", or \"Right\". If this
2886 variable is set to anything other than \"Same As Default Tool
2887 Bar\" and the default tool bar is in a different location, then
2888 two tool bars will be displayed: the MH-E tool bar and the
2890 :type '(radio (const :tag "Same As Default Tool Bar" :value nil)
2891 (const :tag "Top" :value top)
2892 (const :tag "Bottom" :value bottom)
2893 (const :tag "Left" :value left)
2894 (const :tag "Right" :value right))
2896 :package-version '(MH-E "7.3")))
2900 ;;; Hooks (:group 'mh-hooks + group where hook described)
2902 (mh-defcustom mh-after-commands-processed-hook nil
2903 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests.
2905 Variables that are useful in this hook include
2906 `mh-folders-changed', which lists which folders were affected by
2907 deletes and refiles. This list will always include the current
2908 folder, which is also available in `mh-current-folder'."
2912 :package-version '(MH-E "8.0"))
2914 (mh-defcustom mh-alias-reloaded-hook nil
2915 "Hook run by `mh-alias-reload' after loading aliases."
2919 :package-version '(MH-E "8.0"))
2921 (mh-defcustom mh-before-commands-processed-hook nil
2922 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests.
2924 Variables that are useful in this hook include `mh-delete-list'
2925 and `mh-refile-list' which can be used to see which changes will
2926 be made to the current folder, `mh-current-folder'."
2930 :package-version '(MH-E "8.0"))
2932 (mh-defcustom mh-before-quit-hook nil
2933 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E.
2935 This hook is called before the quit occurs, so you might use it
2936 to perform any MH-E operations; you could perform some query and
2937 abort the quit or call `mh-execute-commands', for example.
2939 See also `mh-quit-hook'."
2943 :package-version '(MH-E "6.0"))
2945 (mh-defcustom mh-before-send-letter-hook nil
2946 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.
2948 For example, if you want to check your spelling in your message
2949 before sending, add the `ispell-message' function."
2951 :options '(ispell-message)
2954 :package-version '(MH-E "6.0"))
2956 (mh-defcustom mh-delete-msg-hook nil
2957 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
2959 For example, a past maintainer of MH-E used this once when he
2960 kept statistics on his mail usage."
2964 :package-version '(MH-E "6.0"))
2966 (mh-defcustom mh-find-path-hook nil
2967 "Hook run by `mh-find-path' after reading the user's MH profile.
2969 This hook can be used the change the value of the variables that
2970 `mh-find-path' sets if you need to run with different values
2971 between MH and MH-E."
2975 :package-version '(MH-E "7.0"))
2977 (mh-defcustom mh-folder-mode-hook nil
2978 "Hook run by `mh-folder-mode' when visiting a new folder."
2982 :package-version '(MH-E "6.0"))
2984 (mh-defcustom mh-forward-hook nil
2985 "Hook run by `mh-forward' on a forwarded letter."
2988 :group 'mh-sending-mail
2989 :package-version '(MH-E "8.0"))
2991 (mh-defcustom mh-inc-folder-hook nil
2992 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder."
2996 :package-version '(MH-E "6.0"))
2998 (mh-defcustom mh-insert-signature-hook nil
2999 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted.
3001 Hook functions may access the actual name of the file or the
3002 function used to insert the signature with
3003 `mh-signature-file-name'."
3007 :package-version '(MH-E "8.0"))
3009 (mh-defcustom mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
3010 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
3012 The hook functions are called with no arguments and should return
3013 a non-nil value to suppress the normal prompt when you remove a
3014 folder. This is useful for folders that are easily regenerated.
3016 The default value of `mh-search-p' suppresses the prompt on
3017 folders generated by searching.
3019 WARNING: Use this hook with care. If there is a bug in your hook
3020 which returns t on \"+inbox\" and you hit \\[mh-kill-folder] by
3021 accident in the \"+inbox\" folder, you will not be happy."
3025 :package-version '(MH-E "7.4"))
3027 (mh-defcustom mh-letter-mode-hook nil
3028 "Hook run by `mh-letter-mode' on a new letter.
3030 This hook allows you to do some processing before editing a
3031 letter. For example, you may wish to modify the header after
3032 \"repl\" has done its work, or you may have a complicated
3033 \"components\" file and need to tell MH-E where the cursor should
3037 :group 'mh-sending-mail
3038 :package-version '(MH-E "6.0"))
3040 (mh-defcustom mh-mh-to-mime-hook nil
3041 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]."
3045 :package-version '(MH-E "8.0"))
3047 (mh-defcustom mh-search-mode-hook nil
3048 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>.
3050 If you find that you do the same thing over and over when editing
3051 the search template, you may wish to bind some shortcuts to keys.
3052 This can be done with this hook which is called when
3053 \\[mh-search] is run on a new pattern."
3057 :package-version '(MH-E "8.0"))
3059 (mh-defcustom mh-quit-hook nil
3060 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E.
3062 This hook is not run in an MH-E context, so you might use it to
3063 modify the window setup.
3065 See also `mh-before-quit-hook'."
3069 :package-version '(MH-E "6.0"))
3071 (mh-defcustom mh-refile-msg-hook nil
3072 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling."
3076 :package-version '(MH-E "6.0"))
3078 (mh-defcustom mh-show-hook nil
3079 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message.
3081 It is the last thing called after messages are displayed. It's
3082 used to affect the behavior of MH-E in general or when
3083 `mh-show-mode-hook' is too early. See `mh-show-mode-hook'."
3087 :package-version '(MH-E "6.0"))
3089 (mh-defcustom mh-show-mode-hook nil
3090 "Hook run upon entry to `mh-show-mode'.
3092 This hook is called early on in the process of the message
3093 display. It is usually used to perform some action on the
3094 message's content. See `mh-show-hook'."
3098 :package-version '(MH-E "6.0"))
3100 (mh-defcustom mh-unseen-updated-hook nil
3101 "Hook run after the unseen sequence has been updated.
3103 The variable `mh-seen-list' can be used by this hook to obtain
3104 the list of messages which were removed from the unseen
3108 :group 'mh-sequences
3109 :package-version '(MH-E "6.0"))
3113 ;;; Faces (:group 'mh-faces + group where faces described)
3115 (if (boundp 'facemenu-unlisted-faces)
3116 (add-to-list 'facemenu-unlisted-faces "^mh-"))
3118 ;; Temporary function and data structure used for defining faces.
3119 ;; These will be unbound after the faces are defined.
3120 (defvar mh-min-colors-defined-flag (and (not mh-xemacs-flag)
3121 (>= emacs-major-version 22))
3122 "Non-nil means `defface' supports min-colors display requirement.")
3124 (defun mh-defface-compat (spec)
3125 "Convert SPEC for defface if necessary to run on older platforms.
3126 Modifies SPEC in place and returns it. See `defface' for the spec definition.
3128 When `mh-min-colors-defined-flag' is nil, this function finds
3129 display entries with \"min-colors\" requirements and either
3130 removes the \"min-colors\" requirement or strips the display
3131 entirely if the display does not support the number of specified
3133 (if mh-min-colors-defined-flag
3135 (let ((cells (mh-display-color-cells))
3137 ;; Remove entries with min-colors, or delete them if we have fewer colors
3138 ;; than they specify.
3139 (loop for entry in (reverse spec) do
3140 (let ((requirement (if (eq (car entry) t)
3142 (assoc 'min-colors (car entry)))))
3144 (when (>= cells (nth 1 requirement))
3145 (setq new-spec (cons (cons (delq requirement (car entry))
3148 (setq new-spec (cons entry new-spec)))))
3153 (defvar mh-inherit-face-flag (assq :inherit custom-face-attributes)
3154 "Non-nil means that the `defface' :inherit keyword is available.
3155 The :inherit keyword is available on all supported versions of
3156 GNU Emacs and XEmacs from at least 21.5.23 on.")
3158 (defvar mh-face-data
3159 '((mh-folder-followup
3160 ((((class color) (background light))
3161 (:foreground "blue3"))
3162 (((class color) (background dark))
3163 (:foreground "LightGoldenRod"))
3166 (mh-folder-msg-number
3167 ((((class color) (min-colors 64) (background light))
3168 (:foreground "snow4"))
3169 (((class color) (min-colors 64) (background dark))
3170 (:foreground "snow3"))
3171 (((class color) (background light))
3172 (:foreground "purple"))
3173 (((class color) (background dark))
3174 (:foreground "cyan"))))
3176 ((((class color) (min-colors 64) (background light))
3177 (:foreground "DarkGoldenrod"))
3178 (((class color) (min-colors 64) (background dark))
3179 (:foreground "LightGoldenrod"))
3181 (:foreground "yellow" :weight light))
3182 (((class grayscale) (background light))
3183 (:foreground "Gray90" :bold t :italic t))
3184 (((class grayscale) (background dark))
3185 (:foreground "DimGray" :bold t :italic t))
3187 (:bold t :italic t))))
3189 ((((class color) (background light))
3190 (:foreground "blue4"))
3191 (((class color) (background dark))
3192 (:foreground "yellow"))
3196 ((((class color) (background light))
3197 (:background "#dddf7e"))
3198 (((class color) (background dark))
3199 (:background "#dddf7e"))
3203 ((((class color) (min-colors 64) (background light))
3204 (:foreground "RosyBrown"))
3205 (((class color) (min-colors 64) (background dark))
3206 (:foreground "LightSalmon"))
3208 (:foreground "green"))
3209 (((class grayscale) (background light))
3210 (:foreground "DimGray" :italic t))
3211 (((class grayscale) (background dark))
3212 (:foreground "LightGray" :italic t))
3215 (mh-letter-header-field
3216 ((((class color) (background light))
3217 (:background "gray90"))
3218 (((class color) (background dark))
3219 (:background "gray10"))
3223 ((((class color) (background light))
3224 (:foreground "dark green" :bold t))
3225 (((class color) (background dark))
3226 (:foreground "indian red" :bold t))
3230 ((((class color) (min-colors 64) (background light))
3231 (:foreground "DarkGoldenrod"))
3232 (((class color) (min-colors 64) (background dark))
3233 (:foreground "LightGoldenrod"))
3235 (:foreground "yellow" :weight light))
3236 (((class grayscale) (background light))
3237 (:foreground "Gray90" :bold t :italic t))
3238 (((class grayscale) (background dark))
3239 (:foreground "DimGray" :bold t :italic t))
3241 (:bold t :italic t))))
3243 ((((class color) (min-colors 64) (background light))
3244 (:foreground "ForestGreen"))
3245 (((class color) (min-colors 64) (background dark))
3246 (:foreground "PaleGreen"))
3248 (:foreground "green"))
3249 (((class grayscale) (background light))
3250 (:foreground "Gray90" :bold t))
3251 (((class grayscale) (background dark))
3252 (:foreground "DimGray" :bold t))
3254 (:bold t :underline t))))
3256 ((((class color) (background light))
3257 (:foreground "red3"))
3258 (((class color) (background dark))
3259 (:foreground "cyan"))
3263 ((((class color) (min-colors 64) (background light))
3264 (:foreground "RosyBrown"))
3265 (((class color) (min-colors 64) (background dark))
3266 (:foreground "LightSalmon"))
3268 (:foreground "green"))
3269 (((class grayscale) (background light))
3270 (:foreground "DimGray" :italic t))
3271 (((class grayscale) (background dark))
3272 (:foreground "LightGray" :italic t))
3275 (mh-show-pgg-bad ((t (:bold t :foreground "DeepPink1"))))
3276 (mh-show-pgg-good ((t (:bold t :foreground "LimeGreen"))))
3277 (mh-show-pgg-unknown ((t (:bold t :foreground "DarkGoldenrod2"))))
3278 (mh-show-signature ((t (:italic t))))
3280 ((((class color) (background light))
3281 (:foreground "SaddleBrown"))
3282 (((class color) (background dark))
3283 (:foreground "burlywood"))
3284 (((class grayscale) (background light))
3285 (:foreground "DimGray" :underline t))
3286 (((class grayscale) (background dark))
3287 (:foreground "LightGray" :underline t))
3288 (t (:underline t))))
3290 ((((class color) (background light))
3291 (:foreground "blue4"))
3292 (((class color) (background dark))
3293 (:foreground "light blue"))))
3294 (mh-speedbar-selected-folder
3295 ((((class color) (background light))
3296 (:foreground "red1" :underline t))
3297 (((class color) (background dark))
3298 (:foreground "red1" :underline t))
3302 (defun mh-face-data (face &optional inherit)
3303 "Return spec for FACE.
3304 If INHERIT is non-nil and `defface' supports the :inherit
3305 keyword, return INHERIT literally; otherwise, return spec for FACE.
3307 This isn't a perfect implementation. In the case that
3308 the :inherit keyword is not supported, any additional attributes
3309 in the inherit parameter are not added to the returned spec."
3310 (if (and inherit mh-inherit-face-flag)
3312 (mh-defface-compat (cadr (assoc face mh-face-data)))))
3314 (mh-defface mh-folder-address
3315 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3319 :package-version '(MH-E "8.0"))
3321 (mh-defface mh-folder-body
3322 (mh-face-data 'mh-folder-msg-number
3324 (:inherit mh-folder-msg-number))
3326 (:inherit mh-folder-msg-number :italic t))))
3330 :package-version '(MH-E "8.0"))
3332 (mh-defface mh-folder-cur-msg-number
3333 (mh-face-data 'mh-folder-msg-number
3334 '((t (:inherit mh-folder-msg-number :bold t))))
3335 "Current message number face."
3338 :package-version '(MH-E "8.0"))
3340 (mh-defface mh-folder-date
3341 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3345 :package-version '(MH-E "8.0"))
3347 (mh-defface mh-folder-deleted
3348 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3349 "Deleted message face."
3352 :package-version '(MH-E "8.0"))
3354 (mh-defface mh-folder-followup (mh-face-data 'mh-folder-followup)
3358 :package-version '(MH-E "8.0"))
3360 (mh-defface mh-folder-msg-number (mh-face-data 'mh-folder-msg-number)
3361 "Message number face."
3364 :package-version '(MH-E "8.0"))
3366 (mh-defface mh-folder-refiled (mh-face-data 'mh-folder-refiled)
3367 "Refiled message face."
3370 :package-version '(MH-E "8.0"))
3372 (mh-defface mh-folder-sent-to-me-hint
3373 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date))))
3374 "Fontification hint face in messages sent directly to us.
3375 The detection of messages sent to us is governed by the scan
3376 format `mh-scan-format-nmh' and the regular expression
3377 `mh-scan-sent-to-me-sender-regexp'."
3380 :package-version '(MH-E "8.0"))
3382 (mh-defface mh-folder-sent-to-me-sender
3383 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup))))
3384 "Sender face in messages sent directly to us.
3385 The detection of messages sent to us is governed by the scan
3386 format `mh-scan-format-nmh' and the regular expression
3387 `mh-scan-sent-to-me-sender-regexp'."
3390 :package-version '(MH-E "8.0"))
3392 (mh-defface mh-folder-subject (mh-face-data 'mh-folder-subject)
3396 :package-version '(MH-E "8.0"))
3398 (mh-defface mh-folder-tick (mh-face-data 'mh-folder-tick)
3399 "Ticked message face."
3402 :package-version '(MH-E "8.0"))
3404 (mh-defface mh-folder-to (mh-face-data 'mh-folder-to)
3408 :package-version '(MH-E "8.0"))
3410 (mh-defface mh-letter-header-field (mh-face-data 'mh-letter-header-field)
3411 "Editable header field value face in draft buffers."
3414 :package-version '(MH-E "8.0"))
3416 (mh-defface mh-search-folder (mh-face-data 'mh-search-folder)
3417 "Folder heading face in MH-Folder buffers created by searches."
3420 :package-version '(MH-E "8.0"))
3422 (mh-defface mh-show-cc (mh-face-data 'mh-show-cc)
3423 "Face used to highlight \"cc:\" header fields."
3426 :package-version '(MH-E "8.0"))
3428 (mh-defface mh-show-date (mh-face-data 'mh-show-date)
3429 "Face used to highlight \"Date:\" header fields."
3432 :package-version '(MH-E "8.0"))
3434 (mh-defface mh-show-from (mh-face-data 'mh-show-from)
3435 "Face used to highlight \"From:\" header fields."
3438 :package-version '(MH-E "8.0"))
3440 (mh-defface mh-show-header (mh-face-data 'mh-show-header)
3441 "Face used to deemphasize less interesting header fields."
3444 :package-version '(MH-E "8.0"))
3446 (mh-defface mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad)
3447 "Bad PGG signature face."
3450 :package-version '(MH-E "8.0"))
3452 (mh-defface mh-show-pgg-good (mh-face-data 'mh-show-pgg-good)
3453 "Good PGG signature face."
3456 :package-version '(MH-E "8.0"))
3458 (mh-defface mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown)
3459 "Unknown or untrusted PGG signature face."
3462 :package-version '(MH-E "8.0"))
3464 (mh-defface mh-show-signature (mh-face-data 'mh-show-signature)
3468 :package-version '(MH-E "8.0"))
3470 (mh-defface mh-show-subject
3471 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3472 "Face used to highlight \"Subject:\" header fields."
3475 :package-version '(MH-E "8.0"))
3477 (mh-defface mh-show-to (mh-face-data 'mh-show-to)
3478 "Face used to highlight \"To:\" header fields."
3481 :package-version '(MH-E "8.0"))
3483 (mh-defface mh-show-xface
3484 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight)))))
3486 The background and foreground are used in the image."
3489 :package-version '(MH-E "8.0"))
3491 (mh-defface mh-speedbar-folder (mh-face-data 'mh-speedbar-folder)
3492 "Basic folder face."
3495 :package-version '(MH-E "8.0"))
3497 (mh-defface mh-speedbar-folder-with-unseen-messages
3498 (mh-face-data 'mh-speedbar-folder
3499 '((t (:inherit mh-speedbar-folder :bold t))))
3500 "Folder face when folder contains unread messages."
3503 :package-version '(MH-E "8.0"))
3505 (mh-defface mh-speedbar-selected-folder
3506 (mh-face-data 'mh-speedbar-selected-folder)
3507 "Selected folder face."
3510 :package-version '(MH-E "8.0"))
3512 (mh-defface mh-speedbar-selected-folder-with-unseen-messages
3513 (mh-face-data 'mh-speedbar-selected-folder
3514 '((t (:inherit mh-speedbar-selected-folder :bold t))))
3515 "Selected folder face when folder contains unread messages."
3518 :package-version '(MH-E "8.0"))
3520 ;; Get rid of temporary functions and data structures.
3521 (fmakunbound 'mh-defcustom)
3522 (fmakunbound 'mh-defface)
3523 (fmakunbound 'mh-defface-compat)
3524 (fmakunbound 'mh-defgroup)
3525 (fmakunbound 'mh-face-data)
3526 (makunbound 'mh-face-data)
3527 (makunbound 'mh-inherit-face-flag)
3528 (makunbound 'mh-min-colors-defined-flag)
3533 ;; indent-tabs-mode: nil
3534 ;; sentence-end-double-space: nil
3537 ;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b
3538 ;;; mh-e.el ends here