1 ;;; mh-customize.el --- MH-E customization
3 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5 ;; Author: Bill Wohler <wohler@newt.com>
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
29 ;; All of the defgroups, defcustoms, and deffaces in MH-E are found
30 ;; here. This makes it possible to customize modules that aren't loaded
31 ;; yet. It also makes it easier to organize the customization groups.
33 ;; This file contains the following sections:
35 ;; 1. MH-E Customization Groups
37 ;; These are the customization group definitions. Every group has a
38 ;; associated manual node. The ordering is alphabetical, except for the
39 ;; groups mh-faces and mh-hooks which are last .
41 ;; 2. MH-E Customization
43 ;; These are the actual customization variables. There is a sub-section for
44 ;; each group in the MH-E Customization Groups section, in the same order,
45 ;; separated by page breaks. Within each section, variables are sorted
50 ;; All hooks must be placed in the mh-hook group; in addition, add the
51 ;; group associated with the manual node in which the hook is described.
52 ;; Since the mh-hook group appears near the end of this file, the hooks
53 ;; will appear at the end of these other groups.
57 ;; All faces must be placed in the mh-faces group; in addition, add the
58 ;; group associated with the manual node in which the face is described.
59 ;; Since the mh-faces group appears near the end of this file, the faces
60 ;; will appear at the end of these other groups.
66 (provide 'mh-customize
)
68 (eval-when-compile (require 'mh-acros
))
72 (defvar mh-xemacs-flag
(featurep 'xemacs
)
73 "Non-nil means the current Emacs is XEmacs.")
75 (require 'mh-xemacs
)))
78 (require 'mh-identity
)
80 (require 'mh-loaddefs
))
82 ;; For compiler warnings...
84 (defvar mh-show-buffer
)
85 (defvar mh-show-folder-buffer
))
87 (defun mh-customize (&optional delete-other-windows-flag
)
88 "Customize MH-E variables.
89 If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other
90 windows in the frame are removed."
92 (customize-group 'mh-e
)
93 (when delete-other-windows-flag
94 (delete-other-windows)))
98 ;;; MH-E Customization Groups
101 "Emacs interface to the MH mail system.
102 MH is the Rand Mail Handler. Other implementations include nmh
104 :link
'(custom-manual "(mh-e)Top")
107 (defgroup mh-alias nil
109 :link
'(custom-manual "(mh-e)Aliases")
113 (defgroup mh-folder nil
114 "Organizing your mail with folders."
116 :link
'(custom-manual "(mh-e)Folders")
119 (defgroup mh-folder-selection nil
122 :link
'(custom-manual "(mh-e)Folder Selection")
125 (defgroup mh-identity nil
127 :link
'(custom-manual "(mh-e)Identities")
128 :prefix
"mh-identity-"
132 "Incorporating your mail."
134 :link
'(custom-manual "(mh-e)Incorporating Mail")
137 (defgroup mh-index nil
139 :link
'(custom-manual "(mh-e)Searching")
143 (defgroup mh-junk nil
144 "Dealing with junk mail."
145 :link
'(custom-manual "(mh-e)Junk")
149 (defgroup mh-letter nil
152 :link
'(custom-manual "(mh-e)Editing Drafts")
155 (defgroup mh-ranges nil
158 :link
'(custom-manual "(mh-e)Ranges")
161 (defgroup mh-scan-line-formats nil
163 :link
'(custom-manual "(mh-e)Scan Line Formats")
167 (defgroup mh-sending-mail nil
170 :link
'(custom-manual "(mh-e)Sending Mail")
173 (defgroup mh-sequences nil
176 :link
'(custom-manual "(mh-e)Sequences")
179 (defgroup mh-show nil
182 :link
'(custom-manual "(mh-e)Reading Mail")
185 (defgroup mh-speedbar nil
188 :link
'(custom-manual "(mh-e)Speedbar")
191 (defgroup mh-thread nil
194 :link
'(custom-manual "(mh-e)Threading")
197 (defgroup mh-tool-bar nil
199 :link
'(custom-manual "(mh-e)Tool Bar")
203 (defgroup mh-hooks nil
205 :link
'(custom-manual "(mh-e)Top")
209 (defgroup mh-faces nil
210 "Faces used in MH-E."
211 :link
'(custom-manual "(mh-e)Top")
218 ;;; Emacs interface to the MH mail system (:group mh-e)
220 (setq mh-variant
'none
))
222 (defcustom mh-path nil
223 "*Additional list of directories to search for MH.
226 :type
'(repeat (directory)))
228 (defcustom mh-variant
'autodetect
229 "*Specifies the variant used by MH-E.
231 The default setting of this option is \"Auto-detect\" which means
232 that MH-E will automatically choose the first of nmh, MH, or GNU
233 mailutils that it finds in the directories listed in
234 `mh-path' (which you can customize), `mh-sys-path', and
235 `exec-path'. If, for example, you have both nmh and mailutils
236 installed and `mh-variant-in-use' was initialized to nmh but you
237 want to use mailutils, then you can set this option to
240 When this variable is changed, MH-E resets `mh-progs', `mh-lib',
241 `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
244 (const :tag
"Auto-detect" autodetect
)
245 ,@(mapcar (lambda (x) `(const ,(car x
))) (mh-variants)))
246 :set
(lambda (symbol value
)
247 (set-default symbol value
) ;Done in mh-variant-set-variant!
248 (mh-variant-set value
))
253 ;;; Aliases (:group 'mh-alias)
255 (defcustom mh-alias-completion-ignore-case-flag t
256 "*Non-nil means don't consider case significant in MH alias completion.
258 As MH ignores case in the aliases, so too does MH-E. However, you
259 may turn off this option to make case significant which can be
260 used to segregate completion of your aliases. You might use
261 lowercase for mailing lists and uppercase for people."
265 (defcustom mh-alias-expand-aliases-flag nil
266 "*Non-nil means to expand aliases entered in the minibuffer.
268 In other words, aliases entered in the minibuffer will be
269 expanded to the full address in the message draft. By default,
270 this expansion is not performed."
274 (defcustom mh-alias-flash-on-comma t
275 "*Specify whether to flash address or warn on translation.
277 This option controls the behavior when a [comma] is pressed while
278 entering aliases or addresses. The default setting flashes the
279 address associated with an address in the minibuffer briefly, but
280 does not display a warning if the alias is not found."
281 :type
'(choice (const :tag
"Flash but Don't Warn If No Alias" t
)
282 (const :tag
"Flash and Warn If No Alias" 1)
283 (const :tag
"Don't Flash Nor Warn If No Alias" nil
))
286 (defcustom mh-alias-insert-file nil
287 "*Filename used to store a new MH-E alias.
289 The default setting of this option is \"Use Aliasfile Profile
290 Component\". This option can also hold the name of a file or a
291 list a file names. If this option is set to a list of file names,
292 or the \"Aliasfile:\" profile component contains more than one file
293 name, MH-E will prompt for one of them when MH-E adds an alias."
294 :type
'(choice (const :tag
"Use Aliasfile Profile Component" nil
)
295 (file :tag
"Alias File")
296 (repeat :tag
"List of Alias Files" file
))
299 (defcustom mh-alias-insertion-location
'sorted
300 "Specifies where new aliases are entered in alias files.
302 This option is set to \"Alphabetical\" by default. If you organize
303 your alias file in other ways, then adding aliases to the \"Top\"
304 or \"Bottom\" of your alias file might be more appropriate."
305 :type
'(choice (const :tag
"Alphabetical" sorted
)
306 (const :tag
"Top" top
)
307 (const :tag
"Bottom" bottom
))
310 (defcustom mh-alias-local-users t
311 "*If on, local users are added to alias completion.
313 Aliases are created from \"/etc/passwd\" entries with a user ID
314 larger than a magical number, typically 200. This can be a handy
315 tool on a machine where you and co-workers exchange messages.
316 These aliases have the form \"local.first.last\" if a real name is
317 present in the password file. Otherwise, the alias will have the
318 form \"local.login\".
320 If you're on a system with thousands of users you don't know, and
321 the loading of local aliases slows MH-E down noticeably, then
322 turn this option off.
324 This option also takes a string which is executed to generate the
325 password file. For example, use \"ypcat passwd\" to obtain the
327 :type
'(choice (boolean) (string))
330 (defcustom mh-alias-local-users-prefix
"local."
331 "*String prefixed to the real names of users from the password file.
332 This option can also be set to \"Use Login\".
334 For example, consider the following password file entry:
336 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
338 The following settings of this option will produce the associated
341 \"local.\" local.peter.galbraith
345 This option has no effect if variable `mh-alias-local-users' is
347 :type
'(choice (const :tag
"Use Login" nil
)
351 (defcustom mh-alias-passwd-gecos-comma-separator-flag t
352 "*Non-nil means the gecos field in the password file uses a comma separator.
354 In the example in `mh-alias-local-users-prefix', commas are used
355 to separate different values within the so-called gecos field.
356 This is a fairly common usage. However, in the rare case that the
357 gecos field in your password file is not separated by commas and
358 whose contents may contain commas, you can turn this option off."
364 ;;; Organizing Your Mail with Folders (:group 'mh-folder)
366 (defcustom mh-new-messages-folders t
367 "Folders searched for the \"unseen\" sequence.
369 Set this option to \"Inbox\" to search the \"+inbox\" folder or
370 \"All\" to search all of the top level folders. Otherwise, list
371 the folders that should be searched with the \"Choose Folders\"
374 See also `mh-recursive-folders-flag'."
375 :type
'(choice (const :tag
"Inbox" t
)
376 (const :tag
"All" nil
)
377 (repeat :tag
"Choose Folders" (string :tag
"Folder")))
380 (defcustom mh-ticked-messages-folders t
381 "Folders searched for `mh-tick-seq'.
383 Set this option to \"Inbox\" to search the \"+inbox\" folder or
384 \"All\" to search all of the top level folders. Otherwise, list
385 the folders that should be searched with the \"Choose Folders\"
388 See also `mh-recursive-folders-flag'."
389 :type
'(choice (const :tag
"Inbox" t
)
390 (const :tag
"All" nil
)
391 (repeat :tag
"Choose Folders" (string :tag
"Folder")))
394 (defcustom mh-large-folder
200
395 "The number of messages that indicates a large folder.
397 If a folder is deemed to be large, that is the number of messages
398 in it exceed this value, then confirmation is needed when it is
399 visited. Even when `mh-show-threads-flag' is non-nil, the folder
400 is not automatically threaded, if it is large. If set to nil all
401 folders are treated as if they are small."
402 :type
'(choice (const :tag
"No Limit") integer
)
405 (defcustom mh-recenter-summary-flag nil
406 "*Non-nil means to recenter the summary window.
408 If this option is turned on, recenter the summary window when the
409 show window is toggled off."
413 (defcustom mh-recursive-folders-flag nil
414 "*Non-nil means that commands which operate on folders do so recursively."
418 (defcustom mh-sortm-args nil
419 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>.
421 This option is consulted when a prefix argument is used with
422 \\[mh-sort-folder]. Normally default arguments to \"sortm\" are
423 specified in the MH profile. This option may be used to provide
424 an alternate view. For example, \"'(\"-nolimit\" \"-textfield\"
425 \"subject\")\" is a useful setting."
431 ;;; Folder Selection (:group 'mh-folder-selection)
433 (defcustom mh-default-folder-for-message-function nil
434 "Function to select a default folder for refiling or \"Fcc:\".
436 The current buffer is set to the message being refiled with point
437 at the start of the message. This function should return the
438 default folder as a string with a leading \"+\" sign. It can also
439 return nil so that the last folder name is used as the default,
440 or an empty string to suppress the default entirely."
442 :group
'mh-folder-selection
)
444 (defcustom mh-default-folder-list nil
445 "*List of addresses and folders.
447 The folder name associated with the first address found in this
448 list is used as the default for `mh-refile-msg' and similar
449 functions. Each element in this list contains a \"Check Recipient\"
450 item. If this item is turned on, then the address is checked
451 against the recipient instead of the sender. This is useful for
454 See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
455 for more information."
456 :type
'(repeat (list (regexp :tag
"Address")
457 (string :tag
"Folder")
458 (boolean :tag
"Check Recipient")))
459 :group
'mh-folder-selection
)
461 (defcustom mh-default-folder-must-exist-flag t
462 "*Non-nil means guessed folder name must exist to be used.
464 If the derived folder does not exist, and this option is on, then
465 the last folder name used is suggested. This is useful if you get
466 mail from various people for whom you have an alias, but file
467 them all in the same project folder.
469 See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
470 for more information."
472 :group
'mh-folder-selection
)
474 (defcustom mh-default-folder-prefix
""
475 "*Prefix used for folder names generated from aliases.
476 The prefix is used to prevent clutter in your mail directory.
478 See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
479 for more information."
481 :group
'mh-folder-selection
)
485 ;;; Identities (:group 'mh-identity)
487 (defcustom mh-identity-list nil
488 "*List of identities.
490 To customize this option, click on the \"INS\" button and enter a label
491 such as \"Home\" or \"Work\". Then click on the \"INS\" button with the
492 label \"Add at least one item below\". Then choose one of the items in
495 You can specify an alternate \"From:\" header field using the \"From
496 Field\" menu item. You must include a valid email address. A standard
497 format is \"First Last <login@@host.domain>\". If you use an initial
498 with a period, then you must quote your name as in '\"First I. Last\"
499 <login@@host.domain>'. People usually list the name of the company
500 where they work using the \"Organization Field\" menu item. Set any
501 arbitrary header field and value in the \"Other Field\" menu item.
502 Unless the header field is a standard one, precede the name of your
503 field's label with \"X-\", as in \"X-Fruit-of-the-Day:\". The value of
504 \"Attribution Verb\" overrides the setting of
505 `mh-extract-from-attribution-verb'. Set your signature with the
506 \"Signature\" menu item. You can specify the contents of
507 `mh-signature-file-name', a file, or a function. Specify a different
508 key to sign or encrypt messages with the \"GPG Key ID\" menu item.
510 You can select the identities you have added via the menu called
511 \"Identity\" in the MH-Letter buffer. You can also use
512 \\[mh-insert-identity]. To clear the fields and signature added by the
513 identity, select the \"None\" identity.
515 The \"Identity\" menu contains two other items to save you from having
516 to set the identity on every message. The menu item \"Set Default for
517 Session\" can be used to set the default identity to the current
518 identity until you exit Emacs. The menu item \"Save as Default\" sets
519 the option `mh-identity-default' to the current identity setting. You
520 can also customize the `mh-identity-default' option in the usual
522 :type
'(repeat (list :tag
""
523 (string :tag
"Label")
524 (repeat :tag
"Add at least one item below"
526 (cons :tag
"From Field"
528 (string :tag
"Value"))
529 (cons :tag
"Organization Field"
530 (const "Organization")
531 (string :tag
"Value"))
532 (cons :tag
"Other Field"
533 (string :tag
"Field")
534 (string :tag
"Value"))
535 (cons :tag
"Attribution Verb"
536 (const ":attribution-verb")
537 (string :tag
"Value"))
538 (cons :tag
"Signature"
539 (const :tag
"Signature"
542 (const :tag
"mh-signature-file-name"
546 (cons :tag
"GPG Key ID"
547 (const :tag
"GPG Key ID"
548 ":pgg-default-user-id")
549 (string :tag
"Value"))))))
550 :set
'mh-identity-list-set
553 (defcustom mh-auto-fields-list nil
554 "List of recipients for which header lines are automatically inserted.
556 This option can be used to set the identity depending on the
557 recipient. To customize this option, click on the \"INS\" button and
558 enter a regular expression for the recipient's address. Click on the
559 \"INS\" button with the \"Add at least one item below\" label. Then choose
560 one of the items in the \"Value Menu\".
562 The \"Identity\" menu item is used to select an identity from those
563 configured in `mh-identity-list'. All of the information for that
564 identity will be added if the recipient matches. The \"Fcc Field\" menu
565 item is used to select a folder that is used in the \"Fcc:\" header.
566 When you send the message, MH will put a copy of your message in this
567 folder. The \"Mail-Followup-To Field\" menu item is used to insert an
568 \"Mail-Followup-To:\" header field with the recipients you provide. If
569 the recipient's mail user agent supports this header field (as nmh
570 does), then their replies will go to the addresses listed. This is
571 useful if their replies go both to the list and to you and you don't
572 have a mechanism to suppress duplicates. If you reply to someone not
573 on the list, you must either remove the \"Mail-Followup-To:\" field, or
574 ensure the recipient is also listed there so that he receives replies
575 to your reply. Other header fields may be added using the \"Other
578 These fields can only be added after the recipient is known. Once the
579 header contains one or more recipients, run the
580 \\[mh-insert-auto-fields] command or choose the \"Identity -> Insert
581 Auto Fields\" menu item to insert these fields manually. However, you
582 can just send the message and the fields will be added automatically.
583 You are given a chance to see these fields and to confirm them before
584 the message is actually sent. You can do away with this confirmation
585 by turning off the option `mh-auto-fields-prompt-flag'.
587 You should avoid using the same header field in `mh-auto-fields-list'
588 and `mh-identity-list' definitions that may apply to the same message
589 as the result is undefined."
592 (string :tag
"Recipient")
593 (repeat :tag
"Add at least one item below"
595 (cons :tag
"Identity"
600 (function (lambda (arg) `(const ,arg
)))
601 (mapcar 'car mh-identity-list
))))
602 (cons :tag
"Fcc Field"
604 (string :tag
"Value"))
605 (cons :tag
"Mail-Followup-To Field"
606 (const "Mail-Followup-To")
607 (string :tag
"Value"))
608 (cons :tag
"Other Field"
609 (string :tag
"Field")
610 (string :tag
"Value"))))))
613 (defcustom mh-auto-fields-prompt-flag t
614 "*Non-nil means to prompt before sending if fields inserted.
615 See `mh-auto-fields-list'."
619 (defcustom mh-identity-default nil
620 "Default identity to use when `mh-letter-mode' is called.
621 See `mh-identity-list'."
624 (cons '(const :tag
"None" nil
)
625 (mapcar (function (lambda (arg) `(const ,arg
)))
626 (mapcar 'car mh-identity-list
))))
629 (defcustom mh-identity-handlers
630 '(("From" . mh-identity-handler-top
)
631 (":default" . mh-identity-handler-bottom
)
632 (":attribution-verb" . mh-identity-handler-attribution-verb
)
633 (":signature" . mh-identity-handler-signature
)
634 (":pgg-default-user-id" . mh-identity-handler-gpg-identity
))
635 "Handler functions for fields in `mh-identity-list'.
637 This option is used to change the way that fields, signatures,
638 and attributions in `mh-identity-list' are added. To customize
639 `mh-identity-handlers', replace the name of an existing handler
640 function associated with the field you want to change with the
641 name of a function you have written. You can also click on an
642 \"INS\" button and insert a field of your choice and the name of
643 the function you have written to handle it.
645 The \"Field\" field can be any field that you've used in your
646 `mh-identity-list'. The special fields \":attribution-verb\",
647 \":signature\", or \":pgg-default-user-id\" are used for the
648 `mh-identity-list' choices \"Attribution Verb\", \"Signature\", and
649 \"GPG Key ID\" respectively.
651 The handler associated with the \":default\" field is used when no
654 The handler functions are passed two or three arguments: the
655 FIELD itself (for example, \"From\"), or one of the special
656 fields (for example, \":signature\"), and the ACTION 'remove or
657 'add. If the action is 'add, an additional argument
658 containing the VALUE for the field is given."
659 :type
'(repeat (cons (string :tag
"Field") function
))
664 ;;; Incorporating Your Mail (:group 'mh-inc)
666 (defcustom mh-inc-prog
"inc"
667 "*Program to incorporate new mail into a folder.
669 This program generates a one-line summary for each of the new
670 messages. Unless it is an absolute pathname, the file is assumed
671 to be in the `mh-progs' directory. You may also link a file to
672 \"inc\" that uses a different format. You'll then need to modify
673 several scan line format variables appropriately."
677 (defcustom mh-inc-spool-list nil
678 "*Alternate spool files.
680 You can use the `mh-inc-spool-list' variable to direct MH-E to
681 retrieve mail from arbitrary spool files other than your system
682 mailbox, file it in folders other than your \"+inbox\", and assign
683 key bindings to incorporate this mail.
685 Suppose you are subscribed to the \"mh-e-devel\" mailing list and
686 you use \"procmail\" to filter this mail into \"~/mail/mh-e\" with
687 the following recipe in \".procmailrc\":
691 * ^From mh-e-devel-admin@stop.mail-abuse.org
694 In order to incorporate \"~/mail/mh-e\" into \"+mh-e\" with an
695 \"I m\" (mh-inc-spool-mh-e) command, customize this option, and click
696 on the \"INS\" button. Enter a \"Spool File\" of \"~/mail/mh-e\", a
697 \"Folder\" of \"mh-e\", and a \"Key Binding\" of \"m\".
699 You can use \"xbuffy\" to automate the incorporation of this mail
700 using the \"gnudoit\" command in the \"gnuserv\" package as follows:
707 command gnudoit -q '(mh-inc-spool-mh-e)'"
708 :type
'(repeat (list (file :tag
"Spool File")
709 (string :tag
"Folder")
710 (character :tag
"Key Binding")))
711 :set
'mh-inc-spool-list-set
716 ;;; Searching (:group 'mh-index)
718 (defcustom mh-index-program nil
719 "Indexing program that MH-E shall use.
721 The default setting of this option is \"Auto-detect\" which means
722 that MH-E will automatically choose one of swish++, swish-e,
723 mairix, namazu, pick and grep in that order. If, for example, you
724 have both swish++ and mairix installed and you want to use
725 mairix, then you can set this option to \"mairix\".
727 More information about setting up an indexing program to use with
728 MH-E can be found in the documentation of `mh-index-search'."
729 :type
'(choice (const :tag
"Auto-detect" nil
)
730 (const :tag
"swish++" swish
++)
731 (const :tag
"swish-e" swish
)
732 (const :tag
"mairix" mairix
)
733 (const :tag
"namazu" namazu
)
734 (const :tag
"pick" pick
)
735 (const :tag
"grep" grep
))
740 ;;; Dealing with Junk Mail (:group 'mh-junk)
742 ;; Spam fighting program chosen
743 (defvar mh-junk-choice nil
)
745 ;; Available spam filter interfaces
746 (defvar mh-junk-function-alist
747 '((spamassassin mh-spamassassin-blacklist mh-spamassassin-whitelist
)
748 (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist
)
749 (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist
))
750 "Available choices of spam programs to use.
752 This is an alist. For each element there are functions that
753 blacklist a message as spam and whitelist a message incorrectly
754 classified as spam.")
756 (defun mh-junk-choose (symbol value
)
757 "Choose spam program to use.
759 The function is always called with SYMBOL bound to
760 `mh-junk-program' and VALUE bound to the new value of
761 `mh-junk-program'. The function sets the variable
762 `mh-junk-choice' in addition to `mh-junk-program'."
766 (loop for element in mh-junk-function-alist
767 until
(executable-find (symbol-name (car element
)))
768 finally return
(car element
)))))
770 ;; User customizable variables
771 (defcustom mh-junk-background nil
772 "If on, spam programs are run in background.
774 By default, the programs are run in the foreground, but this can
775 be slow when junking large numbers of messages. If you have
776 enough memory or don't junk that many messages at the same time,
777 you might try turning on this option."
778 :type
'(choice (const :tag
"Off" nil
)
782 (defcustom mh-junk-disposition nil
783 "Disposition of junk mail."
784 :type
'(choice (const :tag
"Delete Spam" nil
)
785 (string :tag
"Spam Folder"))
788 (defcustom mh-junk-program nil
789 "Spam program that MH-E should use.
791 The default setting of this option is \"Auto-detect\" which means
792 that MH-E will automatically choose one of SpamAssassin,
793 bogofilter, or SpamProbe in that order. If, for example, you have
794 both SpamAssassin and bogofilter installed and you want to use
795 bogofilter, then you can set this option to \"Bogofilter\"."
796 :type
'(choice (const :tag
"Auto-detect" nil
)
797 (const :tag
"SpamAssassin" spamassassin
)
798 (const :tag
"Bogofilter" bogofilter
)
799 (const :tag
"SpamProbe" spamprobe
))
805 ;;; Editing a Draft (:group 'mh-letter)
807 (defcustom mh-compose-insertion
(if (locate-library "mml") 'mml
'mh
)
808 "Type of tags used when composing MIME messages.
810 In addition to MH-style directives, MH-E also supports MML (MIME
811 Meta Language) tags. (see Info node `(emacs-mime)Composing').
812 This option can be used to choose between them. By default, this
813 option is set to \"MML\" if it is supported since it provides a
814 lot more functionality. This option can also be set to \"MH\" if
815 MH-style directives are preferred."
816 :type
'(choice (const :tag
"MML" mml
)
817 (const :tag
"MH" mh
))
820 (defcustom mh-compose-skipped-header-fields
821 '("From" "Organization" "References" "In-Reply-To"
822 "X-Face" "Face" "X-Image-URL" "X-Mailer")
823 "List of header fields to skip over when navigating in draft."
824 :type
'(repeat (string :tag
"Field"))
827 (defcustom mh-compose-space-does-completion-flag nil
828 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header."
832 (defcustom mh-delete-yanked-msg-window-flag nil
833 "*Non-nil means delete any window displaying the message.
835 This deletes the window containing the original message after
836 yanking it with \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make
837 more room on your screen for your reply."
841 (defcustom mh-extract-from-attribution-verb
"wrote:"
842 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
844 The attribution consists of the sender's name and email address
845 followed by the content of this option. This option can be set to
846 \"wrote:\", \"a écrit:\", and \"schrieb:\". You can also use the
847 \"Custom String\" menu item to enter your own verb."
848 :type
'(choice (const "wrote:")
851 (string :tag
"Custom String"))
854 (defcustom mh-ins-buf-prefix
"> "
855 "*String to put before each line of a yanked or inserted message.
857 The prefix \"> \" is the default setting of this option. I
858 suggest that you not modify this option since it is used by many
859 mailers and news readers: messages are far easier to read if
860 several included messages have all been indented by the same
863 This prefix is not inserted if you use one of the supercite
864 flavors of `mh-yank-behavior' or you have added a
865 `mail-citation-hook'."
869 (defcustom mh-letter-complete-function
'ispell-complete-word
870 "*Function to call when completing outside of address or folder fields.
872 In the body of the message,
873 \\<mh-letter-mode-map>\\[mh-letter-complete] runs this function,
874 which is set to \"ispell-complete-word\" by default."
875 :type
'(choice function
(const nil
))
878 (defcustom mh-letter-fill-column
72
879 "*Fill column to use in MH Letter mode.
881 By default, this option is 72 to allow others to quote your
882 message without line wrapping."
886 (defcustom mh-mml-method-default
(if mh-pgp-support-flag
"pgpmime" "none")
887 "Default method to use in security tags.
889 This option is used to select between a variety of mail security
890 mechanisms. The default is \"PGP (MIME)\" if it is supported\;
891 otherwise, the default is \"None\". Other mechanisms include
892 vanilla \"PGP\" and \"S/MIME\".
894 The `pgg' customization group may have some settings which may
895 interest you (see Info node `(pgg)').
897 In particular, I turn on the option `pgg-encrypt-for-me' so that
898 all messages I encrypt are encrypted with my public key as well.
899 If you keep a copy of all of your outgoing mail with a \"Fcc:\"
900 header field, this setting is vital so that you can read the mail
902 :type
'(choice (const :tag
"PGP (MIME)" "pgpmime")
903 (const :tag
"PGP" "pgp")
904 (const :tag
"S/MIME" "smime")
905 (const :tag
"None" "none"))
908 (defcustom mh-signature-file-name
"~/.signature"
909 "*Source of user's signature.
911 By default, the text of your signature is taken from the file
912 \"~/.signature\". You can read from other sources by changing this
913 option. This file may contain a vCard in which case an attachment is
914 added with the vCard.
916 This option may also be a symbol, in which case that function is
917 called. You may not want a signature separator to be added for you;
918 instead you may want to insert one yourself. Options that you may find
919 useful to do this include `mh-signature-separator' (when inserting a
920 signature separator) and `mh-signature-separator-regexp' (for finding
921 said separator). The function `mh-signature-separator-p', which
922 reports t if the buffer contains a separator, may be useful as well.
924 The signature is inserted into your message with the command
925 \\<mh-letter-mode-map>\\[mh-insert-signature] or with the option
930 (defcustom mh-signature-separator-flag t
931 "*Non-nil means a signature separator should be inserted.
933 It is not recommended that you change this option since various
934 mail user agents, including MH-E, use the separator to present
935 the signature differently, and to suppress the signature when
936 replying or yanking a letter into a draft."
940 (defcustom mh-x-face-file
"~/.face"
941 "*File containing face header field to insert in outgoing mail.
943 If the file starts with either of the strings \"X-Face:\", \"Face:\"
944 or \"X-Image-URL:\" then the contents are added to the message header
945 verbatim. Otherwise it is assumed that the file contains the value of
946 the \"X-Face:\" header field.
948 The \"X-Face:\" header field, which is a low-resolution, black and
949 white image, can be generated using the \"compface\" command (see URL
950 `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). The
951 \"Online X-Face Converter\" is a useful resource for quick conversion
952 of images into \"X-Face:\" header fields (see URL
953 `http://www.dairiki.org/xface/').
955 Use the \"make-face\" script to convert a JPEG image to the higher
956 resolution, color, \"Face:\" header field (see URL
957 `http://quimby.gnus.org/circus/face/make-face').
959 The URL of any image can be used for the \"X-Image-URL:\" field and no
960 processing of the image is required.
962 To prevent the setting of any of these header fields, either set
963 `mh-x-face-file' to nil, or simply ensure that the file defined by
964 this option doesn't exist."
968 (defcustom mh-yank-behavior
'attribution
969 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
971 To include the entire message, including the entire header, use
972 \"Body and Header\". Use \"Body\" to yank just the body without
973 the header. To yank only the portion of the message following the
974 point, set this option to \"Below Point\".
976 Choose \"Invoke supercite\" to pass the entire message and header
979 If the \"Body With Attribution\" setting is used, then the
980 message minus the header is yanked and a simple attribution line
981 is added at the top using the value of the option
982 `mh-extract-from-attribution-verb'. This is the default.
984 If the \"Invoke supercite\" or \"Body With Attribution\" settings
985 are used, the \"-noformat\" argument is passed to the \"repl\"
986 program to override a \"-filter\" or \"-format\" argument. These
987 settings also have \"Automatically\" variants that perform the
988 action automatically when you reply so that you don't need to use
989 \\[mh-yank-cur-msg] at all. Note that this automatic action is
990 only performed if the show buffer matches the message being
991 replied to. People who use the automatic variants tend to turn on
992 the option `mh-delete-yanked-msg-window-flag' as well so that the
993 show window is never displayed.
995 If the show buffer has a region, the option `mh-yank-behavior' is
996 ignored unless its value is one of Attribution variants in which
997 case the attribution is added to the yanked region.
999 If this option is set to one of the supercite flavors, the hook
1000 `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not
1002 :type
'(choice (const :tag
"Body and Header" t
)
1003 (const :tag
"Body" body
)
1004 (const :tag
"Below Point" nil
)
1005 (const :tag
"Invoke supercite" supercite
)
1006 (const :tag
"Invoke supercite, Automatically" autosupercite
)
1007 (const :tag
"Body With Attribution" attribution
)
1008 (const :tag
"Body With Attribution, Automatically"
1014 ;;; Ranges (:group 'mh-ranges)
1016 (defcustom mh-interpret-number-as-range-flag t
1017 "*Non-nil means interpret a number as a range.
1019 Since one of the most frequent ranges used is \"last:N\", MH-E
1020 will interpret input such as \"200\" as \"last:200\" if this
1021 option is on (which is the default). If you need to scan just the
1022 message 200, then use the range \"200:200\"."
1028 ;;; Scan Line Formats (:group 'mh-scan-line-formats)
1030 (defvar mh-scan-format-file t
) ;forward definition
1032 (defun mh-adaptive-cmd-note-flag-check (symbol value
)
1033 "Check if desired setting is legal.
1034 Throw an error if user tries to turn on
1035 `mh-adaptive-cmd-note-flag' when `mh-scan-format-file' isn't t.
1036 Otherwise, set SYMBOL to VALUE."
1038 (not (eq mh-scan-format-file t
)))
1039 (error "%s %s" "Can't turn on unless `mh-scan-format-file'"
1040 "is set to \"Use MH-E scan Format\"")
1041 (set-default symbol value
)))
1043 (defvar mh-adaptive-cmd-note-flag
) ;forward definition
1045 (defun mh-scan-format-file-check (symbol value
)
1046 "Check if desired setting is legal.
1047 Throw an error if user tries to set `mh-scan-format-file' to
1048 anything but t when `mh-adaptive-cmd-note-flag' is on. Otherwise,
1049 set SYMBOL to VALUE."
1050 (if (and (not (eq value t
))
1051 (eq mh-adaptive-cmd-note-flag t
))
1052 (error "%s %s" "You must turn off `mh-adaptive-cmd-note-flag'"
1053 "unless you use \"Use MH-E scan Format\"")
1054 (set-default symbol value
)))
1056 (defcustom mh-adaptive-cmd-note-flag t
1057 "*Non-nil means that the message number width is determined dynamically.
1059 If you've created your own format to handle long message numbers,
1060 you'll be pleased to know you no longer need it since MH-E adapts its
1061 internal format based upon the largest message number if this option
1062 is on (the default). This option may only be turned on when
1063 `mh-scan-format-file' is set to \"Use MH-E scan Format\".
1065 If you prefer fixed-width message numbers, turn off this option and
1066 call `mh-set-cmd-note' with the width specified by your format file
1067 \(see `mh-scan-format-file'). For example, the default width is 4, so
1068 you would use \"(mh-set-cmd-note 4)\"."
1070 :group
'mh-scan-line-formats
1071 :set
'mh-adaptive-cmd-note-flag-check
)
1073 (defcustom mh-scan-format-file t
1074 "Specifies the format file to pass to the scan program.
1076 The default setting for this option is \"Use MH-E scan Format\". This
1077 means that the format string will be taken from the either
1078 `mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or
1079 nmh (or GNU mailutils) is in use. This setting also enables you to
1080 turn on the `mh-adaptive-cmd-note-flag' option.
1082 You can also set this option to \"Use Default scan Format\" to get the
1083 same output as you would get if you ran \"scan\" from the shell. If
1084 you have a format file that you want MH-E to use but not MH, you can
1085 set this option to \"Specify a scan Format File\" and enter the name
1086 of your format file.
1088 If you change the format of the scan lines you'll need to tell MH-E
1089 how to parse the new format. As you will see, quite a lot of variables
1090 are involved to do that. Use \"\\[apropos] RET mh-scan.*regexp\" to
1091 obtain a list of these variables. You will also have to call
1092 `mh-set-cmd-note' if your notations are not in column 4 (columns in
1093 Emacs start with 0)."
1094 :type
'(choice (const :tag
"Use MH-E scan Format" t
)
1095 (const :tag
"Use Default scan Format" nil
)
1096 (file :tag
"Specify a scan Format File"))
1097 :group
'mh-scan-line-formats
1098 :set
'mh-scan-format-file-check
)
1100 (defcustom mh-scan-prog
"scan"
1101 "*Program used to scan messages.
1103 The name of the program that generates a listing of one line per
1104 message is held in this option. Unless this variable contains an
1105 absolute pathname, it is assumed to be in the `mh-progs'
1106 directory. You may link another program to `scan' (see
1107 \"mh-profile(5)\") to produce a different type of listing."
1109 :group
'mh-scan-line-formats
)
1110 (make-variable-buffer-local 'mh-scan-prog
)
1114 ;;; Sending Mail (:group 'mh-sending-mail)
1116 (defcustom mh-compose-forward-as-mime-flag t
1117 "*Non-nil means that messages are forwarded as attachments.
1119 By default, this option is on which means that the forwarded
1120 messages are included as attachments. If you would prefer to
1121 forward your messages verbatim (as text, inline), then turn off
1122 this option. Forwarding messages verbatim works well for short,
1123 textual messages, but your recipient won't be able to view any
1124 non-textual attachments that were in the forwarded message. Be
1125 aware that if you have \"forw: -mime\" in your MH profile, then
1126 forwarded messages will always be included as attachments
1127 regardless of the settings of this option."
1129 :group
'mh-sending-mail
)
1131 (defcustom mh-compose-letter-function nil
1132 "Invoked when starting a new draft.
1134 However, it is the last function called before you edit your
1135 message. The consequence of this is that you can write a function
1136 to write and send the message for you. This function is passed
1137 three arguments: the contents of the TO, SUBJECT, and CC header
1139 :type
'(choice (const nil
) function
)
1140 :group
'mh-sending-mail
)
1142 (defcustom mh-compose-prompt-flag nil
1143 "*Non-nil means prompt for header fields when composing a new draft."
1145 :group
'mh-sending-mail
)
1147 (defcustom mh-forward-subject-format
"%s: %s"
1148 "*Format string for forwarded message subject.
1150 This option is a string which includes two escapes (\"%s\"). The
1151 first \"%s\" is replaced with the sender of the original message,
1152 and the second one is replaced with the original \"Subject:\"."
1154 :group
'mh-sending-mail
)
1156 (defcustom mh-insert-x-mailer-flag t
1157 "*Non-nil means append an \"X-Mailer:\" header field to the header.
1159 This header field includes the version of MH-E and Emacs that you
1160 are using. If you don't want to participate in our marketing, you
1161 can turn this option off."
1163 :group
'mh-sending-mail
)
1165 (defcustom mh-redist-full-contents-flag nil
1166 "*Non-nil means the \"dist\" command needs entire letter for redistribution.
1168 This option must be turned on if \"dist\" requires the whole
1169 letter for redistribution, which is the case if \"send\" is
1170 compiled with the BERK option (which many people abhor). If you
1171 find that MH will not allow you to redistribute a message that
1172 has been redistributed before, turn off this option."
1174 :group
'mh-sending-mail
)
1176 (defcustom mh-reply-default-reply-to nil
1177 "*Sets the person or persons to whom a reply will be sent.
1179 This option is set to \"Prompt\" by default so that you are
1180 prompted for the recipient of a reply. If you find that most of
1181 the time that you specify \"cc\" when you reply to a message, set
1182 this option to \"cc\". Other choices include \"from\", \"to\", or
1183 \"all\". You can always edit the recipients in the draft."
1184 :type
'(choice (const :tag
"Prompt" nil
)
1189 :group
'mh-sending-mail
)
1191 (defcustom mh-reply-show-message-flag t
1192 "*Non-nil means the MH-Show buffer is displayed when replying.
1194 If you include the message automatically, you can hide the
1195 MH-Show buffer by turning off this option.
1197 See also `mh-reply'."
1199 :group
'mh-sending-mail
)
1203 ;;; Sequences (:group 'mh-sequences)
1205 ;; If `mh-unpropagated-sequences' becomes a defcustom, add the following to
1206 ;; the docstring: "Additional sequences that should not to be preserved can be
1207 ;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
1209 (defcustom mh-refile-preserves-sequences-flag t
1210 "*Non-nil means that sequences are preserved when messages are refiled.
1212 If a message is in any sequence (except \"Previous-Sequence:\"
1213 and \"cur\") when it is refiled, then it will still be in those
1214 sequences in the destination folder. If this behavior is not
1215 desired, then turn off this option."
1217 :group
'mh-sequences
)
1219 (defcustom mh-tick-seq
'tick
1220 "The name of the MH sequence for ticked messages.
1222 You can customize this option if you already use the \"tick\"
1223 sequence for your own use. You can also disable all of the
1224 ticking functions by choosing the \"Disable Ticking\" item but
1225 there isn't much advantage to that."
1226 :type
'(choice (const :tag
"Disable Ticking" nil
)
1228 :group
'mh-sequences
)
1230 (defcustom mh-update-sequences-after-mh-show-flag t
1231 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>.
1233 Three sequences are maintained internally by MH-E and pushed out
1234 to MH when a message is shown. They include the sequence
1235 specified by your \"Unseen-Sequence:\" profile entry, \"cur\",
1236 and the sequence listed by the option `mh-tick-seq' which is
1237 \"tick\" by default. If you do not like this behavior, turn off
1238 this option. You can then update the state manually with the
1239 \\[mh-execute-commands], \\[mh-quit], or \\[mh-update-sequences]
1242 :group
'mh-sequences
)
1246 ;;; Reading Your Mail (:group 'mh-show)
1248 (defcustom mh-bury-show-buffer-flag t
1249 "*Non-nil means show buffer is buried.
1251 One advantage of not burying the show buffer is that one can
1252 delete the show buffer more easily in an electric buffer list
1253 because of its proximity to its associated MH-Folder buffer. Try
1254 running \\[electric-buffer-list] to see what I mean."
1258 (defcustom mh-clean-message-header-flag t
1259 "*Non-nil means remove extraneous header fields.
1261 See also `mh-invisible-header-fields-default' and
1262 `mh-invisible-header-fields'."
1266 (defcustom mh-decode-mime-flag
(not (not (locate-library "mm-decode")))
1267 "*Non-nil means attachments are handled\\<mh-folder-mode-map>.
1269 MH-E can handle attachments as well if the Gnus `mm-decode'
1270 library is present. If so, this option will be on. Otherwise,
1271 you'll see the MIME body parts rather than text or attachments.
1272 There isn't much point in turning off this option; however, you
1273 can inspect it if it appears that the body parts are not being
1274 interpreted correctly or toggle it with the command
1275 \\[mh-toggle-mh-decode-mime-flag] to view the raw message.
1277 This option also controls the display of quoted-printable
1278 messages and other graphical widgets. See the options
1279 `mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'."
1283 (defcustom mh-display-buttons-for-alternatives-flag nil
1284 "*Non-nil means display buttons for all alternative attachments.
1286 Sometimes, a mail program will produce multiple alternatives of
1287 the attachment in increasing degree of faithfulness to the
1288 original content. By default, only the preferred alternative is
1289 displayed. If this option is on, then the preferred part is shown
1290 inline and buttons are shown for each of the other alternatives."
1294 (defcustom mh-display-buttons-for-inline-parts-flag nil
1295 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>.
1297 The sender can request that attachments should be viewed inline so
1298 that they do not really appear like an attachment at all to the
1299 reader. Most of the time, this is desirable, so by default MH-E
1300 suppresses the buttons for inline attachments. On the other hand, you
1301 may receive code or HTML which the sender has added to his message as
1302 inline attachments so that you can read them in MH-E. In this case, it
1303 is useful to see the buttons so that you know you don't have to cut
1304 and paste the code into a file; you can simply save the attachment.
1306 If you want to make the buttons visible for inline attachments, you
1307 can use the command \\[mh-toggle-mime-buttons] to toggle the
1308 visibility of these buttons. You can turn on these buttons permanently
1309 by turning on this option.
1311 MH-E cannot display all attachments inline however. It can display
1312 text (including HTML) and images."
1316 (defcustom mh-do-not-confirm-flag nil
1317 "*Non-nil means non-reversible commands do not prompt for confirmation.
1319 Commands such as `mh-pack-folder' prompt to confirm whether to
1320 process outstanding moves and deletes or not before continuing.
1321 Turning on this option means that these actions will be
1322 performed--which is usually desired but cannot be
1323 retracted--without question."
1327 (defcustom mh-fetch-x-image-url nil
1328 "*Control fetching of \"X-Image-URL:\" header field image.
1330 Ths option controls the fetching of the \"X-Image-URL:\" header
1331 field image with the following values:
1334 You are prompted before the image is fetched. MH-E will
1335 remember your reply and will either use the already fetched
1336 image the next time the same URL is encountered or silently
1337 skip it if you didn't fetch it the first time. This is a
1341 Images are never fetched and only displayed if they are
1342 already present in the cache. This is the default.
1344 There isn't a value of \"Always Fetch\" for privacy and DOS (denial of
1345 service) reasons. For example, fetching a URL can tip off a spammer
1346 that you've read his email (which is why you shouldn't blindly answer
1347 yes if you've set this option to \"Ask Before Fetching\"). Someone may
1348 also flood your network and fill your disk drive by sending a torrent
1349 of messages, each specifying a unique URL to a very large file.
1351 The cache of images is found in the directory \".mhe-x-image-cache\"
1352 within your MH directory. You can add your own face to the \"From:\"
1353 field too. See Info node `(mh-e)Picture'.
1355 This setting only has effect if the option `mh-show-use-xface-flag' is
1358 :type
'(choice (const :tag
"Ask Before Fetching" ask
)
1359 (const :tag
"Never Fetch" nil
))
1362 (defcustom mh-graphical-smileys-flag t
1363 "*Non-nil means graphical smileys are displayed.
1365 It is a long standing custom to inject body language using a
1366 cornucopia of punctuation, also known as the \"smileys\". MH-E
1367 can render these as graphical widgets if this option is turned
1368 on, which it is by default. Smileys include patterns such as :-)
1371 This option is disabled if the option `mh-decode-mime-flag' is
1376 (defcustom mh-graphical-emphasis-flag t
1377 "*Non-nil means graphical emphasis is displayed.
1379 A few typesetting features are indicated in ASCII text with
1380 certain characters. If your terminal supports it, MH-E can render
1381 these typesetting directives naturally if this option is turned
1382 on, which it is by default. For example, _underline_ will be
1383 underlined, *bold* will appear in bold, /italics/ will appear in
1384 italics, and so on. See the option `gnus-emphasis-alist' for the
1387 This option is disabled if the option `mh-decode-mime-flag' is
1392 (defcustom mh-highlight-citation-style
'gnus
1393 "Style for highlighting citations.
1395 If the sender of the message has cited other messages in his
1396 message, then MH-E will highlight these citations to emphasize
1397 the sender's actual response. This option can be customized to
1398 change the highlighting style. The \"Multicolor\" method uses a
1399 different color for each indentation while the \"Monochrome\"
1400 method highlights all citations in red. To disable highlighting
1401 of citations entirely, choose \"None\"."
1402 :type
'(choice (const :tag
"Multicolor" gnus
)
1403 (const :tag
"Monochrome" font-lock
)
1404 (const :tag
"None" nil
))
1407 ;; Keep fields alphabetized. Mention source, if known.
1408 (defvar mh-invisible-header-fields-internal
1412 "Cancel-Lock:" ; NNTP posts
1413 "Content-" ; RFC 2045
1414 "Delivered-To:" ; Egroups/yahoogroups mailing list manager
1415 "Delivery-Date:" ; MH
1417 "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys
1421 "Face:" ; Gnus Face header
1424 "Importance:" ; MS Outlook
1427 "List-" ; Mailman mailing list manager
1428 "List-" ; Unknown mailing list managers
1429 "List-Subscribe:" ; Unknown mailing list managers
1430 "List-Unsubscribe:" ; Unknown mailing list managers
1432 "Mailing-List:" ; Egroups/yahoogroups mailing list manager
1433 "Message-Id:" ; RFC 822
1434 "Mime-Version" ; RFC 2045
1437 "Original-Encoded-Information-Types:" ; X400
1438 "Original-Lines:" ; mail to news
1439 "Original-NNTP-" ; mail to news
1440 "Original-Newsgroups:" ; mail to news
1441 "Original-Path:" ; mail to news
1442 "Original-Received:" ; mail to news
1443 "Original-To:" ; mail to news
1444 "Original-X-" ; mail to news
1446 "P1-Content-Type:" ; X400
1447 "P1-Message-Id:" ; X400
1448 "P1-Recipient:" ; X400
1453 "Received:" ; RFC 822
1454 "Received-SPF:" ; Gmail
1459 "Return-Path:" ; RFC 822
1460 "Sensitivity:" ; MS Outlook
1461 "Status:" ; sendmail
1463 "Ua-Content-Id:" ; X400
1464 ;; "User-Agent:" ; Similar to X-Mailer, so display it.
1468 "X-Accept-Language:"
1469 "X-Accept-Language:" ; Netscape/Mozilla
1471 "X-Administrivia-To:"
1472 "X-AntiAbuse:" ; cPanel
1473 "X-Apparently-From:" ; MS Outlook
1474 "X-Apparently-To:" ; Egroups/yahoogroups mailing list manager
1475 "X-Authentication-Warning:" ; sendmail
1476 "X-Beenthere:" ; Mailman mailing list manager
1477 "X-Bogosity:" ; bogofilter
1478 "X-Bugzilla-*" ; Bugzilla
1480 "X-ContentStamp:" ; NetZero
1484 "X-ELNK-Trace:" ; Earthlink mailer
1485 "X-Envelope-Date:" ; GNU mailutils
1487 "X-Envelope-Sender:"
1489 "X-Evolution:" ; Evolution mail client
1494 "X-Gnus-Mail-Source:" ; gnus
1495 "X-Greylist:" ; milter-greylist-1.2.1
1496 "X-Habeas-SWE-1:" ; Spam
1497 "X-Habeas-SWE-2:" ; Spam
1498 "X-Habeas-SWE-3:" ; Spam
1499 "X-Habeas-SWE-4:" ; Spam
1500 "X-Habeas-SWE-5:" ; Spam
1501 "X-Habeas-SWE-6:" ; Spam
1502 "X-Habeas-SWE-7:" ; Spam
1503 "X-Habeas-SWE-8:" ; Spam
1504 "X-Habeas-SWE-9:" ; Spam
1507 "X-List-Host:" ; Unknown mailing list managers
1508 "X-List-Subscribe:" ; Unknown mailing list managers
1509 "X-List-Unsubscribe:" ; Unknown mailing list managers
1510 "X-Listprocessor-" ; ListProc(tm) by CREN
1511 "X-Listserver:" ; Unknown mailing list managers
1512 "X-Loop:" ; Unknown mailing list managers
1513 "X-Lumos-SenderID:" ; Roving ConstantContact
1514 "X-MAIL-INFO:" ; NetZero
1515 "X-MHE-Checksum" ; Checksum added during index search
1516 "X-MIME-Autoconverted:" ; sendmail
1518 "X-MS-" ; MS Outlook
1519 "X-MailScanner" ; ListProc(tm) by CREN
1520 "X-Mailing-List:" ; Unknown mailing list managers
1521 "X-Mailman-Version:" ; Mailman mailing list manager
1522 "X-Majordomo:" ; Majordomo mailing list manager
1524 "X-MessageWall-Score:" ; Unknown mailing list manager, AUC TeX
1525 "X-MimeOLE:" ; MS Outlook
1526 "X-Mms-" ; T-Mobile pictures
1527 "X-Mozilla-Status:" ; Netscape/Mozilla
1528 "X-Msmail-" ; MS Outlook
1529 "X-NAI-Spam-" ; Network Associates Inc. SpamKiller
1532 "X-Notes-Item:" ; Lotus Notes Domino structured header
1533 "X-OperatingSystem:"
1534 ;;"X-Operator:" ; Similar to X-Mailer, so display it
1535 "X-Orcl-Content-Type:"
1536 "X-Original-Complaints-To:"
1537 "X-Original-Date:" ; SourceForge mailing list manager
1540 "X-OriginalArrivalTime:" ; Hotmail
1541 "X-Originating-IP:" ; Hotmail
1543 "X-Priority:" ; MS Outlook
1544 "X-Qotd-" ; User added
1549 "X-Return-Path-Hint:" ; Roving ConstantContact
1550 "X-Roving-*" ; Roving ConstantContact
1560 "X-Sieve:" ; Sieve filtering
1562 "X-Spam-" ; Spamassassin
1563 "X-SpamBouncer:" ; Spam
1571 "X-USANET-" ; usa.net
1573 "X-VSMLoop:" ; NTMail
1574 "X-Virus-Scanned" ; amavisd-new
1576 "X-WebTV-Signature:"
1577 "X-Wss-Id:" ; Worldtalk gateways
1579 "X-eGroups-" ; Egroups/yahoogroups mailing list manager
1581 "X-submission-address:"
1584 "List of default header fields that are not to be shown.
1586 Do not alter this variable directly. Instead, add entries from
1587 here that you would like to be displayed in
1588 `mh-invisible-header-fields-default' and add entries to hide in
1589 `mh-invisible-header-fields'.")
1591 (defvar mh-invisible-header-fields-compiled nil
1592 "*Regexp matching lines in a message header that are not to be shown.
1593 Do not alter this variable directly. Instead, customize
1594 `mh-invisible-header-fields-default' checking for fields normally
1595 hidden that you wish to display, and add extra entries to hide in
1596 `mh-invisible-header-fields'.")
1598 ;; Forward definition.
1599 (defvar mh-invisible-header-fields
)
1600 (defvar mh-invisible-header-fields-default nil
)
1602 (defun mh-invisible-headers ()
1603 "Make or remake the variable `mh-invisible-header-fields-compiled'.
1604 Done using `mh-invisible-header-fields-internal' as input, from
1605 which entries from `mh-invisible-header-fields-default' are
1606 removed and entries from `mh-invisible-header-fields' are added."
1607 (let ((fields mh-invisible-header-fields-internal
))
1608 (when mh-invisible-header-fields-default
1609 ;; Remove entries from `mh-invisible-header-fields-default'
1611 (loop for x in fields
1612 unless
(member x mh-invisible-header-fields-default
)
1614 (when (and (boundp 'mh-invisible-header-fields
)
1615 mh-invisible-header-fields
)
1616 (dolist (x mh-invisible-header-fields
)
1617 (unless (member x fields
) (setq fields
(cons x fields
)))))
1619 (setq mh-invisible-header-fields-compiled
1622 ;; workaround for insufficient default
1623 (let ((max-specpdl-size 1000))
1624 (regexp-opt fields t
))))
1625 (setq mh-invisible-header-fields-compiled nil
))))
1627 (defcustom mh-invisible-header-fields nil
1628 "*Additional header fields to hide.
1630 Header fields that you would like to hide that aren't listed in
1631 `mh-invisible-header-fields-default' can be added to this option
1632 with a couple of caveats. Regular expressions are not allowed.
1633 Unique fields should have a \":\" suffix; otherwise, the element
1634 can be used to render invisible an entire class of fields that
1635 start with the same prefix. If you think a header field should be
1636 generally ignored, report a bug (see URL
1637 `https://sourceforge.net/tracker/?group_id=13357&atid=113357').
1639 See also `mh-clean-message-header-flag'."
1641 :type
'(repeat (string :tag
"Header field"))
1642 :set
(lambda (symbol value
)
1643 (set-default symbol value
)
1644 (mh-invisible-headers))
1647 (defcustom mh-invisible-header-fields-default nil
1648 "*List of hidden header fields.
1650 The header fields listed in this option are hidden, although you
1651 can check off any field that you would like to see.
1653 Header fields that you would like to hide that aren't listed can
1654 be added to the option `mh-invisible-header-fields'.
1656 See also `mh-clean-message-header-flag'."
1657 :type
`(set ,@(mapcar (lambda (x) `(const ,x
))
1658 mh-invisible-header-fields-internal
))
1659 :set
(lambda (symbol value
)
1660 (set-default symbol value
)
1661 (mh-invisible-headers))
1664 (defcustom mh-lpr-command-format
"lpr -J '%s'"
1665 "*Command used to print\\<mh-folder-mode-map>.
1667 This option contains the Unix command line which performs the
1668 actual printing for the \\[mh-print-msg] command. The string can
1669 contain one escape, \"%s\", which is replaced by the name of the
1670 folder and the message number and is useful for print job names.
1671 I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a
1672 nice header and adds a bit of margin so the text fits within my
1675 This options is not used by the commands \\[mh-ps-print-msg] or
1676 \\[mh-ps-print-msg-file]."
1680 (defcustom mh-max-inline-image-height nil
1681 "*Maximum inline image height if \"Content-Disposition:\" is not present.
1683 Some older mail programs do not insert this needed plumbing to
1684 tell MH-E whether to display the attachments inline or not. If
1685 this is the case, MH-E will display these images inline if they
1686 are smaller than the window. However, you might want to allow
1687 larger images to be displayed inline. To do this, you can change
1688 the options `mh-max-inline-image-width' and
1689 `mh-max-inline-image-height' from their default value of zero to
1690 a large number. The size of your screen is a good choice for
1692 :type
'(choice (const nil
) integer
)
1695 (defcustom mh-max-inline-image-width nil
1696 "*Maximum inline image width if \"Content-Disposition:\" is not present.
1698 Some older mail programs do not insert this needed plumbing to
1699 tell MH-E whether to display the attachments inline or not. If
1700 this is the case, MH-E will display these images inline if they
1701 are smaller than the window. However, you might want to allow
1702 larger images to be displayed inline. To do this, you can change
1703 the options `mh-max-inline-image-width' and
1704 `mh-max-inline-image-height' from their default value of zero to
1705 a large number. The size of your screen is a good choice for
1707 :type
'(choice (const nil
) integer
)
1710 (defcustom mh-mhl-format-file nil
1711 "*Specifies the format file to pass to the \"mhl\" program.
1713 Normally MH-E takes care of displaying messages itself (rather than
1714 calling an MH program to do the work). If you'd rather have \"mhl\"
1715 display the message (within MH-E), change this option from its default
1716 value of \"Use Default mhl Format (Printing Only)\".
1718 You can set this option to \"Use Default mhl Format\" to get the same
1719 output as you would get if you ran \"mhl\" from the shell.
1721 If you have a format file that you want MH-E to use, you can set this
1722 option to \"Specify an mhl Format File\" and enter the name of your
1723 format file. Your format file should specify a non-zero value for
1724 \"overflowoffset\" to allow MH-E to parse the header. Note that
1725 \"mhl\" is always used for printing and forwarding; in this case, the
1726 value of this option is consulted if you have specified a format
1728 :type
'(choice (const :tag
"Use Default mhl Format (Printing Only)" nil
)
1729 (const :tag
"Use Default mhl Format" t
)
1730 (file :tag
"Specify an mhl Format File"))
1733 (defcustom mh-mime-save-parts-default-directory t
1734 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts].
1736 The default value for this option is \"Prompt Always\" so that
1737 you are always prompted for the directory in which to save the
1738 attachments. However, if you usually use the same directory
1739 within a session, then you can set this option to \"Prompt the
1740 First Time\" to avoid the prompt each time. you can make this
1741 directory permanent by choosing \"Directory\" and entering the
1743 :type
'(choice (const :tag
"Prompt the First Time" nil
)
1744 (const :tag
"Prompt Always" t
)
1748 (defcustom mh-print-background-flag nil
1749 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>.
1751 Normally messages are printed in the foreground. If this is slow on
1752 your system, you may elect to turn off this option to print in the
1755 WARNING: If you do this, do not delete the message until it is printed
1756 or else the output may be truncated.
1758 This option is not used by the commands \\[mh-ps-print-msg] or
1759 \\[mh-ps-print-msg-file]."
1763 (defcustom mh-show-maximum-size
0
1764 "*Maximum size of message (in bytes) to display automatically.
1766 This option provides an opportunity to skip over large messages
1767 which may be slow to load. The default value of 0 means that all
1768 message are shown regardless of size."
1772 (defcustom mh-show-use-goto-addr-flag
(and (boundp 'goto-address-highlight-p
)
1773 goto-address-highlight-p
)
1774 "*Non-nil means highlight URLs and email addresses\\<goto-address-highlight-keymap>.
1776 To send a message using the highlighted email address or to view
1777 the web page for the highlighted URL, use the middle mouse button
1778 or \\[goto-address-at-point].
1780 See Info node `(mh-e)Sending Mail' to see how to configure Emacs
1781 to send the message using MH-E.
1783 The default value of this option comes from the value of
1784 `goto-address-highlight-p'."
1788 (defcustom mh-show-use-xface-flag
(>= emacs-major-version
21)
1789 "*Non-nil means display face images in MH-show buffers.
1791 MH-E can display the content of \"Face:\", \"X-Face:\", and
1792 \"X-Image-URL:\" header fields. If any of these fields occur in the
1793 header of your message, the sender's face will appear in the \"From:\"
1794 header field. If more than one of these fields appear, then the first
1795 field found in the order \"Face:\", \"X-Face:\", and \"X-Image-URL:\"
1798 The option `mh-show-use-xface-flag' is used to turn this feature on
1799 and off. This feature will be turned on by default if your system
1802 The first header field used, if present, is the Gnus-specific
1803 \"Face:\" field. The \"Face:\" field appeared in GNU Emacs 21 and
1804 XEmacs. For more information, see URL
1805 `http://quimby.gnus.org/circus/face/'. Next is the traditional
1806 \"X-Face:\" header field. The display of this field requires the
1807 \"uncompface\" program (see URL
1808 `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent
1809 versions of XEmacs have internal support for \"X-Face:\" images. If
1810 your version of XEmacs does not, then you'll need both \"uncompface\"
1811 and the x-face package (see URL `ftp://ftp.jpl.org/pub/elisp/').
1813 Finally, MH-E will display images referenced by the \"X-Image-URL:\"
1814 header field if neither the \"Face:\" nor the \"X-Face:\" fields are
1815 present. The display of the images requires \"wget\" (see URL
1816 `http://www.gnu.org/software/wget/wget.html'), \"fetch\", or \"curl\"
1817 to fetch the image and the \"convert\" program from the ImageMagick
1818 suite (see URL `http://www.imagemagick.org/'). Of the three header
1819 fields this is the most efficient in terms of network usage since the
1820 image doesn't need to be transmitted with every single mail.
1822 The option `mh-fetch-x-image-url' controls the fetching of the
1823 \"X-Image-URL:\" header field image."
1827 (defcustom mh-store-default-directory nil
1828 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg].
1830 If you would like to change the initial default directory,
1831 customize this option, change the value from \"Current\" to
1832 \"Directory\", and then enter the name of the directory for storing
1833 the content of these messages."
1834 :type
'(choice (const :tag
"Current" nil
)
1838 (defcustom mh-summary-height nil
1839 "*Number of lines in MH-Folder buffer (including the mode line).
1841 The default value of this option is \"Automatic\" which means
1842 that the MH-Folder buffer will maintain the same proportional
1843 size if the frame is resized. If you'd prefer a fixed height,
1844 then choose the \"Fixed Size\" option and enter the number of
1845 lines you'd like to see."
1846 :type
'(choice (const :tag
"Automatic" nil
)
1847 (integer :tag
"Fixed Size"))
1852 ;;; The Speedbar (:group 'mh-speedbar)
1854 (defcustom mh-speed-update-interval
60
1855 "Time between speedbar updates in seconds.
1856 Set to 0 to disable automatic update."
1858 :group
'mh-speedbar
)
1862 ;;; Threading (:group 'mh-thread)
1864 (defcustom mh-show-threads-flag nil
1865 "*Non-nil means new folders start in threaded mode.
1867 Threading large number of messages can be time consuming so this
1868 option is turned off by default. If you turn this option on, then
1869 threading will be done only if the number of messages being
1870 threaded is less than `mh-large-folder'."
1876 ;;; The Tool Bar (:group 'mh-tool-bar)
1878 (defcustom mh-tool-bar-search-function
'mh-search-folder
1879 "*Function called by the tool bar search button.
1881 Available functions include `mh-search-folder', the default, and
1882 `mh-index-search'. You can also choose \"Other Function\" from
1883 the \"Value Menu\" and enter a function of your own choosing."
1884 :type
'(choice (const mh-search-folder
)
1885 (const mh-index-search
)
1886 (function :tag
"Other Function"))
1887 :group
'mh-tool-bar
)
1889 ;; Functions called from the tool bar
1890 (defun mh-tool-bar-search (&optional arg
)
1891 "Interactively call `mh-tool-bar-search-function'.
1892 Optional argument ARG is not used."
1894 (call-interactively mh-tool-bar-search-function
))
1896 (defun mh-tool-bar-customize ()
1897 "Call `mh-customize' from the tool bar."
1901 (defun mh-tool-bar-folder-help ()
1902 "Visit \"(mh-e)Top\"."
1905 (delete-other-windows))
1907 (defun mh-tool-bar-letter-help ()
1908 "Visit \"(mh-e)Editing Drafts\"."
1910 (info "(mh-e)Editing Drafts")
1911 (delete-other-windows))
1913 (defmacro mh-tool-bar-reply-generator
(function recipient folder-buffer-flag
)
1914 "Generate FUNCTION that replies to RECIPIENT.
1915 If FOLDER-BUFFER-FLAG is nil then the function generated...
1916 When INCLUDE-FLAG is non-nil, include message body being replied to."
1917 `(defun ,function
(&optional arg
)
1918 ,(format "Reply to \"%s\".\nWhen ARG is non-nil include message in reply."
1921 ,(if folder-buffer-flag nil
'(set-buffer mh-show-folder-buffer
))
1922 (mh-reply (mh-get-msg-num nil
) ,recipient arg
)))
1924 (mh-tool-bar-reply-generator mh-tool-bar-reply-from
"from" t
)
1925 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-from
"from" nil
)
1926 (mh-tool-bar-reply-generator mh-tool-bar-reply-to
"to" t
)
1927 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-to
"to" nil
)
1928 (mh-tool-bar-reply-generator mh-tool-bar-reply-all
"all" t
)
1929 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-all
"all" nil
)
1931 ;; XEmacs has a couple of extra customizations...
1933 (defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
1934 "*If non-nil, use tool bar.
1936 This option controls whether to show the MH-E icons at all. By
1937 default, this option is turned on if the window system supports
1938 tool bars. If your system doesn't support tool bars, then you
1939 won't be able to turn on this option."
1942 :set
(lambda (symbol value
)
1943 (if (and (eq value t
)
1944 (not mh-xemacs-has-tool-bar-flag
))
1945 (error "Tool bar not supported"))
1946 (set-default symbol value
)))
1948 (defcustom mh-xemacs-tool-bar-position nil
1949 "*Tool bar location.
1951 This option controls the placement of the tool bar along the four
1952 edges of the frame. You can choose from one of \"Same As Default
1953 Tool Bar\", \"Top\", \"Bottom\", \"Left\", or \"Right\". If this
1954 variable is set to anything other than \"Same As Default Tool
1955 Bar\" and the default tool bar is in a different location, then
1956 two tool bars will be displayed: the MH-E tool bar and the
1958 :type
'(radio (const :tag
"Same As Default Tool Bar" :value nil
)
1959 (const :tag
"Top" :value top
)
1960 (const :tag
"Bottom" :value bottom
)
1961 (const :tag
"Left" :value left
)
1962 (const :tag
"Right" :value right
))
1963 :group
'mh-tool-bar
))
1965 (defun mh-buffer-exists-p (mode)
1966 "Test whether a buffer with major mode MODE is present."
1967 (loop for buf in
(buffer-list)
1968 when
(save-excursion
1970 (eq major-mode mode
))
1973 (defmacro mh-tool-bar-define
(defaults &rest buttons
)
1974 "Define a tool bar for MH-E.
1975 DEFAULTS is the list of buttons that are present by default. It
1976 is a list of lists where the sublists are of the following form:
1978 (:KEYWORD FUNC1 FUNC2 FUNC3 ...)
1980 Here :KEYWORD is one of :folder or :letter. If it is :folder then
1981 the default buttons in the folder and show mode buffers are being
1982 specified. If it is :letter then the default buttons in the
1983 letter mode are listed. FUNC1, FUNC2, FUNC3, ... are the names of
1984 the functions that the buttons would execute.
1986 Each element of BUTTONS is a list consisting of four mandatory
1987 items and one optional item as follows:
1989 (FUNCTION MODES ICON DOC &optional ENABLE-EXPR)
1993 FUNCTION is the name of the function that will be executed when
1994 the button is clicked.
1996 MODES is a list of symbols. List elements must be from \"folder\",
1997 \"letter\" and \"sequence\". If \"folder\" is present then the button is
1998 available in the folder and show buffer. If the name of FUNCTION is
1999 of the form \"mh-foo\", where foo is some arbitrary string, then we
2000 check if the function `mh-show-foo' exists. If it exists then that
2001 function is used in the show buffer. Otherwise the original function
2002 `mh-foo' is used in the show buffer as well. Presence of \"sequence\"
2003 is handled similar to the above. The only difference is that the
2004 button is shown only when the folder is narrowed to a sequence. If
2005 \"letter\" is present in MODES, then the button is available during
2006 draft editing and runs FUNCTION when clicked.
2008 ICON is the icon that is drawn in the button.
2010 DOC is the documentation for the button. It is used in tool-tips and
2011 in providing other help to the user. GNU Emacs uses only the first
2012 line of the string. So the DOC should be formatted such that the
2013 first line is useful and complete without the rest of the string.
2015 Optional item ENABLE-EXPR is an arbitrary lisp expression. If it
2016 evaluates to nil, then the button is deactivated, otherwise it is
2017 active. If it isn't present then the button is always active."
2018 ;; The following variable names have been carefully chosen to make code
2019 ;; generation easier. Modifying the names should be done carefully.
2020 (let (folder-buttons folder-docs folder-button-setter sequence-button-setter
2021 show-buttons show-button-setter show-seq-button-setter
2022 letter-buttons letter-docs letter-button-setter
2023 folder-defaults letter-defaults
2024 folder-vectors show-vectors letter-vectors
)
2025 (dolist (x defaults
)
2026 (cond ((eq (car x
) :folder
) (setq folder-defaults
(cdr x
)))
2027 ((eq (car x
) :letter
) (setq letter-defaults
(cdr x
)))))
2028 (dolist (button buttons
)
2029 (unless (and (listp button
)
2030 (or (equal (length button
) 4) (equal (length button
) 5)))
2031 (error "Incorrect MH-E tool-bar button specification: %s" button
))
2032 (let* ((name (nth 0 button
))
2033 (name-str (symbol-name name
))
2034 (icon (nth 2 button
))
2035 (xemacs-icon (mh-do-in-xemacs
2036 (cdr (assoc (intern icon
) mh-xemacs-icon-map
))))
2037 (full-doc (nth 3 button
))
2038 (doc (if (string-match "\\(.*\\)\n" full-doc
)
2039 (match-string 1 full-doc
)
2041 (enable-expr (or (nth 4 button
) t
))
2042 (modes (nth 1 button
))
2044 (when (memq 'letter modes
) (setq functions
`(:letter
,name
)))
2045 (when (or (memq 'folder modes
) (memq 'sequence modes
))
2047 (append `(,(if (memq 'folder modes
) :folder
:sequence
) ,name
)
2050 (if (string-match "^mh-\\(.*\\)$" name-str
)
2051 (intern (concat "mh-show-" (match-string 1 name-str
)))
2054 (append `(,(if (memq 'folder modes
) :show
:show-seq
)
2055 ,(if (fboundp show-sym
) show-sym name
))
2057 (do ((functions functions
(cddr functions
)))
2059 (let* ((type (car functions
))
2060 (function (cadr functions
))
2061 (type1 (substring (symbol-name type
) 1))
2062 (vector-list (cond ((eq type
:show
) 'show-vectors
)
2063 ((eq type
:show-seq
) 'show-vectors
)
2064 ((eq type
:letter
) 'letter-vectors
)
2065 (t 'folder-vectors
)))
2066 (list (cond ((eq type
:letter
) 'mh-tool-bar-letter-buttons
)
2067 (t 'mh-tool-bar-folder-buttons
)))
2068 (key (intern (concat "mh-" type1
"tool-bar-" name-str
)))
2069 (setter (intern (concat type1
"-button-setter")))
2070 (mbuttons (cond ((eq type
:letter
) 'letter-buttons
)
2071 ((eq type
:show
) 'show-buttons
)
2072 ((eq type
:show-seq
) 'show-buttons
)
2073 (t 'folder-buttons
)))
2074 (docs (cond ((eq mbuttons
'letter-buttons
) 'letter-docs
)
2075 ((eq mbuttons
'folder-buttons
) 'folder-docs
))))
2076 (add-to-list vector-list
`[,xemacs-icon
,function t
,full-doc
])
2078 setter
`(when (member ',name
,list
)
2079 (mh-funcall-if-exists
2080 tool-bar-add-item
,icon
',function
',key
2081 :help
,doc
:enable
',enable-expr
)))
2082 (add-to-list mbuttons name
)
2083 (if docs
(add-to-list docs doc
))))))
2084 (setq folder-buttons
(nreverse folder-buttons
)
2085 letter-buttons
(nreverse letter-buttons
)
2086 show-buttons
(nreverse show-buttons
)
2087 letter-docs
(nreverse letter-docs
)
2088 folder-docs
(nreverse folder-docs
)
2089 folder-vectors
(nreverse folder-vectors
)
2090 show-vectors
(nreverse show-vectors
)
2091 letter-vectors
(nreverse letter-vectors
))
2092 (dolist (x folder-defaults
)
2093 (unless (memq x folder-buttons
)
2094 (error "Folder defaults contains unknown button '%s'" x
)))
2095 (dolist (x letter-defaults
)
2096 (unless (memq x letter-buttons
)
2097 (error "Letter defaults contains unknown button '%s'" x
)))
2098 `(eval-when (compile load eval
)
2099 (defvar mh-folder-tool-bar-map nil
)
2100 (defvar mh-folder-seq-tool-bar-map nil
)
2101 (defvar mh-show-tool-bar-map nil
)
2102 (defvar mh-show-seq-tool-bar-map nil
)
2103 (defvar mh-letter-tool-bar-map nil
)
2104 ;; GNU Emacs tool bar specific code
2106 ;; Tool bar initialization functions
2107 (defun mh-tool-bar-folder-buttons-init ()
2108 (when (mh-buffer-exists-p 'mh-folder-mode
)
2109 (mh-image-load-path)
2110 (setq mh-folder-tool-bar-map
2111 (let ((tool-bar-map (make-sparse-keymap)))
2112 ,@(nreverse folder-button-setter
)
2114 (setq mh-show-tool-bar-map
2115 (let ((tool-bar-map (make-sparse-keymap)))
2116 ,@(nreverse show-button-setter
)
2118 (setq mh-show-seq-tool-bar-map
2119 (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map
)))
2120 ,@(nreverse show-seq-button-setter
)
2122 (setq mh-folder-seq-tool-bar-map
2123 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map
)))
2124 ,@(nreverse sequence-button-setter
)
2126 (defun mh-tool-bar-letter-buttons-init ()
2127 (when (mh-buffer-exists-p 'mh-letter-mode
)
2128 (mh-image-load-path)
2129 (setq mh-letter-tool-bar-map
2130 (let ((tool-bar-map (make-sparse-keymap)))
2131 ,@(nreverse letter-button-setter
)
2133 ;; Custom setter functions
2134 (defun mh-tool-bar-folder-buttons-set (symbol value
)
2135 "Construct tool bar for `mh-folder-mode' and `mh-show-mode'."
2136 (set-default symbol value
)
2137 (mh-tool-bar-folder-buttons-init))
2138 (defun mh-tool-bar-letter-buttons-set (symbol value
)
2139 "Construct tool bar for `mh-letter-mode'."
2140 (set-default symbol value
)
2141 (mh-tool-bar-letter-buttons-init)))
2142 ;; XEmacs specific code
2144 (defvar mh-tool-bar-folder-vector-map
2145 ',(loop for button in folder-buttons
2146 for vector in folder-vectors
2147 collect
(cons button vector
)))
2148 (defvar mh-tool-bar-show-vector-map
2149 ',(loop for button in show-buttons
2150 for vector in show-vectors
2151 collect
(cons button vector
)))
2152 (defvar mh-tool-bar-letter-vector-map
2153 ',(loop for button in letter-buttons
2154 for vector in letter-vectors
2155 collect
(cons button vector
)))
2156 (defvar mh-tool-bar-folder-buttons nil
)
2157 (defvar mh-tool-bar-show-buttons nil
)
2158 (defvar mh-tool-bar-letter-buttons nil
)
2159 ;; Custom setter functions
2160 (defun mh-tool-bar-letter-buttons-set (symbol value
)
2161 (set-default symbol value
)
2162 (when mh-xemacs-has-tool-bar-flag
2163 (setq mh-tool-bar-letter-buttons
2164 (loop for b in value
2165 collect
(cdr (assoc b mh-tool-bar-letter-vector-map
))))))
2166 (defun mh-tool-bar-folder-buttons-set (symbol value
)
2167 (set-default symbol value
)
2168 (when mh-xemacs-has-tool-bar-flag
2169 (setq mh-tool-bar-folder-buttons
2170 (loop for b in value
2171 collect
(cdr (assoc b mh-tool-bar-folder-vector-map
))))
2172 (setq mh-tool-bar-show-buttons
2173 (loop for b in value
2174 collect
(cdr (assoc b mh-tool-bar-show-vector-map
))))))
2175 (defun mh-tool-bar-init (mode)
2176 "Install tool bar in MODE."
2177 (let ((tool-bar (cond ((eq mode
:folder
) mh-tool-bar-folder-buttons
)
2178 ((eq mode
:letter
) mh-tool-bar-letter-buttons
)
2179 ((eq mode
:show
) mh-tool-bar-show-buttons
)))
2182 (buffer (current-buffer)))
2183 (when mh-xemacs-use-tool-bar-flag
2185 ((eq mh-xemacs-tool-bar-position
'top
)
2186 (set-specifier top-toolbar tool-bar buffer
)
2187 (set-specifier top-toolbar-visible-p t
)
2188 (set-specifier top-toolbar-height height
))
2189 ((eq mh-xemacs-tool-bar-position
'bottom
)
2190 (set-specifier bottom-toolbar tool-bar buffer
)
2191 (set-specifier bottom-toolbar-visible-p t
)
2192 (set-specifier bottom-toolbar-height height
))
2193 ((eq mh-xemacs-tool-bar-position
'left
)
2194 (set-specifier left-toolbar tool-bar buffer
)
2195 (set-specifier left-toolbar-visible-p t
)
2196 (set-specifier left-toolbar-width width
))
2197 ((eq mh-xemacs-tool-bar-position
'right
)
2198 (set-specifier right-toolbar tool-bar buffer
)
2199 (set-specifier right-toolbar-visible-p t
)
2200 (set-specifier right-toolbar-width width
))
2201 (t (set-specifier default-toolbar tool-bar buffer
)))))))
2202 ;; Declare customizable tool bars
2203 (custom-declare-variable
2204 'mh-tool-bar-folder-buttons
2205 '(list ,@(mapcar (lambda (x) `(quote ,x
)) folder-defaults
))
2206 "List of buttons to include in MH-Folder tool bar."
2207 :group
'mh-tool-bar
:set
'mh-tool-bar-folder-buttons-set
2208 :type
'(set ,@(loop for x in folder-buttons
2209 for y in folder-docs
2210 collect
`(const :tag
,y
,x
))))
2211 (custom-declare-variable
2212 'mh-tool-bar-letter-buttons
2213 '(list ,@(mapcar (lambda (x) `(quote ,x
)) letter-defaults
))
2214 "List of buttons to include in MH-Letter tool bar."
2215 :group
'mh-tool-bar
:set
'mh-tool-bar-letter-buttons-set
2216 :type
'(set ,@(loop for x in letter-buttons
2217 for y in letter-docs
2218 collect
`(const :tag
,y
,x
)))))))
2221 ((:folder mh-inc-folder mh-mime-save-parts mh-previous-undeleted-msg
2222 mh-page-msg mh-next-undeleted-msg mh-delete-msg mh-refile-msg
2223 mh-undo mh-execute-commands mh-toggle-tick mh-reply
2224 mh-alias-grab-from-field mh-send mh-rescan-folder
2225 mh-tool-bar-search mh-visit-folder
2226 mh-tool-bar-customize mh-tool-bar-folder-help mh-widen
)
2227 (:letter mh-send-letter mh-compose-insertion ispell-message save-buffer
2228 undo kill-region menu-bar-kill-ring-save yank mh-fully-kill-draft
2229 mh-tool-bar-customize mh-tool-bar-letter-help
))
2230 ;; Folder/Show buffer buttons
2231 (mh-inc-folder (folder) "mail"
2232 "Incorporate new mail in Inbox
2233 This button runs `mh-inc-folder' which drags any
2234 new mail into your Inbox folder.")
2235 (mh-mime-save-parts (folder) "attach"
2236 "Save MIME parts from this message
2237 This button runs `mh-mime-save-parts' which saves a message's
2238 different parts into separate files.")
2239 (mh-previous-undeleted-msg (folder) "left-arrow"
2240 "Go to the previous undeleted message
2241 This button runs `mh-previous-undeleted-msg'")
2242 (mh-page-msg (folder) "page-down"
2243 "Page the current message forwards\nThis button runs `mh-page-msg'")
2244 (mh-next-undeleted-msg (folder) "right-arrow"
2245 "Go to the next undeleted message\nThe button runs `mh-next-undeleted-msg'")
2246 (mh-delete-msg (folder) "close"
2247 "Mark this message for deletion\nThis button runs `mh-delete-msg'")
2248 (mh-refile-msg (folder) "mail/refile"
2249 "Refile this message\nThis button runs `mh-refile-msg'")
2250 (mh-undo (folder) "undo" "Undo last operation\nThis button runs `undo'"
2251 (mh-outstanding-commands-p))
2252 (mh-execute-commands (folder) "execute"
2253 "Perform moves and deletes\nThis button runs `mh-execute-commands'"
2254 (mh-outstanding-commands-p))
2255 (mh-toggle-tick (folder) "highlight"
2256 "Toggle tick mark\nThis button runs `mh-toggle-tick'")
2257 (mh-toggle-showing (folder) "show"
2258 "Toggle showing message\nThis button runs `mh-toggle-showing'")
2259 (mh-tool-bar-reply-from (folder) "mail/reply-from" "Reply to \"from\"")
2260 (mh-tool-bar-reply-to (folder) "mail/reply-to" "Reply to \"to\"")
2261 (mh-tool-bar-reply-all (folder) "mail/reply-all" "Reply to \"all\"")
2262 (mh-reply (folder) "mail/reply"
2263 "Reply to this message\nThis button runs `mh-reply'")
2264 (mh-alias-grab-from-field (folder) "mail/alias"
2265 "Grab From alias\nThis button runs `mh-alias-grab-from-field'"
2266 (and (mh-extract-from-header-value) (not (mh-alias-for-from-p))))
2267 (mh-send (folder) "mail/compose"
2268 "Compose new message\nThis button runs `mh-send'")
2269 (mh-rescan-folder (folder) "refresh"
2270 "Rescan this folder\nThis button runs `mh-rescan-folder'")
2271 (mh-pack-folder (folder) "mail/repack"
2272 "Repack this folder\nThis button runs `mh-pack-folder'")
2273 (mh-tool-bar-search (folder) "search"
2274 "Search\nThis button runs `mh-tool-bar-search-function'")
2275 (mh-visit-folder (folder) "fld-open"
2276 "Visit other folder\nThis button runs `mh-visit-folder'")
2277 ;; Letter buffer buttons
2278 (mh-send-letter (letter) "mail/send" "Send this letter")
2279 (mh-compose-insertion (letter) "attach" "Insert attachment")
2280 (ispell-message (letter) "spell" "Check spelling")
2281 (save-buffer (letter) "save" "Save current buffer to its file"
2282 (buffer-modified-p))
2283 (undo (letter) "undo" "Undo last operation")
2284 (kill-region (letter) "cut"
2285 "Cut (kill) text in region between mark and current position")
2286 (menu-bar-kill-ring-save (letter) "copy"
2287 "Copy text in region between mark and current position")
2288 (yank (letter) "paste" "Paste (yank) text cut or copied earlier")
2289 (mh-fully-kill-draft (letter) "close" "Kill this draft")
2291 (mh-tool-bar-customize (folder letter
) "preferences" "MH-E Preferences")
2292 (mh-tool-bar-folder-help (folder) "help"
2293 "Help! (general help)\nThis button runs `info'")
2294 (mh-tool-bar-letter-help (letter) "help"
2295 "Help! (general help)\nThis button runs `info'")
2296 ;; Folder narrowed to sequence buttons
2297 (mh-widen (sequence) "widen"
2298 "Widen from the sequence\nThis button runs `mh-widen'"))
2302 ;;; Hooks (:group 'mh-hooks + group where hook described)
2304 (defcustom mh-after-commands-processed-hook nil
2305 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding requests.
2307 Variables that are useful in this hook include
2308 `mh-folders-changed', which lists which folders were affected by
2309 deletes and refiles. This list will always include the current
2310 folder, which is also available in `mh-current-folder'."
2315 (defcustom mh-alias-reloaded-hook nil
2316 "Hook run by `mh-alias-reload' after loading aliases."
2321 (defcustom mh-before-commands-processed-hook nil
2322 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding requests.
2324 Variables that are useful in this hook include `mh-delete-list'
2325 and `mh-refile-list' which can be used to see which changes will
2326 be made to the current folder, `mh-current-folder'."
2331 (defcustom mh-before-quit-hook nil
2332 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E.
2334 This hook is called before the quit occurs, so you might use it
2335 to perform any MH-E operations; you could perform some query and
2336 abort the quit or call `mh-execute-commands', for example.
2338 See also `mh-quit-hook'."
2343 (defcustom mh-before-send-letter-hook nil
2344 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.
2346 For example, if you want to check your spelling in your message
2347 before sending, add the `ispell-message' function."
2349 :options
'(ispell-message)
2353 (defcustom mh-delete-msg-hook nil
2354 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
2356 For example, a past maintainer of MH-E used this once when he
2357 kept statistics on his mail usage."
2362 (defcustom mh-find-path-hook nil
2363 "Hook run by `mh-find-path' after reading the user's MH profile.
2365 This hook can be used the change the value of the variables that
2366 `mh-find-path' sets if you need to run with different values
2367 between MH and MH-E."
2372 (defcustom mh-folder-mode-hook nil
2373 "Hook run by `mh-folder-mode' when visiting a new folder."
2378 (defcustom mh-forward-hook nil
2379 "Hook run by `mh-forward' on a forwarded letter."
2382 :group
'mh-sending-mail
)
2384 (defcustom mh-inc-folder-hook nil
2385 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder."
2390 (defcustom mh-insert-signature-hook nil
2391 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted.
2393 Hook functions may access the actual name of the file or the
2394 function used to insert the signature with
2395 `mh-signature-file-name'."
2400 (defcustom mh-kill-folder-suppress-prompt-hooks
'(mh-index-p)
2401 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
2403 The hook functions are called with no arguments and should return
2404 a non-nil value to suppress the normal prompt when you remove a
2405 folder. This is useful for folders that are easily regenerated.
2407 The default value of `mh-index-p' suppresses the prompt on
2408 folders generated by an index search.
2410 WARNING: Use this hook with care. If there is a bug in your hook
2411 which returns t on \"+inbox\" and you hit \\[mh-kill-folder] by
2412 accident in the \"+inbox\" folder, you will not be happy."
2417 (defcustom mh-letter-mode-hook nil
2418 "Hook run by `mh-letter-mode' on a new letter.
2420 This hook allows you to do some processing before editing a
2421 letter. For example, you may wish to modify the header after
2422 \"repl\" has done its work, or you may have a complicated
2423 \"components\" file and need to tell MH-E where the cursor should
2427 :group
'mh-sending-mail
)
2429 (defcustom mh-mh-to-mime-hook nil
2430 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]."
2435 (defcustom mh-pick-mode-hook nil
2436 "Hook run upon entry to `mh-pick-mode'\\<mh-folder-mode-map>.
2438 If you find that you do the same thing over and over when editing
2439 the search template, you may wish to bind some shortcuts to keys.
2440 This can be done with this hook which is called when
2441 \\[mh-search-folder] is run on a new pattern."
2446 (defcustom mh-quit-hook nil
2447 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E.
2449 This hook is not run in an MH-E context, so you might use it to
2450 modify the window setup.
2452 See also `mh-before-quit-hook'."
2457 (defcustom mh-refile-msg-hook nil
2458 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling."
2463 (defcustom mh-show-hook nil
2464 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message.
2466 It is the last thing called after messages are displayed. It's
2467 used to affect the behavior of MH-E in general or when
2468 `mh-show-mode-hook' is too early. See `mh-show-mode-hook'."
2473 (defcustom mh-show-mode-hook nil
2474 "Hook run upon entry to `mh-show-mode'.
2476 This hook is called early on in the process of the message
2477 display. It is usually used to perform some action on the
2478 message's content. See `mh-show-hook'."
2483 (defcustom mh-unseen-updated-hook nil
2484 "Hook run after the unseen sequence has been updated.
2486 The variable `mh-seen-list' can be used by this hook to obtain
2487 the list of messages which were removed from the unseen
2491 :group
'mh-sequences
)
2495 ;;; Faces (:group 'mh-faces + group where faces described)
2497 (if (boundp 'facemenu-unlisted-faces
)
2498 (add-to-list 'facemenu-unlisted-faces
"^mh-"))
2500 (defface mh-folder-address
'((t (:inherit mh-folder-subject
)))
2505 (defface mh-folder-body
2507 (:inherit mh-folder-msg-number
))
2509 (:inherit mh-folder-msg-number
:italic t
)))
2514 (defface mh-folder-cur-msg-number
2516 (:inherit mh-folder-msg-number
:bold t
)))
2517 "Current message number face."
2521 (defface mh-folder-date
'((t (:inherit mh-folder-msg-number
)))
2526 (defface mh-folder-deleted
'((t (:inherit mh-folder-msg-number
)))
2527 "Deleted message face."
2531 (defface mh-folder-followup
2532 '((((class color
) (background light
))
2533 (:foreground
"blue3"))
2534 (((class color
) (background dark
))
2535 (:foreground
"LightGoldenRod"))
2542 (defface mh-folder-msg-number
2544 '((((class color
) (min-colors 88) (background light
))
2545 (:foreground
"snow4"))
2546 (((class color
) (min-colors 88) (background dark
))
2547 (:foreground
"snow3"))
2549 (:foreground
"cyan"))))
2551 "Message number face."
2555 (defface mh-folder-refiled
2557 '((((class color
) (min-colors 88) (background light
))
2558 (:foreground
"DarkGoldenrod"))
2559 (((class color
) (min-colors 88) (background dark
))
2560 (:foreground
"LightGoldenrod"))
2562 (:foreground
"yellow" :weight light
))
2563 (((class grayscale
) (background light
))
2564 (:foreground
"Gray90" :bold t
:italic t
))
2565 (((class grayscale
) (background dark
))
2566 (:foreground
"DimGray" :bold t
:italic t
))
2568 (:bold t
:italic t
))))
2569 "Refiled message face."
2573 (defface mh-folder-sent-to-me-hint
'((t (:inherit mh-folder-date
)))
2574 "Fontification hint face in messages sent directly to us.
2575 The detection of messages sent to us is governed by the scan
2576 format `mh-scan-format-nmh' and the regular expression
2577 `mh-scan-sent-to-me-sender-regexp'."
2581 (defface mh-folder-sent-to-me-sender
'((t (:inherit mh-folder-followup
)))
2582 "Sender face in messages sent directly to us.
2583 The detection of messages sent to us is governed by the scan
2584 format `mh-scan-format-nmh' and the regular expression
2585 `mh-scan-sent-to-me-sender-regexp'."
2589 (defface mh-folder-subject
2590 '((((class color
) (background light
))
2591 (:foreground
"blue4"))
2592 (((class color
) (background dark
))
2593 (:foreground
"yellow"))
2600 (defface mh-folder-tick
2601 '((((class color
) (background dark
))
2602 (:background
"#dddf7e"))
2603 (((class color
) (background light
))
2604 (:background
"#dddf7e"))
2607 "Ticked message face."
2611 (defface mh-folder-to
2613 '((((class color
) (min-colors 88) (background light
))
2614 (:foreground
"RosyBrown"))
2615 (((class color
) (min-colors 88) (background dark
))
2616 (:foreground
"LightSalmon"))
2618 (:foreground
"green"))
2619 (((class grayscale
) (background light
))
2620 (:foreground
"DimGray" :italic t
))
2621 (((class grayscale
) (background dark
))
2622 (:foreground
"LightGray" :italic t
))
2629 (defface mh-index-folder
2630 '((((class color
) (background light
))
2631 (:foreground
"dark green" :bold t
))
2632 (((class color
) (background dark
))
2633 (:foreground
"indian red" :bold t
))
2636 "Folder heading face in MH-Folder buffers created by searches."
2640 (defface mh-letter-header-field
2641 '((((class color
) (background light
))
2642 (:background
"gray90"))
2643 (((class color
) (background dark
))
2644 (:background
"gray10"))
2647 "Editable header field value face in draft buffers."
2653 '((((class color
) (min-colors 88) (background light
))
2654 (:foreground
"DarkGoldenrod"))
2655 (((class color
) (min-colors 88) (background dark
))
2656 (:foreground
"LightGoldenrod"))
2658 (:foreground
"yellow" :weight light
))
2659 (((class grayscale
) (background light
))
2660 (:foreground
"Gray90" :bold t
:italic t
))
2661 (((class grayscale
) (background dark
))
2662 (:foreground
"DimGray" :bold t
:italic t
))
2664 (:bold t
:italic t
))))
2665 "Face used to highlight \"cc:\" header fields."
2669 (defface mh-show-date
2671 '((((class color
) (min-colors 88) (background light
))
2672 (:foreground
"ForestGreen"))
2673 (((class color
) (min-colors 88) (background dark
))
2674 (:foreground
"PaleGreen"))
2676 (:foreground
"green"))
2677 (((class grayscale
) (background light
))
2678 (:foreground
"Gray90" :bold t
))
2679 (((class grayscale
) (background dark
))
2680 (:foreground
"DimGray" :bold t
))
2682 (:bold t
:underline t
))))
2683 "Face used to highlight \"Date:\" header fields."
2687 (defface mh-show-from
2688 '((((class color
) (background light
))
2689 (:foreground
"red3"))
2690 (((class color
) (background dark
))
2691 (:foreground
"cyan"))
2694 "Face used to highlight \"From:\" header fields."
2698 (defface mh-show-header
2700 '((((class color
) (min-colors 88) (background light
))
2701 (:foreground
"RosyBrown"))
2702 (((class color
) (min-colors 88) (background dark
))
2703 (:foreground
"LightSalmon"))
2705 (:foreground
"green"))
2706 (((class grayscale
) (background light
))
2707 (:foreground
"DimGray" :italic t
))
2708 (((class grayscale
) (background dark
))
2709 (:foreground
"LightGray" :italic t
))
2712 "Face used to deemphasize less interesting header fields."
2716 (defface mh-show-pgg-bad
'((t (:bold t
:foreground
"DeepPink1")))
2717 "Bad PGG signature face."
2721 (defface mh-show-pgg-good
'((t (:bold t
:foreground
"LimeGreen")))
2722 "Good PGG signature face."
2726 (defface mh-show-pgg-unknown
'((t (:bold t
:foreground
"DarkGoldenrod2")))
2727 "Unknown or untrusted PGG signature face."
2731 (defface mh-show-signature
'((t (:italic t
)))
2736 (defface mh-show-subject
'((t (:inherit mh-folder-subject
)))
2737 "Face used to highlight \"Subject:\" header fields."
2742 '((((class color
) (background light
))
2743 (:foreground
"SaddleBrown"))
2744 (((class color
) (background dark
))
2745 (:foreground
"burlywood"))
2746 (((class grayscale
) (background light
))
2747 (:foreground
"DimGray" :underline t
))
2748 (((class grayscale
) (background dark
))
2749 (:foreground
"LightGray" :underline t
))
2751 "Face used to highlight \"To:\" header fields."
2755 (defface mh-show-xface
'((t (:inherit
(mh-show-from highlight
))))
2757 The background and foreground are used in the image."
2761 (defface mh-speedbar-folder
2762 '((((class color
) (background light
))
2763 (:foreground
"blue4"))
2764 (((class color
) (background dark
))
2765 (:foreground
"light blue")))
2766 "Basic folder face."
2768 :group
'mh-speedbar
)
2770 (defface mh-speedbar-folder-with-unseen-messages
2772 (:inherit mh-speedbar-folder
:bold t
)))
2773 "Folder face when folder contains unread messages."
2775 :group
'mh-speedbar
)
2777 (defface mh-speedbar-selected-folder
2778 '((((class color
) (background light
))
2779 (:foreground
"red1" :underline t
))
2780 (((class color
) (background dark
))
2781 (:foreground
"red1" :underline t
))
2784 "Selected folder face."
2786 :group
'mh-speedbar
)
2788 (defface mh-speedbar-selected-folder-with-unseen-messages
2790 (:inherit mh-speedbar-selected-folder
:bold t
)))
2791 "Selected folder face when folder contains unread messages."
2793 :group
'mh-speedbar
)
2795 ;;; XXX Temporary function for comparing old and new faces. Delete
2796 ;;; when everybody is happy.
2797 (defvar bw-face-generation
'new
)
2799 (defun bw-toggle-faces ()
2800 "Toggle between old and new faces."
2802 (cond ((eq bw-face-generation
'new
)
2803 (message "Going from new to old...")
2804 (bw-new-face-to-old)
2805 (message "Going from new to old...done")
2806 (setq bw-face-generation
'old
))
2807 ((eq bw-face-generation
'old
)
2808 (message "Going from old to new...")
2809 (bw-old-face-to-new)
2810 (message "Going from old to new...done")
2811 (setq bw-face-generation
'new
))))
2813 (defun bw-new-face-to-old ()
2815 (face-spec-set 'mh-folder-body
2817 '((((class color
) (min-colors 88) (background light
))
2818 (:foreground
"RosyBrown"))
2819 (((class color
) (min-colors 88) (background dark
))
2820 (:foreground
"LightSalmon"))
2822 (:foreground
"green"))
2823 (((class grayscale
) (background light
))
2824 (:foreground
"DimGray" :italic t
))
2825 (((class grayscale
) (background dark
))
2826 (:foreground
"LightGray" :italic t
))
2830 (face-spec-set 'mh-folder-msg-number
2831 '((((class color
) (background light
))
2832 (:foreground
"snow4"))
2833 (((class color
) (background dark
))
2834 (:foreground
"snow3"))
2838 (face-spec-set 'mh-folder-cur-msg-number
2840 '((((class color
) (min-colors 88) (background light
))
2841 (:foreground
"Purple"))
2842 (((class color
) (min-colors 88) (background dark
))
2843 (:foreground
"Cyan"))
2845 (:foreground
"cyan" :weight bold
))
2846 (((class grayscale
) (background light
))
2847 (:foreground
"LightGray" :bold t
))
2848 (((class grayscale
) (background dark
))
2849 (:foreground
"DimGray" :bold t
))
2853 (face-spec-set 'mh-folder-date
2854 '((((class color
) (background light
))
2855 (:foreground
"snow4"))
2856 (((class color
) (background dark
))
2857 (:foreground
"snow3"))
2861 (face-spec-set 'mh-folder-msg-number
2862 '((((class color
) (background light
))
2863 (:foreground
"snow4"))
2864 (((class color
) (background dark
))
2865 (:foreground
"snow3"))
2869 (defun bw-old-face-to-new ()
2871 (face-spec-set 'mh-folder-body
2873 (:inherit mh-folder-msg-number
))
2875 (:inherit mh-folder-msg-number
:italic t
))))
2877 (face-spec-set 'mh-folder-cur-msg-number
2879 (:inherit mh-folder-msg-number
:bold t
))))
2881 (face-spec-set 'mh-folder-date
'((t (:inherit mh-folder-msg-number
))))
2883 (face-spec-set 'mh-folder-msg-number
2884 '((((class color
) (background light
))
2885 (:foreground
"snow4"))
2886 (((class color
) (background dark
))
2887 (:foreground
"snow3"))
2889 (:foreground
"cyan")))))
2892 ;; indent-tabs-mode: nil
2893 ;; sentence-end-double-space: nil
2896 ;; arch-tag: 778d2a20-82e2-4276-be9d-309386776a68
2897 ;;; mh-customize.el ends here