(latexenc-find-file-coding-system): Don't inherit the EOL part of the
[emacs.git] / lisp / mh-e / mh-customize.el
blob541411643910d4c83228bcae0ddde307df60b0f1
1 ;;; mh-customize.el --- MH-E customization
3 ;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 ;; Author: Bill Wohler <wohler@newt.com>
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
7 ;; Keywords: mail
8 ;; See: mh-e.el
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)
15 ;; any later version.
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., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
27 ;;; Commentary:
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
46 ;; alphabetically.
48 ;; 3. Hooks
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.
55 ;; 4. Faces
57 ;; Create a new face group if necessary; in this case, add the group
58 ;; associated with the manual node in which the faces are described to the
59 ;; faces' group definition. Since the face groups appear last, the face
60 ;; groups will appear at the end of these other groups.
62 ;;; Change Log:
64 ;;; Code:
66 (provide 'mh-customize)
68 (eval-when-compile (require 'mh-acros))
69 (mh-require-cl)
70 (require 'mh-loaddefs)
72 (eval-and-compile
73 (defvar mh-xemacs-flag (featurep 'xemacs)
74 "Non-nil means the current Emacs is XEmacs."))
76 (when mh-xemacs-flag
77 (require 'mh-xemacs))
79 ;; XXX: Functions autoloaded from the following files are used to initialize
80 ;; customizable variables. They are require'd here, since otherwise the
81 ;; corresponding .elc would be loaded at compile time.
82 (eval-when-compile
83 (require 'mh-init)
84 (require 'mh-identity))
86 (defun mh-customize (&optional delete-other-windows-flag)
87 "Customize MH-E variables.
88 If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other windows in
89 the frame are removed."
90 (interactive "P")
91 (customize-group 'mh)
92 (when delete-other-windows-flag
93 (delete-other-windows)))
97 ;;; For compiler warnings...
98 (defvar mh-show-buffer)
99 (defvar mh-show-folder-buffer)
101 ;;; MH-E Customization Groups
103 (defgroup mh-e nil
104 "Emacs interface to the MH mail system.
105 MH is the Rand Mail Handler. Other implementations include nmh and GNU
106 mailutils."
107 :link '(custom-manual "(mh-e)Top")
108 :group 'mail)
110 (defgroup mh-alias nil
111 "Aliases."
112 :link '(custom-manual "(mh-e)Aliases")
113 :prefix "mh-alias-"
114 :group 'mh-e)
116 (defgroup mh-folder nil
117 "Organizing your mail with folders."
118 :prefix "mh-"
119 :link '(custom-manual "(mh-e)Organizing")
120 :group 'mh-e)
122 (defgroup mh-folder-selection nil
123 "Folder selection."
124 :prefix "mh-"
125 :link '(custom-manual "(mh-e)Folder Selection")
126 :group 'mh-e)
128 (defgroup mh-identity nil
129 "Identities."
130 :link '(custom-manual "(mh-e)Identities")
131 :prefix "mh-identity-"
132 :group 'mh-e)
134 (defgroup mh-inc nil
135 "Incorporating your mail."
136 :prefix "mh-inc-"
137 :link '(custom-manual "(mh-e)Incorporating Mail")
138 :group 'mh-e)
140 (defgroup mh-index nil
141 "Searching."
142 :link '(custom-manual "(mh-e)Searching")
143 :prefix "mh-index-"
144 :group 'mh-e)
146 (defgroup mh-junk nil
147 "Dealing with junk mail."
148 :link '(custom-manual "(mh-e)Junk")
149 :prefix "mh-junk-"
150 :group 'mh-e)
152 (defgroup mh-letter nil
153 "Editing a draft."
154 :prefix "mh-"
155 :link '(custom-manual "(mh-e)Editing Drafts")
156 :group 'mh-e)
158 (defgroup mh-ranges nil
159 "Ranges."
160 :prefix "mh-"
161 :link '(custom-manual "(mh-e)Ranges")
162 :group 'mh-e)
164 (defgroup mh-scan-line-formats nil
165 "Scan line formats."
166 :link '(custom-manual "(mh-e)Scan Line Formats")
167 :prefix "mh-"
168 :group 'mh-e)
170 (defgroup mh-sending-mail nil
171 "Sending mail."
172 :prefix "mh-"
173 :link '(custom-manual "(mh-e)Sending Mail")
174 :group 'mh-e)
176 (defgroup mh-sequences nil
177 "Sequences."
178 :prefix "mh-"
179 :link '(custom-manual "(mh-e)Sequences")
180 :group 'mh-e)
182 (defgroup mh-show nil
183 "Reading your mail."
184 :prefix "mh-"
185 :link '(custom-manual "(mh-e)Reading Mail")
186 :group 'mh-e)
188 (defgroup mh-speed nil
189 "The speedbar."
190 :prefix "mh-speed-"
191 :link '(custom-manual "(mh-e)Speedbar")
192 :group 'mh-e)
194 (defgroup mh-toolbar nil
195 "The toolbar"
196 :link '(custom-manual "(mh-e)Toolbar")
197 :prefix "mh-"
198 :group 'mh-e)
200 (defgroup mh-faces nil
201 "Faces used in MH-E."
202 :link '(custom-manual "(mh-e)Top")
203 :prefix "mh-"
204 :group 'faces
205 :group 'mh-e)
207 (defgroup mh-hooks nil
208 "MH-E hooks."
209 :link '(custom-manual "(mh-e)Top")
210 :prefix "mh-"
211 :group 'mh-e)
213 ;;; Faces
215 (defgroup mh-folder-faces nil
216 "Faces used in scan listing."
217 :link '(custom-manual "(mh-e)Organizing")
218 :prefix "mh-"
219 :group 'mh-faces
220 :group 'mh-show)
222 (defgroup mh-index-faces nil
223 "Faces used in searching."
224 :link '(custom-manual "(mh-e)Searching")
225 :prefix "mh-"
226 :group 'mh-faces
227 :group 'mh-index)
229 (defgroup mh-letter-faces nil
230 "Faces used in message drafts."
231 :link '(custom-manual "(mh-e)Sending Mail")
232 :prefix "mh-"
233 :group 'mh-faces
234 :group 'mh-letter)
236 (defgroup mh-show-faces nil
237 "Faces used in message display."
238 :link '(custom-manual "(mh-e)Reading Mail")
239 :prefix "mh-"
240 :group 'mh-faces
241 :group 'mh-show)
243 (defgroup mh-speed-faces nil
244 "Faces used in speedbar."
245 :link '(custom-manual "(mh-e)Speedbar")
246 :prefix "mh-"
247 :group 'mh-faces
248 :group 'mh-speed)
252 ;;; Emacs interface to the MH mail system (:group mh)
253 (eval-when (compile)
254 (setq mh-variant 'none))
256 (defcustom mh-variant 'autodetect
257 "*Specifies the variant used by MH-E.
259 The default setting of this option is `Auto-detect' which means that MH-E will
260 automatically choose the first of nmh, MH, or GNU mailutils that it finds in
261 the directories listed in `mh-path', `mh-sys-path', and `exec-path'. If, for
262 example, you have both nmh and mailutils installed and `mh-variant-in-use' was
263 initialized to nmh but you want to use mailutils, then you can set this option
264 to `mailutils'.
266 When this variable is changed, MH-E resets `mh-progs', `mh-lib',
267 `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
268 accordingly."
269 :type `(radio
270 (const :tag "Auto-detect" autodetect)
271 ,@(mapcar (lambda (x) `(const ,(car x))) (mh-variants)))
272 :set (lambda (symbol value)
273 (set-default symbol value) ;Done in mh-variant-set-variant!
274 (mh-variant-set value))
275 :group 'mh-e)
279 ;;; Aliases (:group 'mh-alias)
281 (defcustom mh-alias-completion-ignore-case-flag t
282 "*Non-nil means don't consider case significant in MH alias completion.
283 As MH ignores case in the aliases, so too does MH-E. However, you may turn
284 this option off to make case significant which can be used to segregate
285 completion of your aliases. You might use lowercase for mailing lists and
286 uppercase for people."
287 :type 'boolean
288 :group 'mh-alias)
290 (defcustom mh-alias-expand-aliases-flag nil
291 "*Non-nil means to expand aliases entered in the minibuffer.
292 In other words, aliases entered in the minibuffer will be expanded to the full
293 address in the message draft. By default, this expansion is not performed."
294 :type 'boolean
295 :group 'mh-alias)
297 (defcustom mh-alias-flash-on-comma t
298 "*Specify whether to flash address or warn on translation.
299 This option controls the behavior when a [comma] is pressed while entering
300 aliases or addresses. The default setting flashes the address associated with
301 an address in the minibuffer briefly, but does not display a warning if the
302 alias is not found."
303 :type '(choice (const :tag "Flash but Don't Warn If No Alias" t)
304 (const :tag "Flash and Warn If No Alias" 1)
305 (const :tag "Don't Flash Nor Warn If No Alias" nil))
306 :group 'mh-alias)
308 (defcustom mh-alias-insert-file nil
309 "*Filename used to store a new MH-E alias.
310 The default setting of this option is `Use Aliasfile Profile Component'. This
311 option can also hold the name of a file or a list a file names. If this option
312 is set to a list of file names, or the `Aliasfile:' profile component contains
313 more than one file name, MH-E will prompt for one of them when MH-E adds an
314 alias."
315 :type '(choice (const :tag "Use Aliasfile Profile Component" nil)
316 (file :tag "Alias File")
317 (repeat :tag "List of Alias Files" file))
318 :group 'mh-alias)
320 (defcustom mh-alias-insertion-location 'sorted
321 "Specifies where new aliases are entered in alias files.
322 This option is set to `Alphabetical' by default. If you organize your alias
323 file in other ways, then adding aliases to the `Top' or `Bottom' of your alias
324 file might be more appropriate."
325 :type '(choice (const :tag "Alphabetical" sorted)
326 (const :tag "Top" top)
327 (const :tag "Bottom" bottom))
328 :group 'mh-alias)
330 (defcustom mh-alias-local-users t
331 "*If on, local users are added to alias completion.
333 Aliases are created from `/etc/passwd' entries with a user ID larger than
334 a magical number, typically 200. This can be a handy tool on a machine where
335 you and co-workers exchange messages. These aliases have the form
336 `local.first.last' if a real name is present in the password file.
337 Otherwise, the alias will have the form `local.login'.
339 If you're on a system with thousands of users you don't know, and the loading
340 of local aliases slows MH-E down noticeably, then turn this option off.
342 This option also takes a string which is executed to generate the password
343 file. For example, use \"ypcat passwd\" to obtain the NIS password file."
344 :type '(choice (boolean) (string))
345 :group 'mh-alias)
347 (defcustom mh-alias-local-users-prefix "local."
348 "*String prepended to the real names of users from the password file.
349 This option can also be set to `Use Login'.
351 For example, consider the following password file entry:
353 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
355 The following settings of this option will produce the associated aliases:
357 \"local.\" local.peter.galbraith
358 \"\" peter.galbraith
359 Use Login psg
361 This option has no effect if variable `mh-alias-local-users' is turned off."
362 :type '(choice (const :tag "Use Login" nil)
363 (string))
364 :group 'mh-alias)
366 (defcustom mh-alias-passwd-gecos-comma-separator-flag t
367 "*Non-nil means the gecos field in the password file uses a comma separator.
368 In the example in `mh-alias-local-users-prefix', commas are used to separate
369 different values within the so-called gecos field. This is a fairly common
370 usage. However, in the rare case that the gecos field in your password file is
371 not separated by commas and whose contents may contain commas, you can turn
372 this option off."
373 :type 'boolean
374 :group 'mh-alias)
378 ;;; Organizing Your Mail with Folders (:group 'mh-folder)
380 (defcustom mh-recenter-summary-flag nil
381 "*Non-nil means to recenter the summary window.
382 If this option is turned on, recenter the summary window when the show window
383 is toggled off."
384 :type 'boolean
385 :group 'mh-folder)
389 ;;; Folder Selection (:group 'mh-folder-selection)
391 (defcustom mh-default-folder-for-message-function nil
392 "Function to select a default folder for refiling or `Fcc'.
393 The current buffer is set to the message being refiled with point at the start
394 of the message. This function should return the default folder as a string
395 with a leading `+' sign. It can also return nil so that the last folder name
396 is used as the default, or an empty string to suppress the default entirely."
397 :type 'function
398 :group 'mh-folder-selection)
400 (defcustom mh-default-folder-list nil
401 "*List of addresses and folders.
402 The folder name associated with the first address found in this list is used
403 as the default for `mh-refile-msg' and similar functions. Each element in this
404 list contains a `Check Recipient' item. If this item is turned on, then the
405 address is checked against the recipient instead of the sender. This is useful
406 for mailing lists.
408 See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more
409 information."
410 :type '(repeat (list (regexp :tag "Address")
411 (string :tag "Folder")
412 (boolean :tag "Check Recipient")))
413 :group 'mh-folder-selection)
415 (defcustom mh-default-folder-must-exist-flag t
416 "*Non-nil means guessed folder name must exist to be used.
417 If the derived folder does not exist, and this option is on, then the last
418 folder name used is suggested. This is useful if you get mail from various
419 people for whom you have an alias, but file them all in the same project
420 folder.
422 See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more
423 information."
424 :type 'boolean
425 :group 'mh-folder-selection)
427 (defcustom mh-default-folder-prefix ""
428 "*Prefix used for folder names generated from aliases.
429 The prefix is used to prevent clutter in your mail directory.
431 See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more
432 information."
433 :type 'string
434 :group 'mh-folder-selection)
438 ;;; Identities (:group 'mh-identity)
440 (defcustom mh-identity-list nil
441 "*List of identities.
443 To customize this option, click on the `INS' button and enter a label such as
444 `Home' or `Work'. Then click on the `INS' button with the label `Add at least
445 one item below'. Then choose one of the items in the `Value Menu'.
447 You can specify an alternate `From:' header field using the `From Field' menu
448 item. You must include a valid email address. A standard format is `First Last
449 <login@@host.domain>'. If you use an initial with a period, then you must
450 quote your name as in `\"First I. Last\" <login@@host.domain>'. People usually
451 list the name of the company where they work using the `Organization Field'
452 menu item. Set any arbitrary header field and value in the `Other Field' menu
453 item. Unless the header field is a standard one, precede the name of your
454 field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of
455 `Attribution Verb' overrides the setting of
456 `mh-extract-from-attribution-verb'. Set your signature with the `Signature'
457 menu item. You can specify the contents of `mh-signature-file-name', a file,
458 or a function. Specify a different key to sign or encrypt messages with the
459 `GPG Key ID' menu item.
461 You can select the identities you have added via the menu called `Identity' in
462 the MH-Letter buffer. You can also use \\[mh-insert-identity]. To clear the
463 fields and signature added by the identity, select the `None' identity.
465 The `Identity' menu contains two other items to save you from having to set
466 the identity on every message. The menu item `Set Default for Session' can be
467 used to set the default identity to the current identity until you exit Emacs.
468 The menu item `Save as Default' sets the option `mh-identity-default' to the
469 current identity setting. You can also customize the `mh-identity-default'
470 option in the usual fashion."
471 :type '(repeat (list :tag ""
472 (string :tag "Label")
473 (repeat :tag "Add at least one item below"
474 (choice
475 (cons :tag "From Field"
476 (const "From")
477 (string :tag "Value"))
478 (cons :tag "Organization Field"
479 (const "Organization")
480 (string :tag "Value"))
481 (cons :tag "Other Field"
482 (string :tag "Field")
483 (string :tag "Value"))
484 (cons :tag "Attribution Verb"
485 (const ":attribution-verb")
486 (string :tag "Value"))
487 (cons :tag "Signature"
488 (const :tag "Signature"
489 ":signature")
490 (choice
491 (const :tag "mh-signature-file-name"
492 nil)
493 (file)
494 (function)))
495 (cons :tag "GPG Key ID"
496 (const :tag "GPG Key ID"
497 ":pgg-default-user-id")
498 (string :tag "Value"))))))
499 :set 'mh-identity-list-set
500 :group 'mh-identity)
502 (defcustom mh-auto-fields-list nil
503 "List of recipients for which header lines are automatically inserted.
505 This option can be used to set the identity depending on the recipient. To
506 customize this option, click on the `INS' button and enter a regular
507 expression for the recipient's address. Click on the `INS' button with the
508 `Add at least one item below' label. Then choose one of the items in the
509 `Value Menu'.
511 The `Identity' menu item is used to select an identity from those configured
512 in `mh-identity-list'. All of the information for that identity will be added
513 if the recipient matches. The `Fcc Field' menu item is used to select a folder
514 that is used in the `Fcc:' header. When you send the message, MH will put a
515 copy of your message in this folder. The `Mail-Followup-To Field' menu item is
516 used to insert an `Mail-Followup-To:' header field with the recipients you
517 provide. If the recipient's mail user agent supports this header field (as nmh
518 does), then their replies will go to the addresses listed. This is useful if
519 their replies go both to the list and to you and you don't have a mechanism to
520 suppress duplicates. If you reply to someone not on the list, you must either
521 remove the `Mail-Followup-To:' field, or ensure the recipient is also listed
522 there so that he receives replies to your reply. Other header fields may be
523 added using the `Other Field' menu item.
525 These fields can only be added after the recipient is known. Once the header
526 contains one or more recipients, run the \\[mh-insert-auto-fields] command or
527 choose the `Identity -> Insert Auto Fields' menu item to insert these fields
528 manually. However, you can just send the message and the fields will be added
529 automatically. You are given a chance to see these fields and to confirm them
530 before the message is actually sent. You can do away with this confirmation by
531 turning off the option `mh-auto-fields-prompt-flag'.
533 You should avoid using the same header field in `mh-auto-fields-list' and
534 `mh-identity-list' definitions that may apply to the same message as the
535 result is undefined."
536 :type `(repeat
537 (list :tag ""
538 (string :tag "Recipient")
539 (repeat :tag "Add at least one item below"
540 (choice
541 (cons :tag "Identity"
542 (const ":identity")
543 ,(append
544 '(radio)
545 (mapcar
546 (function (lambda (arg) `(const ,arg)))
547 (mapcar 'car mh-identity-list))))
548 (cons :tag "Fcc Field"
549 (const "fcc")
550 (string :tag "Value"))
551 (cons :tag "Mail-Followup-To Field"
552 (const "Mail-Followup-To")
553 (string :tag "Value"))
554 (cons :tag "Other Field"
555 (string :tag "Field")
556 (string :tag "Value"))))))
557 :group 'mh-identity)
559 (defcustom mh-auto-fields-prompt-flag t
560 "*Non-nil means to prompt before sending if fields inserted.
561 See `mh-auto-fields-list'."
562 :type 'boolean
563 :group 'mh-identity)
565 (defcustom mh-identity-default nil
566 "Default identity to use when `mh-letter-mode' is called.
567 See `mh-identity-list'."
568 :type (append
569 '(radio)
570 (cons '(const :tag "None" nil)
571 (mapcar (function (lambda (arg) `(const ,arg)))
572 (mapcar 'car mh-identity-list))))
573 :group 'mh-identity)
575 (defcustom mh-identity-handlers
576 '(("From" . mh-identity-handler-top)
577 (":default" . mh-identity-handler-bottom)
578 (":attribution-verb" . mh-identity-handler-attribution-verb)
579 (":signature" . mh-identity-handler-signature)
580 (":pgg-default-user-id" . mh-identity-handler-gpg-identity))
581 "Handler functions for fields in `mh-identity-list'.
583 This option is used to change the way that fields, signatures, and
584 attributions in `mh-identity-list' are added. To customize
585 `mh-identity-handlers', replace the name of an existing handler function
586 associated with the field you want to change with the name of a function you
587 have written. You can also click on an `INS' button and insert a field of your
588 choice and the name of the function you have written to handle it.
590 The `Field' field can be any field that you've used in your
591 `mh-identity-list'. The special fields `:attribution-verb', `:signature', or
592 `:pgg-default-user-id' are used for the `mh-identity-list' choices
593 `Attribution Verb', `Signature', and `GPG Key ID' respectively.
595 The handler associated with the `:default' field is used when no other field
596 matches.
598 The handler functions are passed two or three arguments: the FIELD itself (for
599 example, `From'), or one of the special fields (for example, `:signature'),
600 and the ACTION `'remove' or `'add'. If the action is `'add', an additional
601 argument containing the VALUE for the field is given."
602 :type '(repeat (cons (string :tag "Field") function))
603 :group 'mh-identity)
607 ;;; Incorporating Your Mail (:group 'mh-inc)
609 (defcustom mh-inc-prog "inc"
610 "*Program to incorporate new mail into a folder.
612 This program generates a one-line summary for each of the new messages. Unless
613 it is an absolute pathname, the file is assumed to be in the `mh-progs'
614 directory. You may also link a file to `inc' that uses a different format.
615 You'll then need to modify several scan line format variables appropriately."
616 :type 'string
617 :group 'mh-inc)
619 (defcustom mh-inc-spool-list nil
620 "*Alternate spool files.
622 You can use the `mh-inc-spool-list' variable to direct MH-E to retrieve mail
623 from arbitrary spool files other than your system mailbox, file it in folders
624 other than your `+inbox', and assign key bindings to incorporate this mail.
626 Suppose you are subscribed to the `mh-e-devel' mailing list and you use
627 `procmail' to filter this mail into `~/mail/mh-e' with the following recipe in
628 `.procmailrc':
630 MAILDIR=$HOME/mail
632 * ^From mh-e-devel-admin@stop.mail-abuse.org
633 mh-e
635 In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m'
636 \(`mh-inc-spool-mh-e'\) command, customize this option, and click on the `INS'
637 button. Enter a `Spool File' of `~/mail/mh-e', a `Folder' of `mh-e', and a
638 `Key Binding' of `m'.
640 You can use `xbuffy' to automate the incorporation of this mail using the
641 `gnudoit' command in the `gnuserv' package as follows:
643 box ~/mail/mh-e
644 title mh-e
645 origMode
646 polltime 10
647 headertime 0
648 command gnudoit -q '(mh-inc-spool-mh-e)'"
649 :type '(repeat (list (file :tag "Spool File")
650 (string :tag "Folder")
651 (character :tag "Key Binding")))
652 :set 'mh-inc-spool-list-set
653 :group 'mh-inc)
657 ;;; Searching (:group 'mh-index)
659 (defcustom mh-index-new-messages-folders t
660 "Folders searched for the \"unseen\" sequence.
661 Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to
662 search all of the top level folders. Otherwise, list the folders that should
663 be searched with the \"Choose Folders\" menu item.
665 See also `mh-recursive-folders-flag'."
666 :group 'mh-index
667 :type '(choice (const :tag "Inbox" t)
668 (const :tag "All" nil)
669 (repeat :tag "Choose Folders" (string :tag "Folder"))))
671 (defcustom mh-index-program nil
672 "Indexing program that MH-E shall use.
673 The default setting of this option is `Auto-detect' which means that MH-E will
674 automatically choose one of swish++, swish-e, mairix, namazu, pick and grep in
675 that order. If, for example, you have both swish++ and mairix installed and
676 you want to use mairix, then you can set this option to `mairix'.
678 More information about setting up an indexing program to use with MH-E can be
679 found in the documentation of `mh-index-search'."
680 :type '(choice (const :tag "Auto-detect" nil)
681 (const :tag "swish++" swish++)
682 (const :tag "swish-e" swish)
683 (const :tag "mairix" mairix)
684 (const :tag "namazu" namazu)
685 (const :tag "pick" pick)
686 (const :tag "grep" grep))
687 :group 'mh-index)
689 (defcustom mh-index-ticked-messages-folders t
690 "Folders searched for `mh-tick-seq'.
691 Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to
692 search all of the top level folders. Otherwise, list the folders that should
693 be searched with the \"Choose Folders\" menu item.
695 See also `mh-recursive-folders-flag'."
696 :group 'mh-index
697 :type '(choice (const :tag "Inbox" t)
698 (const :tag "All" nil)
699 (repeat :tag "Choose Folders" (string :tag "Folder"))))
703 ;;; Dealing with Junk Mail (:group 'mh-junk)
705 ;; Spam fighting program chosen
706 (defvar mh-junk-choice nil)
708 ;; Available spam filter interfaces
709 (defvar mh-junk-function-alist
710 '((spamassassin mh-spamassassin-blacklist mh-spamassassin-whitelist)
711 (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist)
712 (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist))
713 "Available choices of spam programs to use.
714 This is an alist. For each element there are functions that blacklist a message
715 as spam and whitelist a message incorrectly classified as spam.")
717 (defun mh-junk-choose (symbol value)
718 "Choose spam program to use.
719 The function is always called with SYMBOL bound to `mh-junk-program' and VALUE
720 bound to the new value of `mh-junk-program'. The function sets the variable
721 `mh-junk-choice' in addition to `mh-junk-program'."
722 (set symbol value)
723 (setq mh-junk-choice
724 (or value
725 (loop for element in mh-junk-function-alist
726 until (executable-find (symbol-name (car element)))
727 finally return (car element)))))
729 ;; User customizable variables
730 (defcustom mh-junk-background nil
731 "If on, spam programs are run in background.
732 By default, the programs are run in the foreground, but this can be slow when
733 junking large numbers of messages. If you have enough memory or don't junk
734 that many messages at the same time, you might try turning on this option."
735 :type '(choice (const :tag "Off" nil)
736 (const :tag "On" 0))
737 :group 'mh-junk)
739 (defcustom mh-junk-disposition nil
740 "Disposition of junk mail."
741 :type '(choice (const :tag "Delete Spam" nil)
742 (string :tag "Spam Folder"))
743 :group 'mh-junk)
745 (defcustom mh-junk-program nil
746 "Spam program that MH-E should use.
748 The default setting of this option is \"Auto-detect\" which means that MH-E
749 will automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in
750 that order. If, for example, you have both SpamAssassin and Bogofilter
751 installed and you want to use BogoFilter, then you can set this option to
752 \"Bogofilter\"."
753 :type '(choice (const :tag "Auto-detect" nil)
754 (const :tag "SpamAssassin" spamassassin)
755 (const :tag "Bogofilter" bogofilter)
756 (const :tag "SpamProbe" spamprobe))
757 :set 'mh-junk-choose
758 :group 'mh-junk)
762 ;;; Editing a Draft (:group 'mh-letter)
764 (defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn)
765 "Type of MIME message directives in messages.
767 By default, this option is set to `Gnus' if it is supported. This option can
768 also be set manually to `mhn' if mhn directives are preferred."
769 :type '(choice (const :tag "Gnus" gnus)
770 (const :tag "mhn" mhn))
771 :group 'mh-letter)
773 (defcustom mh-compose-skipped-header-fields
774 '("From" "Organization" "References" "In-Reply-To"
775 "X-Face" "Face" "X-Image-URL" "X-Mailer")
776 "List of header fields to skip over when navigating in draft."
777 :type '(repeat (string :tag "Field"))
778 :group 'mh-letter)
780 (defcustom mh-compose-space-does-completion-flag nil
781 "*Non-nil means that <SPC> does completion in message header."
782 :type 'boolean
783 :group 'mh-letter)
785 (defcustom mh-delete-yanked-msg-window-flag nil
786 "*Non-nil means delete any window displaying the message.
787 If this option is on, yanking the current message into a draft letter with
788 \\<mh-letter-mode-map>\\[mh-yank-cur-msg] deletes any windows displaying the
789 message."
790 :type 'boolean
791 :group 'mh-letter)
793 (defcustom mh-extract-from-attribution-verb "wrote:"
794 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]."
795 :type '(choice (const "wrote:")
796 (const "a écrit:")
797 (const "schrieb:")
798 (string :tag "Custom String"))
799 :group 'mh-letter)
801 (defcustom mh-ins-buf-prefix "> "
802 "*String to put before each non-blank line of a yanked or inserted message.
803 Used when the message is inserted into an outgoing letter
804 by \\<mh-letter-mode-map>\\[mh-insert-letter] or \\[mh-yank-cur-msg]."
805 :type 'string
806 :group 'mh-letter)
808 (defcustom mh-letter-complete-function 'ispell-complete-word
809 "*Function to call when completing outside of address or folder fields.
810 By default, this is set to `ispell-complete-word'."
811 :type '(choice function (const nil))
812 :group 'mh-letter)
814 (defcustom mh-letter-fill-column 72
815 "*Fill column to use in `mh-letter-mode'.
816 This is usually less than in other text modes because email messages get
817 quoted by some prefix (sometimes many times) when they are replied to,
818 and it's best to avoid quoted lines that span more than 80 columns."
819 :type 'integer
820 :group 'mh-letter)
822 (defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none")
823 "Default method to use in security directives."
824 :type '(choice (const :tag "PGP (MIME)" "pgpmime")
825 (const :tag "PGP" "pgp")
826 (const :tag "S/MIME" "smime")
827 (const :tag "None" "none"))
828 :group 'mh-letter)
830 (defcustom mh-signature-file-name "~/.signature"
831 "*Source of user's signature.
833 By default, the text of your signature is taken from the file `~/.signature'.
834 You can read from other files by changing this option. This file may contain a
835 vCard in which case an attachment is added with the vCard.
837 This option may also be a symbol, in which case that function is called. You
838 may not want a signature separator to be added for you; instead you may want
839 to insert one yourself. Variables that you may find useful to do this include
840 `mh-signature-separator' (when inserting a signature separator) and
841 `mh-signature-separator-regexp' (for finding said separator). The function
842 `mh-signature-separator-p', which reports t if the buffer contains a
843 separator, may be useful as well.
845 The signature is inserted into your message with the command
846 \\<mh-letter-mode-map>\\[mh-insert-signature] or with the `mh-identity-list'
847 option."
848 :type 'file
849 :group 'mh-letter)
851 (defcustom mh-signature-separator-flag t
852 "*Non-nil means a signature separator should be inserted.
853 It is not recommended that you change this option since various mail user
854 agents, including MH-E, use the separator to present the signature
855 differently, and to suppress the signature when replying or yanking a letter
856 into a draft."
857 :type 'boolean
858 :group 'mh-letter)
860 (defcustom mh-x-face-file "~/.face"
861 "*File containing face header field to insert in outgoing mail.
863 If the file starts with either of the strings `X-Face:', `Face:' or
864 `X-Image-URL:' then the contents are added to the message header verbatim.
865 Otherwise it is assumed that the file contains the value of the `X-Face:'
866 header field.
868 The `X-Face:' header field, which is a low-resolution, black and white image,
869 can be generated using the `compface' command, which can be obtained from
870 ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z. The \"Online
871 X-Face Convertor\" at http://www.dairiki.org/xface/ is a useful resource for
872 quick conversion of images into `X-Face:' header fields.
874 Use the `make-face' script (http://quimby.gnus.org/circus/face/make-face) to
875 convert a JPEG image to the higher resolution, color, `Face:' header field.
877 The URL of any image can be used for the `X-Image-URL:' field and no
878 processing of the image is required.
880 To prevent the setting of any of these header fields, either set
881 `mh-x-face-file' to nil, or simply ensure that the file defined by this option
882 doesn't exist."
883 :type 'file
884 :group 'mh-letter)
886 (defcustom mh-yank-from-start-of-msg 'attribution
887 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
888 If t, include the entire message, with full headers. This is historically
889 here for use with supercite, but is now deprecated in favor of the setting
890 `supercite' below.
892 If the symbol `body', then yank the message minus the header.
894 If the symbol `supercite', include the entire message, with full headers.
895 This also causes the invocation of `sc-cite-original' without the setting
896 of `mail-citation-hook', now deprecated practice.
898 If the symbol `autosupercite', do as for `supercite' automatically when
899 show buffer matches the message being replied-to. When this option is used,
900 the -noformat switch is passed to the repl program to override a -filter or
901 -format switch.
903 If the symbol `attribution', then yank the message minus the header and add
904 a simple attribution line at the top.
906 If the symbol `autoattrib', do as for `attribution' automatically when show
907 buffer matches the message being replied-to. You can make sure this is
908 always the case by setting `mh-reply-show-message-flag' to t (which is the
909 default) and optionally `mh-delete-yanked-msg-window-flag' to t as well such
910 that the show window is never displayed. When the `autoattrib' option is
911 used, the -noformat switch is passed to the repl program to override a
912 -filter or -format switch.
914 If nil, yank only the portion of the message following the point.
916 If the show buffer has a region, this variable is ignored unless its value is
917 one of `attribution' or `autoattrib' in which case the attribution is added
918 to the yanked region."
919 :type '(choice (const :tag "Body and Header" t)
920 (const :tag "Body" body)
921 (const :tag "Below Point" nil)
922 (const :tag "Invoke supercite" supercite)
923 (const :tag "Invoke supercite, Automatically" autosupercite)
924 (const :tag "Body With Attribution" attribution)
925 (const :tag "Body With Attribution, Automatically"
926 autoattrib))
927 :group 'mh-letter)
931 ;;; Ranges (:group 'mh-ranges)
933 (defcustom mh-interpret-number-as-range-flag t
934 "Non-nil means interpret a number as a range.
935 If the variable is non-nil, and you use an integer, N, when asked for a
936 range to scan, then MH-E uses the range \"last:N\"."
937 :type 'boolean
938 :group 'mh-ranges)
942 ;;; Scan Line Formats (:group 'mh-scan-line-formats)
944 (defcustom mh-adaptive-cmd-note-flag t
945 "*Non-nil means that the message number width is determined dynamically.
946 This is done once when a folder is first opened by running scan on the last
947 message of the folder. The message number for the last message is extracted
948 and its width calculated. This width is used when calling `mh-set-cmd-note'.
950 If you prefer fixed-width message numbers, set this variable to nil and call
951 `mh-set-cmd-note' with the width specified by the scan format in
952 `mh-scan-format-file'. For example, the default width is 4, so you would use
953 \"(mh-set-cmd-note 4)\" if `mh-scan-format-file' were nil."
954 :type 'boolean
955 :group 'mh-scan-line-formats)
957 (defcustom mh-scan-format-file t
958 "Specifies the format file to pass to the scan program.
959 If t, the format string will be taken from the either `mh-scan-format-mh'
960 or `mh-scan-format-nmh' depending on whether MH or nmh is in use.
961 If nil, the default scan output will be used.
963 If you customize the scan format, you may need to modify a few variables
964 containing regexps that MH-E uses to identify specific portions of the output.
965 Use `M-x apropos RET mh-scan.*regexp' to obtain a list of these variables. You
966 may also have to call `mh-set-cmd-note' with the width of your message
967 numbers. See also `mh-adaptive-cmd-note-flag'."
968 :type '(choice (const :tag "Use MH-E scan Format" t)
969 (const :tag "Use Default scan Format" nil)
970 (file :tag "Specify a scan Format File"))
971 :group 'mh-scan-line-formats)
973 (defcustom mh-scan-prog "scan"
974 "*Program to run to generate one-line-per-message listing of a folder.
975 Normally \"scan\" or a file name linked to scan. This file is searched
976 for relative to the `mh-progs' directory unless it is an absolute pathname."
977 :type 'string
978 :group 'mh-scan-line-formats)
979 (make-variable-buffer-local 'mh-scan-prog)
983 ;;; Sending Mail (:group 'mh-sending-mail)
985 (defcustom mh-compose-forward-as-mime-flag t
986 "Non-nil means that messages are forwarded as a MIME part."
987 :type 'boolean
988 :group 'mh-sending-mail)
990 (defcustom mh-compose-letter-function nil
991 "Invoked when setting up a letter draft.
992 It is passed three arguments: TO recipients, SUBJECT, and CC recipients."
993 :type '(choice (const nil) function)
994 :group 'mh-sending-mail)
996 (defcustom mh-compose-prompt-flag nil
997 "*Non-nil means prompt for header fields when composing a new draft."
998 :type 'boolean
999 :group 'mh-sending-mail)
1001 (defcustom mh-forward-subject-format "%s: %s"
1002 "*Format to generate the Subject: line contents for a forwarded message.
1003 The two string arguments to the format are the sender of the original
1004 message and the original subject line."
1005 :type 'string
1006 :group 'mh-sending-mail)
1008 (defcustom mh-insert-x-mailer-flag t
1009 "*Non-nil means append an X-Mailer field to the header."
1010 :type 'boolean
1011 :group 'mh-sending-mail)
1013 (defcustom mh-reply-default-reply-to nil
1014 "*Sets the person or persons to whom a reply will be sent.
1015 If nil, prompt for recipient. If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this
1016 value and it should be one of \"from\", \"to\", \"cc\", or \"all\".
1017 The values \"cc\" and \"all\" do the same thing."
1018 :type '(choice (const :tag "Prompt" nil)
1019 (const "from") (const "to")
1020 (const "cc") (const "all"))
1021 :group 'mh-sending-mail)
1023 (defcustom mh-reply-show-message-flag t
1024 "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply].
1026 The setting of this variable determines whether the MH `show-buffer' is
1027 displayed with the current message when using `mh-reply' without a prefix
1028 argument. Set it to nil if you already include the message automatically
1029 in your draft using
1030 repl: -filter repl.filter
1031 in your ~/.mh_profile file."
1032 :type 'boolean
1033 :group 'mh-sending-mail)
1037 ;;; Sequences (:group 'mh-sequences)
1039 ;;; If `mh-unpropagated-sequences' becomes a defcustom, add the following to
1040 ;;; the docstring: "Additional sequences that should not to be preserved can be
1041 ;;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
1043 (defcustom mh-refile-preserves-sequences-flag t
1044 "*Non-nil means that sequences are preserved when messages are refiled.
1045 If this variable is non-nil and a message belonging to a sequence other than
1046 cur or Previous-Sequence (see mh-profile 5) is refiled then it is put in the
1047 same sequence in the destination folder."
1048 :type 'boolean
1049 :group 'mh-sequences)
1051 (defcustom mh-tick-seq 'tick
1052 "The name of the MH sequence for ticked messages.
1053 You would change this option if you already use the `tick' sequence for your
1054 own use. You can also disable all of the ticking functions by choosing the
1055 `Disable Ticking' item but there isn't much advantage to that."
1056 :type '(choice (const :tag "Disable Ticking" nil)
1057 symbol)
1058 :group 'mh-sequences)
1060 (defcustom mh-update-sequences-after-mh-show-flag t
1061 "*Non-nil means flush MH sequences to disk after message is shown.
1062 Three sequences are maintained internally by MH-E and pushed out to MH when a
1063 message is shown. They include the sequence specified by your
1064 `Unseen-Sequence:' profile entry, `cur', and the sequence listed by
1065 the `mh-tick-seq' option which is `tick' by default.
1066 If you do not like this behavior, set this option to nil. You can then update
1067 the state manually with the \\<mh-folder-mode-map>`\\[mh-execute-commands]', `\\[mh-quit]', or `\\[mh-update-sequences]' commands."
1068 :type 'boolean
1069 :group 'mh-sequences)
1073 ;;; Reading Your Mail (:group 'mh-show)
1075 (defcustom mh-bury-show-buffer-flag t
1076 "*Non-nil means that the displayed show buffer for a folder is buried."
1077 :type 'boolean
1078 :group 'mh-show)
1080 (defcustom mh-clean-message-header-flag t
1081 "*Non-nil means remove extraneous header fields.
1082 The header fields listed in the `mh-invisible-header-fields-default' option
1083 are hidden, although you can check off any field that you would like to see.
1084 Header fields that you would like to hide that aren't listed can be added to
1085 the `mh-invisible-header-fields' option."
1086 :type 'boolean
1087 :group 'mh-show)
1089 (defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode")))
1090 "*Non-nil means that Gnus is used to show MIME attachments with Gnus."
1091 :type 'boolean
1092 :group 'mh-show)
1094 (defcustom mh-display-buttons-for-alternatives-flag nil
1095 "*Non-nil means display buttons for all MIME alternatives.
1096 Default behavior is to display only the preferred alternative. If this
1097 variable is non-nil, then the preferred part is shown inline and buttons
1098 are shown for each of the other alternatives."
1099 :type 'boolean
1100 :group 'mh-show)
1102 (defcustom mh-display-buttons-for-inline-parts-flag nil
1103 "*Non-nil means display buttons for all inline MIME parts.
1104 If non-nil, buttons are displayed for all MIME parts. Inline parts start off
1105 in displayed state but they can be hidden by clicking the button. If nil no
1106 buttons are shown for inline parts."
1107 :type 'boolean
1108 :group 'mh-show)
1110 (defcustom mh-do-not-confirm-flag nil
1111 "*Non-nil means do not prompt for confirmation.
1112 Commands such as `mh-pack-folder' prompt to confirm whether to process
1113 outstanding moves and deletes or not before continuing. A non-nil setting will
1114 perform the action--which is usually desired but cannot be retracted--without
1115 question."
1116 :type 'boolean
1117 :group 'mh-show)
1119 (defcustom mh-fetch-x-image-url 'ask
1120 "*Control fetching of `X-Image-URL:' header field image.
1121 If set to \"Always fetch\" (t), the image is always fetched. You probably want
1122 to avoid this setting for privacy and DOS (denial of service) reasons. For
1123 example, fetching a URL can tip off a spammer that you've read his email.
1124 Someone may also flood your network and fill your disk drive by sending a
1125 torrent of messages, each specifying a unique URL to a very large file.
1127 If set to \"Ask before fetching\" ('ask), you are prompted before the image is
1128 fetched. MH-E will remember your reply and will either use the already fetched
1129 image the next time the same URL is encountered or silently skip it if you
1130 didn't fetch it the first time. This is the default.
1132 If set to \"Never fetch\" (nil), images are never fetched and only displayed
1133 if they are already present in the cache.
1135 The cache of images is found in the directory `.mhe-x-image-cache' within your
1136 MH directory. To see how you can add your own face to the `From:' field, see
1137 `mh-x-face-file'.
1139 This setting only has effect if `mh-show-use-xface-flag' is non-nil."
1141 :type '(choice (const :tag "Always fetch" t)
1142 (const :tag "Ask before fetching" ask)
1143 (const :tag "Never fetch" nil))
1144 :group 'mh-show)
1146 (defcustom mh-graphical-smileys-flag t
1147 "*Non-nil means graphical smileys are displayed.
1148 Non-nil means that small graphics will be used in the show buffer instead of
1149 patterns like :-), ;-) etc. The setting only has effect if
1150 `mh-decode-mime-flag' is non-nil."
1151 :type 'boolean
1152 :group 'mh-show)
1154 (defcustom mh-graphical-emphasis-flag t
1155 "*Non-nil means graphical emphasis is displayed.
1156 Non-nil means that _underline_ will be underlined, *bold* will appear in bold,
1157 /italic/ will appear in italic etc. See `gnus-emphasis-alist' for the whole
1158 list. The setting only has effect if `mh-decode-mime-flag' is non-nil."
1159 :type 'boolean
1160 :group 'mh-show)
1162 (defcustom mh-highlight-citation-p 'gnus
1163 "How to highlight citations in show buffers.
1164 The gnus method uses a different color for each indentation."
1165 :type '(choice (const :tag "Use Gnus" gnus)
1166 (const :tag "Use font-lock" font-lock)
1167 (const :tag "Don't fontify" nil))
1168 :group 'mh-show)
1170 ;; Keep fields alphabetized. Mention source, if known.
1171 (defvar mh-invisible-header-fields-internal
1172 '("Approved:"
1173 "Autoforwarded:"
1174 "Bestservhost:"
1175 "Cancel-Lock:" ; NNTP posts
1176 "Content-" ; RFC 2045
1177 "Delivered-To:" ; Egroups/yahoogroups mailing list manager
1178 "Delivery-Date:" ; MH
1179 "Delivery:"
1180 "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys
1181 "Encoding:"
1182 "Envelope-to:"
1183 "Errors-To:"
1184 "Face:" ; Gnus Face header
1185 "Forwarded:" ; MH
1186 "From " ; sendmail
1187 "Importance:" ; MS Outlook
1188 "In-Reply-To:" ; MH
1189 "Lines:"
1190 "List-" ; Mailman mailing list manager
1191 "List-" ; Unknown mailing list managers
1192 "List-Subscribe:" ; Unknown mailing list managers
1193 "List-Unsubscribe:" ; Unknown mailing list managers
1194 "Mail-from:" ; MH
1195 "Mailing-List:" ; Egroups/yahoogroups mailing list manager
1196 "Message-Id:" ; RFC 822
1197 "Mime-Version" ; RFC 2045
1198 "NNTP-" ; News
1199 "Old-Return-Path:"
1200 "Original-Encoded-Information-Types:" ; X400
1201 "Original-Lines:" ; mail to news
1202 "Original-NNTP-" ; mail to news
1203 "Original-Newsgroups:" ; mail to news
1204 "Original-Path:" ; mail to news
1205 "Original-Received:" ; mail to news
1206 "Original-To:" ; mail to news
1207 "Original-X-" ; mail to news
1208 "Originator:"
1209 "P1-Content-Type:" ; X400
1210 "P1-Message-Id:" ; X400
1211 "P1-Recipient:" ; X400
1212 "Path:"
1213 "Precedence:"
1214 "Prev-Resent" ; MH
1215 "Priority:"
1216 "Received:" ; RFC 822
1217 "References:"
1218 "Remailed-" ; MH
1219 "Replied:" ; MH
1220 "Resent" ; MH
1221 "Return-Path:" ; RFC 822
1222 "Sensitivity:" ; MS Outlook
1223 "Status:" ; sendmail
1224 "Thread-"
1225 "Ua-Content-Id:" ; X400
1226 ;; "User-Agent:" ; Similar to X-Mailer, so display it.
1227 "Via:" ; MH
1228 "X-Abuse-Info:"
1229 "X-Abuse-and-DMCA-"
1230 "X-Accept-Language:"
1231 "X-Accept-Language:" ; Netscape/Mozilla
1232 "X-Ack:"
1233 "X-Administrivia-To:"
1234 "X-AntiAbuse:" ; cPanel
1235 "X-Apparently-From:" ; MS Outlook
1236 "X-Apparently-To:" ; Egroups/yahoogroups mailing list manager
1237 "X-Authentication-Warning:" ; sendmail
1238 "X-Beenthere:" ; Mailman mailing list manager
1239 "X-Bogosity:" ; bogofilter
1240 "X-Complaints-To:"
1241 "X-Cron-Env:"
1242 "X-DMCA"
1243 "X-Delivered"
1244 "X-ELNK-Trace:" ; Earthlink mailer
1245 "X-Envelope-Date:" ; GNU mailutils
1246 "X-Envelope-From:"
1247 "X-Envelope-Sender:"
1248 "X-Envelope-To:"
1249 "X-Evolution:" ; Evolution mail client
1250 "X-Face:"
1251 "X-Folder:" ; Spam
1252 "X-From-Line"
1253 "X-Gnus-Mail-Source:" ; gnus
1254 "X-Greylist:" ; milter-greylist-1.2.1
1255 "X-Habeas-SWE-1:" ; Spam
1256 "X-Habeas-SWE-2:" ; Spam
1257 "X-Habeas-SWE-3:" ; Spam
1258 "X-Habeas-SWE-4:" ; Spam
1259 "X-Habeas-SWE-5:" ; Spam
1260 "X-Habeas-SWE-6:" ; Spam
1261 "X-Habeas-SWE-7:" ; Spam
1262 "X-Habeas-SWE-8:" ; Spam
1263 "X-Habeas-SWE-9:" ; Spam
1264 "X-Image-URL:" ; URL equivalent of X-Face and Face
1265 "X-Info:" ; NTMail
1266 "X-Juno-" ; Juno
1267 "X-List-Host:" ; Unknown mailing list managers
1268 "X-List-Subscribe:" ; Unknown mailing list managers
1269 "X-List-Unsubscribe:" ; Unknown mailing list managers
1270 "X-Listprocessor-" ; ListProc(tm) by CREN
1271 "X-Listserver:" ; Unknown mailing list managers
1272 "X-Loop:" ; Unknown mailing list managers
1273 "X-MHE-Checksum" ; Checksum added during index search
1274 "X-MIME-Autoconverted:" ; sendmail
1275 "X-MIMETrack:"
1276 "X-Mms-" ; T-Mobile pictures
1277 "X-MS-" ; MS Outlook
1278 "X-MailScanner" ; ListProc(tm) by CREN
1279 "X-Mailing-List:" ; Unknown mailing list managers
1280 "X-Mailman-Version:" ; Mailman mailing list manager
1281 "X-Majordomo:" ; Majordomo mailing list manager
1282 "X-Message-Id"
1283 "X-MessageWall-Score:" ; Unknown mailing list manager, AUC TeX
1284 "X-MimeOLE:" ; MS Outlook
1285 "X-Mozilla-Status:" ; Netscape/Mozilla
1286 "X-Msmail-" ; MS Outlook
1287 "X-NAI-Spam-" ; Network Associates Inc. SpamKiller
1288 "X-News:" ; News
1289 "X-No-Archive:"
1290 "X-Notes-Item:" ; Lotus Notes Domino structured header
1291 "X-OperatingSystem:"
1292 ;;"X-Operator:" ; Similar to X-Mailer, so display it
1293 "X-Orcl-Content-Type:"
1294 "X-Original-Complaints-To:"
1295 "X-Original-Date:" ; SourceForge mailing list manager
1296 "X-Original-To:"
1297 "X-Original-Trace:"
1298 "X-OriginalArrivalTime:" ; Hotmail
1299 "X-Originating-IP:" ; Hotmail
1300 "X-Postfilter:"
1301 "X-Priority:" ; MS Outlook
1302 "X-Qotd-" ; User added
1303 "X-RM"
1304 "X-Received-Date:"
1305 "X-Received:"
1306 "X-Request-"
1307 "X-SBClass:" ; Spam
1308 "X-SBNote:" ; Spam
1309 "X-SBPass:" ; Spam
1310 "X-SBRule:" ; Spam
1311 "X-SMTP-"
1312 "X-Scanned-By"
1313 "X-Sender:"
1314 "X-Server-Date:"
1315 "X-Server-Uuid:"
1316 "X-Sieve:" ; Sieve filtering
1317 "X-Source"
1318 "X-Spam-" ; Spamassassin
1319 "X-SpamBouncer:" ; Spam
1320 "X-Status"
1321 "X-Submissions-To:"
1322 "X-Telecom-Digest"
1323 "X-Trace:"
1324 "X-UID"
1325 "X-UIDL:"
1326 "X-USANET-" ; usa.net
1327 "X-UserInfo1:"
1328 "X-VSMLoop:" ; NTMail
1329 "X-Vms-To:"
1330 "X-WebTV-Signature:"
1331 "X-Wss-Id:" ; Worldtalk gateways
1332 "X-Yahoo"
1333 "X-eGroups-" ; Egroups/yahoogroups mailing list manager
1334 "X-pgp:"
1335 "X-submission-address:"
1336 "X400-" ; X400
1337 "Xref:")
1338 "List of default header fields that are not to be shown.
1339 Do not alter this variable directly. Instead, add entries from here that you
1340 would like to be displayed in `mh-invisible-header-fields-default'
1341 and add entries to hide in `mh-invisible-header-fields'.")
1343 (defvar mh-invisible-header-fields-compiled nil
1344 "*Regexp matching lines in a message header that are not to be shown.
1345 Do not alter this variable directly. Instead, customize
1346 `mh-invisible-header-fields-default' checking for fields normally
1347 hidden that you wish to display, and add extra entries to hide in
1348 `mh-invisible-header-fields'.")
1350 (defun mh-invisible-headers ()
1351 "Make or remake the variable `mh-invisible-header-fields-compiled'.
1352 Done using `mh-invisible-header-fields-internal' as input, from which entries
1353 from `mh-invisible-header-fields-default' are removed and entries
1354 from `mh-invisible-header-fields' are added."
1355 (let ((fields mh-invisible-header-fields-internal))
1356 (when mh-invisible-header-fields-default
1357 ;; Remove entries from `mh-invisible-header-fields-default'
1358 (setq fields
1359 (loop for x in fields
1360 unless (member x mh-invisible-header-fields-default)
1361 collect x)))
1362 (when (and (boundp 'mh-invisible-header-fields)
1363 mh-invisible-header-fields)
1364 (dolist (x mh-invisible-header-fields)
1365 (unless (member x fields) (setq fields (cons x fields)))))
1366 (if fields
1367 (setq mh-invisible-header-fields-compiled
1368 (concat
1370 ;; workaround for insufficient default
1371 (let ((max-specpdl-size 1000))
1372 (regexp-opt fields t))))
1373 (setq mh-invisible-header-fields-compiled nil))))
1375 (defcustom mh-invisible-header-fields-default nil
1376 "*List of hidden header fields.
1377 The header fields listed in this option are hidden, although you can check off
1378 any field that you would like to see. Header fields that you would like to
1379 hide that aren't listed can be added to the `mh-invisible-header-fields'
1380 option.
1382 See also `mh-clean-message-header-flag'."
1383 :type `(set ,@(mapcar (lambda (x) `(const ,x))
1384 mh-invisible-header-fields-internal))
1385 :set (lambda (symbol value)
1386 (set-default symbol value)
1387 (mh-invisible-headers))
1388 :group 'mh-show)
1390 (defcustom mh-invisible-header-fields nil
1391 "*Additional header fields to hide.
1392 Header fields that you would like to hide that aren't listed in
1393 `mh-invisible-header-fields-default' can be added to this option with a couple
1394 of caveats. Regular expressions are not allowed. Unique fields should have a
1395 `:' suffix; otherwise, the element can be used to render invisible an entire
1396 class of fields that start with the same prefix.
1398 See also `mh-clean-message-header-flag'."
1400 :type '(repeat (string :tag "Header field"))
1401 :set (lambda (symbol value)
1402 (set-default symbol value)
1403 (mh-invisible-headers))
1404 :group 'mh-show)
1406 (defcustom mh-lpr-command-format "lpr -J '%s'"
1407 "*Format for Unix command that prints a message.
1408 The string should be a Unix command line, with the string '%s' where
1409 the job's name (folder and message number) should appear. The formatted
1410 message text is piped to this command when you type \\<mh-folder-mode-map>`\\[mh-print-msg]'."
1411 :type 'string
1412 :group 'mh-show)
1414 (defcustom mh-max-inline-image-height nil
1415 "*Maximum inline image height if Content-Disposition is not present.
1416 If nil, image will be displayed if its height is smaller than the height of
1417 the window."
1418 :type '(choice (const nil) integer)
1419 :group 'mh-show)
1421 (defcustom mh-max-inline-image-width nil
1422 "*Maximum inline image width if Content-Disposition is not present.
1423 If nil, image will be displayed if its width is smaller than the width of the
1424 window."
1425 :type '(choice (const nil) integer)
1426 :group 'mh-show)
1428 (defcustom mh-mime-save-parts-default-directory t
1429 "Default directory to use for `mh-mime-save-parts'.
1430 If nil, prompt and set for next time the command is used during same session.
1431 If t, prompt always"
1432 :type '(choice (const :tag "Prompt the first time" nil)
1433 (const :tag "Prompt always" t)
1434 directory)
1435 :group 'mh-show)
1437 (defcustom mh-print-background-flag nil
1438 "*Non-nil means messages should be printed in the background.
1439 WARNING: do not delete the messages until printing is finished;
1440 otherwise, your output may be truncated."
1441 :type 'boolean
1442 :group 'mh-show)
1444 (defcustom mh-recursive-folders-flag nil
1445 "*Non-nil means that commands which operate on folders do so recursively."
1446 :type 'boolean
1447 :group 'mh-show)
1449 (defcustom mh-show-maximum-size 0
1450 "*Maximum size of message (in bytes) to display automatically.
1451 Provides an opportunity to skip over large messages which may be slow to load.
1452 Use a value of 0 to display all messages automatically regardless of size."
1453 :type 'integer
1454 :group 'mh-show)
1456 (defcustom mh-show-threads-flag nil
1457 "Non-nil means new folders start in threaded mode.
1458 Threading large number of messages can be time consuming. So if the flag is
1459 non-nil then threading will be done only if the number of messages being
1460 threaded is less than `mh-large-folder'."
1461 :type 'boolean
1462 :group 'mh-show)
1464 ;; Use goto-addr if it was already loaded (which probably sets this
1465 ;; variable to t), or if this variable is otherwise set to t.
1466 (defcustom mh-show-use-goto-addr-flag (and (boundp 'goto-address-highlight-p)
1467 goto-address-highlight-p)
1468 "*Non-nil means highlight URLs and email addresses.
1469 The `goto-addr' module is used."
1470 :type 'boolean
1471 :group 'mh-show)
1473 (defcustom mh-show-use-xface-flag (>= emacs-major-version 21)
1474 "*Non-nil means display face images in `mh-show-mode'.
1476 MH-E can display the content of `Face:', `X-Face:', and `X-Image-URL:' header
1477 fields. If any of these fields occur in the header of your message, the
1478 sender's face will appear in the `From:' header field. If more than one of
1479 these fields appear, then the first field found in the order `Face:',
1480 `X-Face:', and `X-Image-URL:' will be used. Note that versions of GNU Emacs
1481 prior to 21.1 don't support the display of inline images, so face images are
1482 not displayed in these versions.
1484 The option `mh-show-use-xface-flag' is used to turn this feature on and off.
1485 This feature will be turned on by default if your system supports it.
1487 The first header field used, if present, is the Gnus-specific `Face:' field.
1488 The `Face:' field appeared in GNU Emacs 21 and XEmacs. For more information,
1489 see http://quimby.gnus.org/circus/face/. Next is the traditional `X-Face:'
1490 header field. The display of this field requires the `uncompface' program
1491 which can be obtained from
1492 ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z. Recent versions of
1493 XEmacs have internal support for `X-Face:' images. If your version of XEmacs
1494 does not, then you'll need both `uncompface' and the x-face package which is
1495 available at ftp://ftp.jpl.org/pub/elisp/.
1497 Finally, MH-E will display images referenced by the `X-Image-URL:' header
1498 field if neither the `Face:' nor the `X-Face:' fields are present. The display
1499 of the images requires `wget' (available from
1500 http://www.gnu.org/software/wget/wget.html), `fetch', or `curl' to fetch the
1501 image and the `convert' program from the ImageMagick suite, available from
1502 http://www.imagemagick.org/. Of the three header fields this is the most
1503 efficient in terms of network usage since the image doesn't need to be
1504 transmitted with every single mail.
1506 The option `mh-fetch-x-image-url' controls the fetching of the `X-Image-URL:'
1507 header field image."
1508 :type 'boolean
1509 :group 'mh-show)
1511 (defcustom mh-store-default-directory nil
1512 "*Last directory used by \\[mh-store-msg]; default for next store.
1513 A directory name string, or nil to use current directory."
1514 :type '(choice (const :tag "Current" nil)
1515 directory)
1516 :group 'mh-show)
1518 (defcustom mh-summary-height nil
1519 "*Number of lines in MH-Folder window (including the mode line)."
1520 :type '(choice (const :tag "Automatic" nil)
1521 (integer :tag "Fixed sized"))
1522 :group 'mh-show)
1524 (defcustom mhl-formfile nil
1525 "*Name of format file to be used by mhl to show and print messages.
1526 A value of t means use the default format file.
1527 nil means don't use mhl to format messages when showing; mhl is still used,
1528 with the default format file, to format messages when printing them.
1529 The format used should specify a non-zero value for overflowoffset so
1530 the message continues to conform to RFC 822 and MH-E can parse the headers."
1531 :type '(choice (const nil) (const t) string)
1532 :group 'mh-show)
1533 (put 'mhl-formfile 'info-file "mh-e")
1537 ;;; The Speedbar (:group 'mh-speed)
1539 (defcustom mh-large-folder 200
1540 "The number of messages that indicates a large folder.
1541 If a folder is deemed to be large, that is the number of messages in it exceed
1542 this value, then confirmation is needed when it is visited. Even when
1543 `mh-show-threads-flag' is non-nil, the folder is not automatically threaded, if
1544 it is large. If set to nil all folders are treated as if they are small."
1545 :type '(choice (const :tag "No limit") integer)
1546 :group 'mh-speed)
1548 (defcustom mh-speed-flists-interval 60
1549 "Time between calls to flists in seconds.
1550 If 0, flists is not called repeatedly."
1551 :type 'integer
1552 :group 'mh-speed)
1554 (defcustom mh-speed-run-flists-flag t
1555 "Non-nil means flists is used.
1556 If non-nil, flists is executed every `mh-speed-flists-interval' seconds to
1557 update the display of the number of unseen and total messages in each folder.
1558 If resources are limited, this can be set to nil and the speedbar display can
1559 be updated manually with the \\[mh-speed-flists] command."
1560 :type 'boolean
1561 :group 'mh-speed)
1565 ;;; The Toolbar (:group 'mh-toolbar)
1567 (defcustom mh-tool-bar-search-function 'mh-search-folder
1568 "*Function called by the tool-bar search button.
1569 See `mh-search-folder' and `mh-index-search' for details."
1570 :type '(choice (const mh-search-folder)
1571 (const mh-index-search)
1572 (function :tag "Other function"))
1573 :group 'mh-toolbar)
1575 ;; Functions called from the tool bar
1576 (defun mh-tool-bar-search (&optional arg)
1577 "Interactively call `mh-tool-bar-search-function'.
1578 Optional argument ARG is not used."
1579 (interactive "P")
1580 (call-interactively mh-tool-bar-search-function))
1582 (defun mh-tool-bar-customize ()
1583 "Call `mh-customize' from the toolbar."
1584 (interactive)
1585 (mh-customize t))
1587 (defun mh-tool-bar-folder-help ()
1588 "Visit \"(mh-e)Top\"."
1589 (interactive)
1590 (info "(mh-e)Top")
1591 (delete-other-windows))
1593 (defun mh-tool-bar-letter-help ()
1594 "Visit \"(mh-e)Draft Editing\"."
1595 (interactive)
1596 (info "(mh-e)Draft Editing")
1597 (delete-other-windows))
1599 (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag)
1600 "Generate FUNCTION that replies to RECIPIENT.
1601 If FOLDER-BUFFER-FLAG is nil then the function generated
1602 When INCLUDE-FLAG is non-nil, include message body being replied to."
1603 `(defun ,function (&optional arg)
1604 ,(format "Reply to \"%s\".\nWhen ARG is non-nil include message in reply."
1605 recipient)
1606 (interactive "P")
1607 ,(if folder-buffer-flag nil '(set-buffer mh-show-folder-buffer))
1608 (mh-reply (mh-get-msg-num nil) ,recipient arg)))
1610 (mh-tool-bar-reply-generator mh-tool-bar-reply-from "from" t)
1611 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-from "from" nil)
1612 (mh-tool-bar-reply-generator mh-tool-bar-reply-to "to" t)
1613 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-to "to" nil)
1614 (mh-tool-bar-reply-generator mh-tool-bar-reply-all "all" t)
1615 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-all "all" nil)
1617 ;; XEmacs has a couple of extra customizations...
1618 (mh-do-in-xemacs
1619 (defcustom mh-xemacs-use-toolbar-flag (if (and (featurep 'toolbar)
1620 (featurep 'xpm)
1621 (device-on-window-system-p))
1623 nil)
1624 "*If non-nil, use toolbar.
1626 This will default to t if you are in an environment that supports
1627 toolbars and xpm."
1628 :type 'boolean
1629 :group 'mh-toolbar)
1631 (defcustom mh-xemacs-toolbar-position (if mh-xemacs-use-toolbar-flag
1632 'default
1633 nil)
1634 "*Where to put the toolbar.
1636 Valid non-nil values are \"default\", \"top\", \"bottom\", \"left\",
1637 \"right\". These match the four edges of the frame, with \"default\"
1638 meaning \"use the same position as the default-toolbar\".
1640 A nil value means do not use a toolbar.
1642 If this variable is set to anything other than \"default\" and the
1643 default-toolbar has a different positional setting from the value of
1644 this variable, then two toolbars will be displayed. The MH-E toolbar
1645 and the default-toolbar."
1646 :type '(radio (const :tag "Same position as the \"default-toolbar\""
1647 :value default)
1648 (const :tag "Along the top edge of the frame"
1649 :value top)
1650 (const :tag "Along the bottom edge of the frame"
1651 :value bottom)
1652 (const :tag "Along the left edge of the frame"
1653 :value left)
1654 (const :tag "Along the right edge of the frame"
1655 :value right)
1656 (const :tag "Don't use a toolbar" nil))
1657 :group 'mh-toolbar))
1659 (defmacro mh-tool-bar-define (defaults &rest buttons)
1660 "Define a tool bar for MH-E.
1661 DEFAULTS is the list of buttons that are present by default. It is a list of
1662 lists where the sublists are of the following form:
1664 (:KEYWORD FUNC1 FUNC2 FUNC3 ...)
1666 Here :KEYWORD is one of :folder or :letter. If it is :folder then the default
1667 buttons in the folder and show mode buffers are being specified. If it is
1668 :letter then the default buttons in the letter mode are listed. FUNC1, FUNC2,
1669 FUNC3, ... are the names of the functions that the buttons would execute.
1671 Each element of BUTTONS is a list consisting of four mandatory items and one
1672 optional item as follows:
1674 (FUNCTION MODES ICON DOC &optional ENABLE-EXPR)
1676 where,
1678 FUNCTION is the name of the function that will be executed when the button
1679 is clicked.
1681 MODES is a list of symbols. List elements must be from `folder', `letter' and
1682 `sequence'. If `folder' is present then the button is available in the
1683 folder and show buffer. If the name of FUNCTION is of the form \"mh-foo\",
1684 where foo is some arbitrary string, then we check if the function
1685 `mh-show-foo' exists. If it exists then that function is used in the show
1686 buffer. Otherwise the original function `mh-foo' is used in the show buffer
1687 as well. Presence of `sequence' is handled similar to the above. The only
1688 difference is that the button is shown only when the folder is narrowed to a
1689 sequence. If `letter' is present in MODES, then the button is available
1690 during draft editing and runs FUNCTION when clicked.
1692 ICON is the icon that is drawn in the button.
1694 DOC is the documentation for the button. It is used in tool-tips and in
1695 providing other help to the user. GNU Emacs uses only the first line of the
1696 string. So the DOC should be formatted such that the first line is useful and
1697 complete without the rest of the string.
1699 Optional item ENABLE-EXPR is an arbitrary lisp expression. If it evaluates
1700 to nil, then the button is deactivated, otherwise it is active. If is in't
1701 present then the button is always active."
1702 ;; The following variable names have been carefully chosen to make code
1703 ;; generation easier. Modifying the names should be done carefully.
1704 (let (folder-buttons folder-docs folder-button-setter sequence-button-setter
1705 show-buttons show-button-setter show-seq-button-setter
1706 letter-buttons letter-docs letter-button-setter
1707 folder-defaults letter-defaults
1708 folder-vectors show-vectors letter-vectors)
1709 (dolist (x defaults)
1710 (cond ((eq (car x) :folder) (setq folder-defaults (cdr x)))
1711 ((eq (car x) :letter) (setq letter-defaults (cdr x)))))
1712 (dolist (button buttons)
1713 (unless (and (listp button)
1714 (or (equal (length button) 4) (equal (length button) 5)))
1715 (error "Incorrect MH-E tool-bar button specification: %s" button))
1716 (let* ((name (nth 0 button))
1717 (name-str (symbol-name name))
1718 (icon (nth 2 button))
1719 (xemacs-icon (mh-do-in-xemacs
1720 (cdr (assoc (intern icon) mh-xemacs-icon-map))))
1721 (full-doc (nth 3 button))
1722 (doc (if (string-match "\\(.*\\)\n" full-doc)
1723 (match-string 1 full-doc)
1724 full-doc))
1725 (enable-expr (or (nth 4 button) t))
1726 (modes (nth 1 button))
1727 functions show-sym)
1728 (when (memq 'letter modes) (setq functions `(:letter ,name)))
1729 (when (or (memq 'folder modes) (memq 'sequence modes))
1730 (setq functions
1731 (append `(,(if (memq 'folder modes) :folder :sequence) ,name)
1732 functions))
1733 (setq show-sym
1734 (if (string-match "^mh-\\(.*\\)$" name-str)
1735 (intern (concat "mh-show-" (match-string 1 name-str)))
1736 name))
1737 (setq functions
1738 (append `(,(if (memq 'folder modes) :show :show-seq)
1739 ,(if (fboundp show-sym) show-sym name))
1740 functions)))
1741 (do ((functions functions (cddr functions)))
1742 ((null functions))
1743 (let* ((type (car functions))
1744 (function (cadr functions))
1745 (type1 (substring (symbol-name type) 1))
1746 (vector-list (cond ((eq type :show) 'show-vectors)
1747 ((eq type :show-seq) 'show-vectors)
1748 ((eq type :letter) 'letter-vectors)
1749 (t 'folder-vectors)))
1750 (list (cond ((eq type :letter) 'mh-tool-bar-letter-buttons)
1751 (t 'mh-tool-bar-folder-buttons)))
1752 (key (intern (concat "mh-" type1 "toolbar-" name-str)))
1753 (setter (intern (concat type1 "-button-setter")))
1754 (mbuttons (cond ((eq type :letter) 'letter-buttons)
1755 ((eq type :show) 'show-buttons)
1756 ((eq type :show-seq) 'show-buttons)
1757 (t 'folder-buttons)))
1758 (docs (cond ((eq mbuttons 'letter-buttons) 'letter-docs)
1759 ((eq mbuttons 'folder-buttons) 'folder-docs))))
1760 (add-to-list vector-list `[,xemacs-icon ,function t ,full-doc])
1761 (add-to-list
1762 setter `(when (member ',name ,list)
1763 (mh-funcall-if-exists
1764 tool-bar-add-item ,icon ',function ',key
1765 :help ,doc :enable ',enable-expr)))
1766 (add-to-list mbuttons name)
1767 (if docs (add-to-list docs doc))))))
1768 (setq folder-buttons (nreverse folder-buttons)
1769 letter-buttons (nreverse letter-buttons)
1770 show-buttons (nreverse show-buttons)
1771 letter-docs (nreverse letter-docs)
1772 folder-docs (nreverse folder-docs)
1773 folder-vectors (nreverse folder-vectors)
1774 show-vectors (nreverse show-vectors)
1775 letter-vectors (nreverse letter-vectors))
1776 (dolist (x folder-defaults)
1777 (unless (memq x folder-buttons)
1778 (error "Folder defaults contains unknown button '%s'" x)))
1779 (dolist (x letter-defaults)
1780 (unless (memq x letter-buttons)
1781 (error "Letter defaults contains unknown button '%s'" x)))
1782 `(eval-when (compile load eval)
1783 (defvar mh-folder-tool-bar-map nil)
1784 (defvar mh-folder-seq-tool-bar-map nil)
1785 (defvar mh-show-tool-bar-map nil)
1786 (defvar mh-show-seq-tool-bar-map nil)
1787 (defvar mh-letter-tool-bar-map nil)
1788 ;; GNU Emacs tool bar specific code
1789 (mh-do-in-gnu-emacs
1790 ;; Custom setter functions
1791 (defun mh-tool-bar-folder-buttons-set (symbol value)
1792 "Construct toolbar for `mh-folder-mode' and `mh-show-mode'."
1793 (set-default symbol value)
1794 (setq mh-folder-tool-bar-map
1795 (let ((tool-bar-map (make-sparse-keymap)))
1796 ,@(nreverse folder-button-setter)
1797 tool-bar-map))
1798 (setq mh-show-tool-bar-map
1799 (let ((tool-bar-map (make-sparse-keymap)))
1800 ,@(nreverse show-button-setter)
1801 tool-bar-map))
1802 (setq mh-show-seq-tool-bar-map
1803 (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map)))
1804 ,@(nreverse show-seq-button-setter)
1805 tool-bar-map))
1806 (setq mh-folder-seq-tool-bar-map
1807 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map)))
1808 ,@(nreverse sequence-button-setter)
1809 tool-bar-map)))
1810 (defun mh-tool-bar-letter-buttons-set (symbol value)
1811 "Construct toolbar for `mh-letter-mode'."
1812 (set-default symbol value)
1813 (setq mh-letter-tool-bar-map
1814 (let ((tool-bar-map (make-sparse-keymap)))
1815 ,@(nreverse letter-button-setter)
1816 tool-bar-map))))
1817 ;; XEmacs specific code
1818 (mh-do-in-xemacs
1819 (defvar mh-toolbar-folder-vector-map
1820 ',(loop for button in folder-buttons
1821 for vector in folder-vectors
1822 collect (cons button vector)))
1823 (defvar mh-toolbar-show-vector-map
1824 ',(loop for button in show-buttons
1825 for vector in show-vectors
1826 collect (cons button vector)))
1827 (defvar mh-toolbar-letter-vector-map
1828 ',(loop for button in letter-buttons
1829 for vector in letter-vectors
1830 collect (cons button vector)))
1831 (defvar mh-toolbar-folder-buttons nil)
1832 (defvar mh-toolbar-show-buttons nil)
1833 (defvar mh-toolbar-letter-buttons nil)
1834 ;; Custom setter functions
1835 (defun mh-tool-bar-letter-buttons-set (symbol value)
1836 (set-default symbol value)
1837 (when mh-xemacs-has-toolbar-flag
1838 (setq mh-toolbar-letter-buttons
1839 (loop for b in value
1840 collect (cdr (assoc b mh-toolbar-letter-vector-map))))))
1841 (defun mh-tool-bar-folder-buttons-set (symbol value)
1842 (set-default symbol value)
1843 (when mh-xemacs-has-toolbar-flag
1844 (setq mh-toolbar-folder-buttons
1845 (loop for b in value
1846 collect (cdr (assoc b mh-toolbar-folder-vector-map))))
1847 (setq mh-toolbar-show-buttons
1848 (loop for b in value
1849 collect (cdr (assoc b mh-toolbar-show-vector-map))))))
1850 ;; Initialize toolbar
1851 (defun mh-toolbar-init (mode)
1852 "Install toolbar in MODE."
1853 (let ((toolbar (cond ((eq mode :folder) mh-toolbar-folder-buttons)
1854 ((eq mode :letter) mh-toolbar-letter-buttons)
1855 ((eq mode :show) mh-toolbar-show-buttons)))
1856 (height 37)
1857 (width 40)
1858 (buffer (current-buffer)))
1859 (when (and mh-xemacs-toolbar-position mh-xemacs-use-toolbar-flag
1860 mh-xemacs-has-toolbar-flag)
1861 (cond
1862 ((eq mh-xemacs-toolbar-position 'top)
1863 (set-specifier top-toolbar toolbar buffer)
1864 (set-specifier top-toolbar-visible-p t)
1865 (set-specifier top-toolbar-height height))
1866 ((eq mh-xemacs-toolbar-position 'bottom)
1867 (set-specifier bottom-toolbar toolbar buffer)
1868 (set-specifier bottom-toolbar-visible-p t)
1869 (set-specifier bottom-toolbar-height height))
1870 ((eq mh-xemacs-toolbar-position 'left)
1871 (set-specifier left-toolbar toolbar buffer)
1872 (set-specifier left-toolbar-visible-p t)
1873 (set-specifier left-toolbar-width width))
1874 ((eq mh-xemacs-toolbar-position 'right)
1875 (set-specifier right-toolbar toolbar buffer)
1876 (set-specifier right-toolbar-visible-p t)
1877 (set-specifier right-toolbar-width width))
1878 (t (set-specifier default-toolbar toolbar buffer)))))))
1879 ;; Declare customizable toolbars
1880 (custom-declare-variable
1881 'mh-tool-bar-folder-buttons
1882 '(list ,@(mapcar (lambda (x) `(quote ,x)) folder-defaults))
1883 "Choose buttons to include in MH-E folder/show toolbar."
1884 :group 'mh-toolbar :set 'mh-tool-bar-folder-buttons-set
1885 :type '(set ,@(loop for x in folder-buttons
1886 for y in folder-docs
1887 collect `(const :tag ,y ,x))))
1888 (custom-declare-variable
1889 'mh-tool-bar-letter-buttons
1890 '(list ,@(mapcar (lambda (x) `(quote ,x)) letter-defaults))
1891 "Choose buttons to include in MH-E letter toolbar."
1892 :group 'mh-toolbar :set 'mh-tool-bar-letter-buttons-set
1893 :type '(set ,@(loop for x in letter-buttons
1894 for y in letter-docs
1895 collect `(const :tag ,y ,x)))))))
1897 (mh-tool-bar-define
1898 ((:folder mh-inc-folder mh-mime-save-parts mh-previous-undeleted-msg
1899 mh-page-msg mh-next-undeleted-msg mh-delete-msg mh-refile-msg
1900 mh-undo mh-execute-commands mh-toggle-tick mh-reply
1901 mh-alias-grab-from-field mh-send mh-rescan-folder
1902 mh-tool-bar-search mh-visit-folder
1903 mh-tool-bar-customize mh-tool-bar-folder-help mh-widen)
1904 (:letter mh-send-letter mh-compose-insertion ispell-message save-buffer
1905 undo kill-region menu-bar-kill-ring-save yank mh-fully-kill-draft
1906 mh-tool-bar-customize mh-tool-bar-letter-help))
1907 ;; Folder/Show buffer buttons
1908 (mh-inc-folder (folder) "mail"
1909 "Incorporate new mail in Inbox
1910 This button runs `mh-inc-folder' which drags any
1911 new mail into your Inbox folder.")
1912 (mh-mime-save-parts (folder) "attach"
1913 "Save MIME parts from this message
1914 This button runs `mh-mime-save-parts' which saves a message's
1915 different parts into separate files.")
1916 (mh-previous-undeleted-msg (folder) "left_arrow"
1917 "Go to the previous undeleted message
1918 This button runs `mh-previous-undeleted-msg'")
1919 (mh-page-msg (folder) "page-down"
1920 "Page the current message forwards\nThis button runs `mh-page-msg'")
1921 (mh-next-undeleted-msg (folder) "right_arrow"
1922 "Go to the next undeleted message\nThe button runs `mh-next-undeleted-msg'")
1923 (mh-delete-msg (folder) "close"
1924 "Mark this message for deletion\nThis button runs `mh-delete-msg'")
1925 (mh-refile-msg (folder) "refile"
1926 "Refile this message\nThis button runs `mh-refile-msg'")
1927 (mh-undo (folder) "undo" "Undo last operation\nThis button runs `undo'"
1928 (mh-outstanding-commands-p))
1929 (mh-execute-commands (folder) "execute"
1930 "Perform moves and deletes\nThis button runs `mh-execute-commands'"
1931 (mh-outstanding-commands-p))
1932 (mh-toggle-tick (folder) "highlight"
1933 "Toggle tick mark\nThis button runs `mh-toggle-tick'")
1934 (mh-toggle-showing (folder) "show"
1935 "Toggle showing message\nThis button runs `mh-toggle-showing'")
1936 (mh-tool-bar-reply-from (folder) "reply-from" "Reply to \"from\"")
1937 (mh-tool-bar-reply-to (folder) "reply-to" "Reply to \"to\"")
1938 (mh-tool-bar-reply-all (folder) "reply-all" "Reply to \"all\"")
1939 (mh-reply (folder) "mail/reply2"
1940 "Reply to this message\nThis button runs `mh-reply'")
1941 (mh-alias-grab-from-field (folder) "alias"
1942 "Grab From alias\nThis button runs `mh-alias-grab-from-field'"
1943 (and (mh-extract-from-header-value) (not (mh-alias-for-from-p))))
1944 (mh-send (folder) "mail_compose"
1945 "Compose new message\nThis button runs `mh-send'")
1946 (mh-rescan-folder (folder) "rescan"
1947 "Rescan this folder\nThis button runs `mh-rescan-folder'")
1948 (mh-pack-folder (folder) "repack"
1949 "Repack this folder\nThis button runs `mh-pack-folder'")
1950 (mh-tool-bar-search (folder) "search"
1951 "Search\nThis button runs `mh-tool-bar-search-function'")
1952 (mh-visit-folder (folder) "fld_open"
1953 "Visit other folder\nThis button runs `mh-visit-folder'")
1954 ;; Letter buffer buttons
1955 (mh-send-letter (letter) "mail_send" "Send this letter")
1956 (mh-compose-insertion (letter) "attach" "Insert attachment")
1957 (ispell-message (letter) "spell" "Check spelling")
1958 (save-buffer (letter) "save" "Save current buffer to its file"
1959 (buffer-modified-p))
1960 (undo (letter) "undo" "Undo last operation")
1961 (kill-region (letter) "cut"
1962 "Cut (kill) text in region between mark and current position")
1963 (menu-bar-kill-ring-save (letter) "copy"
1964 "Copy text in region between mark and current position")
1965 (yank (letter) "paste" "Paste (yank) text cut or copied earlier")
1966 (mh-fully-kill-draft (letter) "close" "Kill this draft")
1967 ;; Common buttons
1968 (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences")
1969 (mh-tool-bar-folder-help (folder) "help"
1970 "Help! (general help)\nThis button runs `info'")
1971 (mh-tool-bar-letter-help (letter) "help"
1972 "Help! (general help)\nThis button runs `info'")
1973 ;; Folder narrowed to sequence buttons
1974 (mh-widen (sequence) "widen"
1975 "Widen from the sequence\nThis button runs `mh-widen'"))
1979 ;;; Hooks (:group 'mh-hooks + group where hook described)
1981 (defcustom mail-citation-hook nil
1982 "*Hook for modifying a citation just inserted in the mail buffer.
1983 Each hook function can find the citation between point and mark.
1984 And each hook function should leave point and mark around the citation
1985 text as modified.
1987 If this hook is entirely empty (nil), the text of the message is inserted
1988 with `mh-ins-buf-prefix' prefixed to each line.
1990 See also the variable `mh-yank-from-start-of-msg', which controls how
1991 much of the message passed to the hook.
1993 This hook was historically provided to set up supercite. You may now leave
1994 this nil and set up supercite by setting the variable
1995 `mh-yank-from-start-of-msg' to 'supercite or, for more automatic insertion,
1996 to 'autosupercite.
1998 The hook 'trivial-cite is NOT part of Emacs. It is provided from tc.el,
1999 available here:
2000 http://shasta.cs.uiuc.edu/~lrclause/tc.html
2001 If you use it, customize `mh-yank-from-start-of-msg' to
2002 \"Entire message with headers\"."
2003 :type 'hook
2004 :options '(trivial-cite)
2005 :group 'mh-hooks
2006 :group 'mh-letter)
2008 (defcustom mh-alias-reloaded-hook nil
2009 "Invoked by `mh-alias-reload' after reloading aliases."
2010 :type 'hook
2011 :group 'mh-hooks
2012 :group 'mh-alias)
2014 (defcustom mh-before-quit-hook nil
2015 "Invoked by \\<mh-folder-mode-map>`\\[mh-quit]' before quitting MH-E.
2016 See also `mh-quit-hook'."
2017 :type 'hook
2018 :group 'mh-hooks
2019 :group 'mh-show)
2021 (defcustom mh-before-send-letter-hook nil
2022 "Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command."
2023 :type 'hook
2024 :group 'mh-hooks
2025 :group 'mh-letter)
2027 (defcustom mh-delete-msg-hook nil
2028 "Invoked after marking each message for deletion."
2029 :type 'hook
2030 :group 'mh-hooks
2031 :group 'mh-show)
2033 (defcustom mh-edit-mhn-hook nil
2034 "Invoked on the formatted letter by \\<mh-letter-mode-map>\\[mh-edit-mhn]."
2035 :type 'hook
2036 :group 'mh-hooks
2037 :group 'mh-letter)
2039 (defcustom mh-find-path-hook nil
2040 "Invoked by `mh-find-path' after reading the user's MH profile."
2041 :type 'hook
2042 :group 'mh-hooks
2043 :group 'mh-show)
2045 (defcustom mh-folder-mode-hook nil
2046 "Invoked in `mh-folder-mode' on a new folder."
2047 :type 'hook
2048 :group 'mh-hooks
2049 :group 'mh-show)
2051 (defcustom mh-folder-updated-hook nil
2052 "Invoked when the folder actions (such as moves and deletes) are performed.
2053 Variables that are useful in this hook include `mh-delete-list' and
2054 `mh-refile-list' which can be used to see which changes are being made to
2055 current folder, `mh-current-folder'."
2056 :type 'hook
2057 :group 'mh-hooks)
2059 (defcustom mh-forward-hook nil
2060 "Invoked on the forwarded letter by \\<mh-folder-mode-map>\\[mh-forward]."
2061 :type 'hook
2062 :group 'mh-hooks
2063 :group 'mh-folder)
2065 (defcustom mh-inc-folder-hook nil
2066 "Invoked by \\<mh-folder-mode-map>`\\[mh-inc-folder]' after incorporating mail into a folder."
2067 :type 'hook
2068 :group 'mh-hooks
2069 :group 'mh-inc)
2071 (defcustom mh-kill-folder-suppress-prompt-hook '(mh-index-p)
2072 "Invoked at the beginning of the \\<mh-folder-mode-map>`\\[mh-kill-folder]' command.
2073 This hook is a list of functions to be called, with no arguments, which should
2074 return a value of non-nil if you should not be asked if you're sure that you
2075 want to remove the folder. This is useful for folders that are easily
2076 regenerated.
2078 The default value of `mh-index-p' suppresses the prompt on folders generated
2079 by an index search.
2081 WARNING: Use this hook with care. If there is a bug in your hook which returns
2082 t on +inbox and you hit \\<mh-folder-mode-map>`\\[mh-kill-folder]' by accident
2083 in the +inbox buffer, you will not be happy."
2084 :type 'hook
2085 :group 'mh-hooks
2086 :group 'mh-show)
2088 (defcustom mh-letter-insert-signature-hook nil
2089 "Invoked after signature has been inserted.
2090 This hook may access the actual name of the file or the function used to
2091 insert the signature with `mh-signature-file-name'."
2092 :type 'hook
2093 :group 'mh-hooks
2094 :group 'mh-letter)
2096 (defcustom mh-letter-mode-hook nil
2097 "Invoked in `mh-letter-mode' on a new letter."
2098 :type 'hook
2099 :group 'mh-hooks
2100 :group 'mh-sending-mail)
2102 (defcustom mh-pick-mode-hook nil
2103 "Invoked upon entry to `mh-pick-mode'."
2104 :type 'hook
2105 :group 'mh-hooks
2106 :group 'mh-index)
2108 (defcustom mh-quit-hook nil
2109 "Invoked after \\<mh-folder-mode-map>`\\[mh-quit]' quits MH-E.
2110 See also `mh-before-quit-hook'."
2111 :type 'hook
2112 :group 'mh-hooks
2113 :group 'mh-show)
2115 (defcustom mh-refile-msg-hook nil
2116 "Invoked after marking each message for refiling."
2117 :type 'hook
2118 :group 'mh-hooks
2119 :group 'mh-show)
2121 (defcustom mh-show-hook nil
2122 "Invoked after \\<mh-folder-mode-map>`\\[mh-show]' shows a message."
2123 :type 'hook
2124 :group 'mh-hooks
2125 :group 'mh-show)
2127 (defcustom mh-show-mode-hook nil
2128 "Invoked upon entry to `mh-show-mode'."
2129 :type 'hook
2130 :group 'mh-hooks
2131 :group 'mh-show)
2133 (defcustom mh-unseen-updated-hook nil
2134 "Invoked after the unseen sequence has been updated.
2135 The variable `mh-seen-list' can be used to obtain the list of messages which
2136 will be removed from the unseen sequence."
2137 :type 'hook
2138 :group 'mh-hooks
2139 :group 'mh-show)
2143 ;;; Faces (:group 'mh-*-faces + group where faces described)
2145 ;;; Faces Used in Scan Listing (:group 'mh-folder-faces)
2147 (defvar mh-folder-body-face 'mh-folder-body-face
2148 "Face used to highlight body text in MH-Folder buffers.")
2149 (defface mh-folder-body-face
2150 '((((type tty) (class color)) (:foreground "green"))
2151 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
2152 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
2153 (((class color) (background light)) (:foreground "RosyBrown"))
2154 (((class color) (background dark)) (:foreground "LightSalmon"))
2155 (t (:italic t)))
2156 "Face used to highlight body text in MH-Folder buffers."
2157 :group 'mh-folder-faces)
2159 (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face
2160 "Face used for the current message line in MH-Folder buffers.")
2161 (defface mh-folder-cur-msg-face
2162 '((((type tty pc) (class color))
2163 (:background "LightGreen"))
2164 (((class color) (background light))
2165 (:background "LightGreen") ;Use this for solid background colour
2166 ;; (:underline t) ;Use this for underlining
2168 (((class color) (background dark))
2169 (:background "DarkOliveGreen4"))
2170 (t (:underline t)))
2171 "Face used for the current message line in MH-Folder buffers."
2172 :group 'mh-folder-faces)
2174 (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face
2175 "Face used to highlight the current message in MH-Folder buffers.")
2176 (defface mh-folder-cur-msg-number-face
2177 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
2178 (((class grayscale) (background light)) (:foreground "LightGray" :bold t))
2179 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
2180 (((class color) (background light)) (:foreground "Purple"))
2181 (((class color) (background dark)) (:foreground "Cyan"))
2182 (t (:bold t)))
2183 "Face used to highlight the current message in MH-Folder buffers."
2184 :group 'mh-folder-faces)
2186 (defvar mh-folder-date-face 'mh-folder-date-face
2187 "Face used to highlight the date in MH-Folder buffers.")
2188 (defface mh-folder-date-face
2189 '((((class color) (background light))
2190 (:foreground "snow4"))
2191 (((class color) (background dark))
2192 (:foreground "snow3"))
2194 (:bold t)))
2195 "Face used to highlight the date in MH-Folder buffers."
2196 :group 'mh-folder-faces)
2198 (defvar mh-folder-followup-face 'mh-folder-followup-face
2199 "Face used to highlight Re: subject text in MH-Folder buffers.")
2200 (defface mh-folder-followup-face
2201 '((((class color) (background light))
2202 (:foreground "blue3"))
2203 (((class color) (background dark))
2204 (:foreground "LightGoldenRod"))
2206 (:bold t)))
2207 "Face used to highlight Re: subject text in MH-Folder buffers."
2208 :group 'mh-folder-faces)
2210 (defvar mh-folder-msg-number-face 'mh-folder-msg-number-face
2211 "Face used to highlight the message number in MH-Folder buffers.")
2212 (defface mh-folder-msg-number-face
2213 '((((class color) (background light))
2214 (:foreground "snow4"))
2215 (((class color) (background dark))
2216 (:foreground "snow3"))
2218 (:bold t)))
2219 "Face used to highlight the message number in MH-Folder buffers."
2220 :group 'mh-folder-faces)
2222 (defvar mh-folder-deleted-face 'mh-folder-deleted-face
2223 "Face used to highlight deleted messages in MH-Folder buffers.")
2224 (copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face)
2226 (defvar mh-folder-refiled-face 'mh-folder-refiled-face
2227 "Face used to highlight refiled messages in MH-Folder buffers.")
2228 (defface mh-folder-refiled-face
2229 '((((type tty) (class color)) (:foreground "yellow" :weight light))
2230 (((class grayscale) (background light))
2231 (:foreground "Gray90" :bold t :italic t))
2232 (((class grayscale) (background dark))
2233 (:foreground "DimGray" :bold t :italic t))
2234 (((class color) (background light)) (:foreground "DarkGoldenrod"))
2235 (((class color) (background dark)) (:foreground "LightGoldenrod"))
2236 (t (:bold t :italic t)))
2237 "Face used to highlight refiled messages in MH-Folder buffers."
2238 :group 'mh-folder-faces)
2240 (defvar mh-folder-subject-face 'mh-folder-subject-face
2241 "Face used to highlight subject text in MH-Folder buffers.")
2242 (if (boundp 'facemenu-unlisted-faces)
2243 (add-to-list 'facemenu-unlisted-faces "^mh-folder"))
2244 (defface mh-folder-subject-face
2245 '((((class color) (background light))
2246 (:foreground "blue4"))
2247 (((class color) (background dark))
2248 (:foreground "yellow"))
2250 (:bold t)))
2251 "Face used to highlight subject text in MH-Folder buffers."
2252 :group 'mh-folder-faces)
2254 (defface mh-folder-tick-face
2255 '((((class color) (background dark)) (:background "#dddf7e"))
2256 (((class color) (background light)) (:background "#dddf7e"))
2257 (t (:underline t)))
2258 "Face used to show ticked messages."
2259 :group 'mh-folder-faces)
2261 (defvar mh-folder-address-face 'mh-folder-address-face
2262 "Face used to highlight the address in MH-Folder buffers.")
2263 (copy-face 'mh-folder-subject-face 'mh-folder-address-face)
2265 (defvar mh-folder-scan-format-face 'mh-folder-scan-format-face
2266 "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.")
2267 (copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face)
2269 (defvar mh-folder-to-face 'mh-folder-to-face
2270 "Face used to highlight the To: string in MH-Folder buffers.")
2271 (defface mh-folder-to-face
2272 '((((type tty) (class color)) (:foreground "green"))
2273 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
2274 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
2275 (((class color) (background light)) (:foreground "RosyBrown"))
2276 (((class color) (background dark)) (:foreground "LightSalmon"))
2277 (t (:italic t)))
2278 "Face used to highlight the To: string in MH-Folder buffers."
2279 :group 'mh-folder-faces)
2283 ;;; Faces Used in Searching (:group 'mh-index-faces)
2285 (defvar mh-index-folder-face 'mh-index-folder-face
2286 "Face used to highlight folders in MH-Index buffers.")
2287 (defface mh-index-folder-face
2288 '((((class color) (background light))
2289 (:foreground "dark green" :bold t))
2290 (((class color) (background dark))
2291 (:foreground "indian red" :bold t))
2293 (:bold t)))
2294 "Face used to highlight folders in MH-Index buffers."
2295 :group 'mh-index-faces)
2299 ;;; Faces Used in Message Drafts (:group 'mh-letter-faces)
2301 (defface mh-letter-header-field-face
2302 '((((class color) (background light))
2303 (:background "gray90"))
2304 (((class color) (background dark))
2305 (:background "gray10"))
2306 (t (:bold t)))
2307 "Face used to display header fields in draft buffers."
2308 :group 'mh-letter-faces)
2312 ;;; Faces Used in Message Display (:group 'mh-show-faces)
2314 (defvar mh-show-cc-face 'mh-show-cc-face
2315 "Face used to highlight cc: header fields.")
2316 (defface mh-show-cc-face
2317 '((((type tty) (class color)) (:foreground "yellow" :weight light))
2318 (((class grayscale) (background light))
2319 (:foreground "Gray90" :bold t :italic t))
2320 (((class grayscale) (background dark))
2321 (:foreground "DimGray" :bold t :italic t))
2322 (((class color) (background light)) (:foreground "DarkGoldenrod"))
2323 (((class color) (background dark)) (:foreground "LightGoldenrod"))
2324 (t (:bold t :italic t)))
2325 "Face used to highlight cc: header fields."
2326 :group 'mh-show-faces)
2328 (defvar mh-show-date-face 'mh-show-date-face
2329 "Face used to highlight the Date: header field.")
2330 (defface mh-show-date-face
2331 '((((type tty) (class color)) (:foreground "green"))
2332 (((class grayscale) (background light)) (:foreground "Gray90" :bold t))
2333 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
2334 (((class color) (background light)) (:foreground "ForestGreen"))
2335 (((class color) (background dark)) (:foreground "PaleGreen"))
2336 (t (:bold t :underline t)))
2337 "Face used to highlight the Date: header field."
2338 :group 'mh-show-faces)
2340 (defvar mh-show-header-face 'mh-show-header-face
2341 "Face used to deemphasize unspecified header fields.")
2342 (defface mh-show-header-face
2343 '((((type tty) (class color)) (:foreground "green"))
2344 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
2345 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
2346 (((class color) (background light)) (:foreground "RosyBrown"))
2347 (((class color) (background dark)) (:foreground "LightSalmon"))
2348 (t (:italic t)))
2349 "Face used to deemphasize unspecified header fields."
2350 :group 'mh-show-faces)
2352 (defvar mh-show-pgg-good-face 'mh-show-pgg-good-face
2353 "Face used to highlight a good PGG signature.")
2354 (defface mh-show-pgg-good-face
2355 '((t (:bold t :foreground "LimeGreen")))
2356 "Face used to highlight a good PGG signature."
2357 :group 'mh-show-faces)
2359 (defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown-face
2360 "Face used to highlight a PGG signature whose status is unknown.
2361 This face is also used for a signature when the signer is untrusted.")
2362 (defface mh-show-pgg-unknown-face
2363 '((t (:bold t :foreground "DarkGoldenrod2")))
2364 "Face used to highlight a PGG signature whose status is unknown.
2365 This face is also used for a signature when the signer is untrusted."
2366 :group 'mh-show-faces)
2368 (defvar mh-show-pgg-bad-face 'mh-show-pgg-bad-face
2369 "Face used to highlight a bad PGG signature.")
2370 (defface mh-show-pgg-bad-face
2371 '((t (:bold t :foreground "DeepPink1")))
2372 "Face used to highlight a bad PGG signature."
2373 :group 'mh-show-faces)
2375 (defface mh-show-signature-face
2376 '((t (:italic t)))
2377 "Face used to highlight the message signature."
2378 :group 'mh-show-faces)
2380 (defvar mh-show-to-face 'mh-show-to-face
2381 "Face used to highlight the To: header field.")
2382 (if (boundp 'facemenu-unlisted-faces)
2383 (add-to-list 'facemenu-unlisted-faces "^mh-show"))
2384 (defface mh-show-to-face
2385 '((((class grayscale) (background light))
2386 (:foreground "DimGray" :underline t))
2387 (((class grayscale) (background dark))
2388 (:foreground "LightGray" :underline t))
2389 (((class color) (background light)) (:foreground "SaddleBrown"))
2390 (((class color) (background dark)) (:foreground "burlywood"))
2391 (t (:underline t)))
2392 "Face used to highlight the To: header field."
2393 :group 'mh-show-faces)
2395 (defvar mh-show-from-face 'mh-show-from-face
2396 "Face used to highlight the From: header field.")
2397 (defface mh-show-from-face
2398 '((((class color) (background light))
2399 (:foreground "red3"))
2400 (((class color) (background dark))
2401 (:foreground "cyan"))
2403 (:bold t)))
2404 "Face used to highlight the From: header field."
2405 :group 'mh-show-faces)
2407 (defface mh-show-xface-face
2408 '((t (:foreground "black" :background "white")))
2409 "Face used to display the X-Face image.
2410 The background and foreground is used in the image."
2411 :group 'mh-show-faces)
2413 (defvar mh-show-subject-face 'mh-show-subject-face
2414 "Face used to highlight the Subject: header field.")
2415 (copy-face 'mh-folder-subject-face 'mh-show-subject-face)
2419 ;;; Faces Used in Speedbar (:group 'mh-speed-faces)
2421 (defface mh-speedbar-folder-face
2422 '((((class color) (background light))
2423 (:foreground "blue4"))
2424 (((class color) (background dark))
2425 (:foreground "light blue")))
2426 "Face used for folders in the speedbar buffer."
2427 :group 'mh-speed-faces)
2429 (defface mh-speedbar-selected-folder-face
2430 '((((class color) (background light))
2431 (:foreground "red1" :underline t))
2432 (((class color) (background dark))
2433 (:foreground "red1" :underline t))
2434 (t (:underline t)))
2435 "Face used for the current folder."
2436 :group 'mh-speed-faces)
2438 (defface mh-speedbar-folder-with-unseen-messages-face
2439 '((t (:inherit mh-speedbar-folder-face :bold t)))
2440 "Face used for folders in the speedbar buffer which have unread messages."
2441 :group 'mh-speed-faces)
2443 (defface mh-speedbar-selected-folder-with-unseen-messages-face
2444 '((t (:inherit mh-speedbar-selected-folder-face :bold t)))
2445 "Face used for the current folder when it has unread messages."
2446 :group 'mh-speed-faces)
2448 ;;; Local Variables:
2449 ;;; indent-tabs-mode: nil
2450 ;;; sentence-end-double-space: nil
2451 ;;; End:
2453 ;;; arch-tag: 778d2a20-82e2-4276-be9d-309386776a68
2454 ;;; mh-customize.el ends here