Fix cross references.
[emacs.git] / lisp / mh-e / mh-customize.el
blob566fbf60a7c36b2114de431676f6c34786f4a160
1 ;;; mh-customize.el --- MH-E customization
3 ;; Copyright (C) 2002 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 here. This
30 ;; makes it possible to customize modules that aren't loaded yet. It also
31 ;; 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. These are organized in a
38 ;; logical order. High-level, windows and toolbar, folder, message,
39 ;; composing and hooks.
41 ;; 2. MH-E Customization
43 ;; Here are the actual customization variables. There is a sub-section for
44 ;; each group in the MH-E Customization Groups section. Within each
45 ;; section, variables are sorted alphabetically. The manual section
46 ;; dictates which group a variable should be placed. New variables should
47 ;; be placed in the section where they would most likely be defined.
49 ;; All hooks should be placed in the 'mh-hook group; in addition, add the
50 ;; group in which the hook is defined in the manual (or, if it is new,
51 ;; where it would be defined). These two actions insures that the hooks
52 ;; appear last in each group.
54 ;; 3. Faces
56 ;;; Change Log:
58 ;; $Id: mh-customize.el,v 1.2 2003/02/03 20:55:30 wohler Exp $
60 ;;; Code:
61 (provide 'mh-customize)
62 (require 'mh-e)
64 ;;;###mh-autoload
65 (defun mh-customize (&optional delete-other-windows-flag)
66 "Customize MH-E variables.
67 With optional argument DELETE-OTHER-WINDOWS-FLAG, other windows in the frame
68 are removed."
69 (interactive "P")
70 (customize-group 'mh)
71 (when delete-other-windows-flag
72 (delete-other-windows)))
74 ;;; MH-E Customization Groups
76 (defgroup mh nil
77 "GNU Emacs interface to the MH mail system."
78 :link '(custom-manual "(mh-e)Top")
79 :group 'mail)
81 (defgroup mh-toolbar nil
82 "Toolbar configuration."
83 :prefix "mh-"
84 :group 'mh)
86 (defgroup mh-speed nil
87 "Speedbar and folder configuration."
88 :prefix "mh-"
89 :link '(custom-manual "(mh-e)Customizing Moving Mail")
90 :group 'mh)
92 (defgroup mh-folder nil
93 "Options for controlling scan listing."
94 :prefix "mh-"
95 :link '(custom-manual "(mh-e)Customizing Moving Mail")
96 :group 'mh)
98 (defgroup mh-show nil
99 "Message display."
100 :prefix "mh-"
101 :link '(custom-manual "(mh-e)Customizing Reading")
102 :group 'mh)
104 (defgroup mh-letter nil
105 "Composing messages."
106 :prefix "mh-"
107 :link '(custom-manual "(mh-e)Customizing Sending")
108 :group 'mh)
110 (defgroup mh-alias nil
111 "Alias handling."
112 :link '(custom-manual "(mh-e)Customizing mh-e")
113 :prefix "mh-alias-"
114 :group 'mh)
116 (defgroup mh-index nil
117 "Indexed searching."
118 :link '(custom-manual "(mh-e)Customizing mh-e")
119 :prefix "mh-"
120 :group 'mh)
122 (defgroup mh-identity nil
123 "Multiple personalities."
124 :link '(custom-manual "(mh-e)Customizing mh-e")
125 :prefix "mh-"
126 :group 'mh)
128 (defgroup mh-faces nil
129 "Faces used in MH-E."
130 :link '(custom-manual "(mh-e)Customizing mh-e")
131 :prefix "mh-"
132 :group 'faces
133 :group 'mh)
135 (defgroup mh-hooks nil
136 "MH-E hooks."
137 :link '(custom-manual "(mh-e)Customizing mh-e")
138 :prefix "mh-"
139 :group 'mh)
141 ;;; Faces
143 (defgroup mh-speed-faces nil
144 "Faces used in speedbar."
145 :link '(custom-manual "(mh-e)Customizing mh-e")
146 :prefix "mh-"
147 :group 'mh-faces
148 :group 'mh-speed)
150 (defgroup mh-folder-faces nil
151 "Faces used in scan listing."
152 :link '(custom-manual "(mh-e)Customizing mh-e")
153 :prefix "mh-"
154 :group 'mh-faces
155 :group 'mh-folder)
157 (defgroup mh-show-faces nil
158 "Faces used in message display."
159 :link '(custom-manual "(mh-e)Customizing mh-e")
160 :prefix "mh-"
161 :group 'mh-faces
162 :group 'mh-show)
164 (defgroup mh-index-faces nil
165 "Faces used in indexed searches."
166 :link '(custom-manual "(mh-e)Customizing mh-e")
167 :prefix "mh-"
168 :group 'mh-faces
169 :group 'mh-index)
173 ;;; MH-E Customization (:group mh)
175 ;;; Toolbar configuration (:group 'mh-toolbar)
177 (defconst mh-tool-bar-item-inc "Incorporate new mail in Inbox")
178 (defconst mh-tool-bar-item-save-mime "Save MIME parts")
179 (defconst mh-tool-bar-item-prev-msg "Previous message")
180 (defconst mh-tool-bar-item-page-msg "Page this message")
181 (defconst mh-tool-bar-item-next-msg "Next message")
182 (defconst mh-tool-bar-item-delete "Mark for deletion")
183 (defconst mh-tool-bar-item-refile "Refile this message")
184 (defconst mh-tool-bar-item-undo "Undo this mark")
185 (defconst mh-tool-bar-item-perform "Perform moves and deletes")
186 (defconst mh-tool-bar-item-toggle-show "Toggle showing message")
187 (defconst mh-tool-bar-item-reply-from "Reply to \"from\"")
188 (defconst mh-tool-bar-item-reply-to "Reply to \"to\"")
189 (defconst mh-tool-bar-item-reply-all "Reply to \"all\"")
190 (defconst mh-tool-bar-item-reply "Reply to this message")
191 (defconst mh-tool-bar-item-alias "Grab From alias")
192 (defconst mh-tool-bar-item-compose "Compose new message")
193 (defconst mh-tool-bar-item-rescan "Rescan this folder")
194 (defconst mh-tool-bar-item-repack "Repack this folder")
195 (defconst mh-tool-bar-item-search "Search")
196 (defconst mh-tool-bar-item-visit "Visit other folder")
197 (defconst mh-tool-bar-item-prefs "MH-E preferences")
198 (defconst mh-tool-bar-item-help "Help")
199 (defconst mh-tool-bar-item-widen "Widen from this sequence")
201 (defconst mh-tool-bar-item-send "Send this letter")
202 (defconst mh-tool-bar-item-attach "Insert attachment")
203 (defconst mh-tool-bar-item-spell "Check spelling")
204 (defconst mh-tool-bar-item-save "Save current buffer to its file")
205 (defconst mh-tool-bar-item-undo-op "Undo last operation")
206 (defconst mh-tool-bar-item-kill
207 "Cut (kill) text in region between mark and current position")
208 (defconst mh-tool-bar-item-copy
209 "Copy text in region between mark and current position")
210 (defconst mh-tool-bar-item-paste
211 "Paste (yank) text cut or copied earlier")
212 (defconst mh-tool-bar-item-kill-draft "Kill this draft")
213 (defconst mh-tool-bar-item-comp-prefs "MH-E composition preferences")
215 (defcustom mh-tool-bar-reply-3-buttons-flag nil
216 "*Non-nil means use three buttons for reply commands in tool-bar.
217 If you have room on your tool-bar because you are using a large font, you
218 may set this variable to expand the single reply button into three buttons
219 that won't lead to minibuffer prompt about who to reply to."
220 :type 'boolean
221 :group 'mh-toolbar)
223 (defcustom mh-tool-bar-search-function 'mh-search-folder
224 "*Function called by the tool-bar search button.
225 See `mh-search-folder' and `mh-index-search' for details."
226 :type '(choice (const mh-search-folder)
227 (const mh-index-search)
228 (function :tag "Other function"))
229 :group 'mh-toolbar)
231 (eval-when-compile (defvar tool-bar-map))
232 (defvar mh-show-tool-bar-map nil)
233 (defun mh-tool-bar-show-set ()
234 "Construct toolbar for `mh-show-mode'."
235 (when (fboundp 'tool-bar-add-item)
236 (setq
237 mh-show-tool-bar-map
238 (let ((tool-bar-map (make-sparse-keymap)))
239 (if (member mh-tool-bar-item-inc mh-tool-bar-folder-buttons)
240 (tool-bar-add-item "mail" 'mh-inc-folder 'mh-showtoolbar-inc-folder
241 :help mh-tool-bar-item-inc))
242 (if (member mh-tool-bar-item-save-mime mh-tool-bar-folder-buttons)
243 (tool-bar-add-item "attach" 'mh-mime-save-parts
244 'mh-showtoolbar-mime-save-parts
245 :help mh-tool-bar-item-save-mime))
246 (if (member mh-tool-bar-item-prev-msg mh-tool-bar-folder-buttons)
247 (tool-bar-add-item "left_arrow" 'mh-show-previous-undeleted-msg
248 'mh-showtoolbar-prev
249 :help mh-tool-bar-item-prev-msg))
250 (if (member mh-tool-bar-item-page-msg mh-tool-bar-folder-buttons)
251 (tool-bar-add-item "page-down" 'mh-show-page-msg 'mh-showtoolbar-page
252 :help mh-tool-bar-item-page-msg))
253 (if (member mh-tool-bar-item-next-msg mh-tool-bar-folder-buttons)
254 (tool-bar-add-item "right_arrow" 'mh-show-next-undeleted-msg
255 'mh-showtoolbar-next
256 :help mh-tool-bar-item-next-msg))
257 (if (member mh-tool-bar-item-delete mh-tool-bar-folder-buttons)
258 (tool-bar-add-item "close" 'mh-show-delete-msg
259 'mh-showtoolbar-delete
260 :help mh-tool-bar-item-delete))
261 (if (member mh-tool-bar-item-refile mh-tool-bar-folder-buttons)
262 (tool-bar-add-item "refile" 'mh-show-refile-msg
263 'mh-showtoolbar-refile
264 :help mh-tool-bar-item-refile))
265 (if (member mh-tool-bar-item-undo mh-tool-bar-folder-buttons)
266 (tool-bar-add-item "undo" 'mh-show-undo 'mh-showtoolbar-undo
267 :help mh-tool-bar-item-undo))
268 (if (member mh-tool-bar-item-perform mh-tool-bar-folder-buttons)
269 (tool-bar-add-item "execute" 'mh-show-execute-commands
270 'mh-showtoolbar-exec
271 :help mh-tool-bar-item-perform))
272 (if (member mh-tool-bar-item-toggle-show mh-tool-bar-folder-buttons)
273 (tool-bar-add-item "show" 'mh-show-toggle-showing
274 'mh-showtoolbar-toggle-show
275 :help mh-tool-bar-item-toggle-show))
276 (if (member mh-tool-bar-item-reply-from mh-tool-bar-folder-buttons)
277 (tool-bar-add-item "reply-from"
278 (lambda (&optional arg)
279 (interactive "P")
280 (set-buffer mh-show-folder-buffer)
281 (mh-reply (mh-get-msg-num nil) "from" arg))
282 'mh-showtoolbar-reply-from
283 :help mh-tool-bar-item-reply-from))
284 (if (member mh-tool-bar-item-reply-to mh-tool-bar-folder-buttons)
285 (tool-bar-add-item "reply-to"
286 (lambda (&optional arg)
287 (interactive "P")
288 (set-buffer mh-show-folder-buffer)
289 (mh-reply (mh-get-msg-num nil) "to" arg))
290 'mh-showtoolbar-reply-to
291 :help mh-tool-bar-item-reply-to))
292 (if (member mh-tool-bar-item-reply-all mh-tool-bar-folder-buttons)
293 (tool-bar-add-item "reply-all"
294 (lambda (&optional arg)
295 (interactive "P")
296 (set-buffer mh-show-folder-buffer)
297 (mh-reply (mh-get-msg-num nil) "all" arg))
298 'mh-showtoolbar-reply-all
299 :help mh-tool-bar-item-reply-all))
300 (if (member mh-tool-bar-item-reply mh-tool-bar-folder-buttons)
301 (tool-bar-add-item "mail/reply2" 'mh-show-reply
302 'mh-showtoolbar-reply
303 :help mh-tool-bar-item-reply))
304 (if (member mh-tool-bar-item-alias mh-tool-bar-folder-buttons)
305 (tool-bar-add-item "alias" 'mh-alias-grab-from-field
306 'mh-showtoolbar-alias
307 :help mh-tool-bar-item-alias
308 :enable '(mh-alias-from-has-no-alias-p)))
309 (if (member mh-tool-bar-item-compose mh-tool-bar-folder-buttons)
310 (tool-bar-add-item "mail_compose" 'mh-send 'mh-showtoolbar-compose
311 :help mh-tool-bar-item-compose))
312 (if (member mh-tool-bar-item-rescan mh-tool-bar-folder-buttons)
313 (tool-bar-add-item "rescan" 'mh-show-rescan-folder
314 'mh-showtoolbar-rescan
315 :help mh-tool-bar-item-rescan))
316 (if (member mh-tool-bar-item-repack mh-tool-bar-folder-buttons)
317 (tool-bar-add-item "repack" 'mh-show-pack-folder
318 'mh-showtoolbar-pack
319 :help mh-tool-bar-item-repack))
320 (if (member mh-tool-bar-item-search mh-tool-bar-folder-buttons)
321 (tool-bar-add-item "search"
322 (lambda (&optional arg)
323 (interactive "P")
324 (call-interactively
325 mh-tool-bar-search-function))
326 'mh-showtoolbar-search
327 :help mh-tool-bar-item-search))
328 (if (member mh-tool-bar-item-visit mh-tool-bar-folder-buttons)
329 (tool-bar-add-item "fld_open" 'mh-visit-folder
330 'mh-showtoolbar-visit
331 :help mh-tool-bar-item-visit))
332 (if (member mh-tool-bar-item-prefs mh-tool-bar-folder-buttons)
333 (tool-bar-add-item "preferences" (lambda ()
334 (interactive)
335 (mh-customize t))
336 'mh-showtoolbar-customize
337 :help mh-tool-bar-item-prefs))
338 (if (member mh-tool-bar-item-help mh-tool-bar-folder-buttons)
339 (tool-bar-add-item "help" (lambda ()
340 (interactive)
341 (Info-goto-node "(mh-e)Top")
342 (delete-other-windows))
343 'mh-showtoolbar-help
344 :help mh-tool-bar-item-help))
345 tool-bar-map))))
347 (defvar mh-letter-tool-bar-map nil)
348 ;;;###mh-autoload
349 (defun mh-tool-bar-letter-set ()
350 "Construct toolbar for `mh-letter-mode'."
351 (when (fboundp 'tool-bar-add-item)
352 (setq
353 mh-letter-tool-bar-map
354 (let ((tool-bar-map (make-sparse-keymap)))
355 (if (member mh-tool-bar-item-send mh-tool-bar-letter-buttons)
356 (tool-bar-add-item "mail_send" 'mh-send-letter
357 'mh-lettertoolbar-send
358 :help mh-tool-bar-item-send))
359 (if (member mh-tool-bar-item-attach mh-tool-bar-letter-buttons)
360 (tool-bar-add-item "attach" 'mh-compose-insertion
361 'mh-lettertoolbar-compose
362 :help mh-tool-bar-item-attach))
363 (if (member mh-tool-bar-item-spell mh-tool-bar-letter-buttons)
364 (tool-bar-add-item "spell" 'ispell-message 'mh-lettertoolbar-ispell
365 :help mh-tool-bar-item-spell))
366 (if (member mh-tool-bar-item-save mh-tool-bar-letter-buttons)
367 (tool-bar-add-item-from-menu 'save-buffer "save"))
368 (if (member mh-tool-bar-item-undo-op mh-tool-bar-letter-buttons)
369 (tool-bar-add-item-from-menu 'undo "undo"))
370 (if (member mh-tool-bar-item-kill mh-tool-bar-letter-buttons)
371 (tool-bar-add-item-from-menu 'kill-region "cut"))
372 (if (member mh-tool-bar-item-copy mh-tool-bar-letter-buttons)
373 (tool-bar-add-item-from-menu 'menu-bar-kill-ring-save "copy"))
374 (if (member mh-tool-bar-item-paste mh-tool-bar-letter-buttons)
375 (tool-bar-add-item-from-menu 'yank "paste"))
376 (if (member mh-tool-bar-item-kill-draft mh-tool-bar-letter-buttons)
377 (tool-bar-add-item "close" 'mh-fully-kill-draft
378 'mh-lettertoolbar-kill
379 :help mh-tool-bar-item-kill-draft))
380 (if (member mh-tool-bar-item-comp-prefs mh-tool-bar-letter-buttons)
381 (tool-bar-add-item "preferences" (lambda ()
382 (interactive)
383 (mh-customize t))
384 'mh-lettertoolbar-customize
385 :help mh-tool-bar-item-comp-prefs))
386 (if (member mh-tool-bar-item-help mh-tool-bar-letter-buttons)
387 (tool-bar-add-item "help" (lambda ()
388 (interactive)
389 (Info-goto-node "(mh-e)Draft Editing")
390 (delete-other-windows))
391 'mh-lettertoolbar-help
392 :help mh-tool-bar-item-help))
393 tool-bar-map))))
395 (defvar mh-folder-tool-bar-map nil)
396 (defvar mh-folder-seq-tool-bar-map nil
397 "Tool-bar to use when narrowed to a sequence in MH-Folder buffers.")
398 ;;;###mh-autoload
399 (defun mh-tool-bar-folder-set ()
400 "Construct toolbar for `mh-folder-mode'."
401 (when (fboundp 'tool-bar-add-item)
402 (setq
403 mh-folder-tool-bar-map
404 (let ((tool-bar-map (make-sparse-keymap)))
405 (if (member mh-tool-bar-item-inc mh-tool-bar-folder-buttons)
406 (tool-bar-add-item "mail" 'mh-inc-folder
407 'mh-foldertoolbar-inc-folder
408 :help mh-tool-bar-item-inc))
409 (if (member mh-tool-bar-item-save-mime mh-tool-bar-folder-buttons)
410 (tool-bar-add-item "attach" 'mh-mime-save-parts
411 'mh-foldertoolbar-mime-save-parts
412 :help mh-tool-bar-item-save-mime))
413 (if (member mh-tool-bar-item-prev-msg mh-tool-bar-folder-buttons)
414 (tool-bar-add-item "left_arrow" 'mh-previous-undeleted-msg
415 'mh-foldertoolbar-prev
416 :help mh-tool-bar-item-prev-msg))
417 (if (member mh-tool-bar-item-page-msg mh-tool-bar-folder-buttons)
418 (tool-bar-add-item "page-down" 'mh-page-msg 'mh-foldertoolbar-page
419 :help mh-tool-bar-item-page-msg))
420 (if (member mh-tool-bar-item-next-msg mh-tool-bar-folder-buttons)
421 (tool-bar-add-item "right_arrow" 'mh-next-undeleted-msg
422 'mh-foldertoolbar-next
423 :help mh-tool-bar-item-next-msg))
424 (if (member mh-tool-bar-item-delete mh-tool-bar-folder-buttons)
425 (tool-bar-add-item "close" 'mh-delete-msg 'mh-foldertoolbar-delete
426 :help mh-tool-bar-item-delete))
427 (if (member mh-tool-bar-item-refile mh-tool-bar-folder-buttons)
428 (tool-bar-add-item "refile" 'mh-refile-msg 'mh-foldertoolbar-refile
429 :help mh-tool-bar-item-refile))
430 (if (member mh-tool-bar-item-undo mh-tool-bar-folder-buttons)
431 (tool-bar-add-item "undo" 'mh-undo 'mh-foldertoolbar-undo
432 :help mh-tool-bar-item-undo))
433 (if (member mh-tool-bar-item-perform mh-tool-bar-folder-buttons)
434 (tool-bar-add-item "execute" 'mh-execute-commands
435 'mh-foldertoolbar-exec
436 :help mh-tool-bar-item-perform))
437 (if (member mh-tool-bar-item-toggle-show mh-tool-bar-folder-buttons)
438 (tool-bar-add-item "show" 'mh-toggle-showing
439 'mh-foldertoolbar-toggle-show
440 :help mh-tool-bar-item-toggle-show))
441 (if (member mh-tool-bar-item-reply-from mh-tool-bar-folder-buttons)
442 (tool-bar-add-item "reply-from"
443 (lambda (&optional arg)
444 (interactive "P")
445 (mh-reply (mh-get-msg-num nil) "from" arg))
446 'mh-foldertoolbar-reply-from
447 :help mh-tool-bar-item-reply-from))
448 (if (member mh-tool-bar-item-reply-to mh-tool-bar-folder-buttons)
449 (tool-bar-add-item "reply-to"
450 (lambda (&optional arg)
451 (interactive "P")
452 (mh-reply (mh-get-msg-num nil) "to" arg))
453 'mh-foldertoolbar-reply-to
454 :help mh-tool-bar-item-reply-to))
455 (if (member mh-tool-bar-item-reply-all mh-tool-bar-folder-buttons)
456 (tool-bar-add-item "reply-all"
457 (lambda (&optional arg)
458 (interactive "P")
459 (mh-reply (mh-get-msg-num nil) "all" arg))
460 'mh-foldertoolbar-reply-all
461 :help mh-tool-bar-item-reply-all))
462 (if (member mh-tool-bar-item-reply mh-tool-bar-folder-buttons)
463 (tool-bar-add-item "mail/reply2" 'mh-reply
464 'mh-foldertoolbar-reply
465 :help mh-tool-bar-item-reply))
466 (if (member mh-tool-bar-item-alias mh-tool-bar-folder-buttons)
467 (tool-bar-add-item "alias" 'mh-alias-grab-from-field
468 'mh-foldertoolbar-alias
469 :help mh-tool-bar-item-alias
470 :enable '(mh-alias-from-has-no-alias-p)))
471 (if (member mh-tool-bar-item-compose mh-tool-bar-folder-buttons)
472 (tool-bar-add-item "mail_compose" 'mh-send 'mh-foldertoolbar-compose
473 :help mh-tool-bar-item-compose))
474 (if (member mh-tool-bar-item-rescan mh-tool-bar-folder-buttons)
475 (tool-bar-add-item "rescan" 'mh-rescan-folder
476 'mh-foldertoolbar-rescan
477 :help mh-tool-bar-item-rescan))
478 (if (member mh-tool-bar-item-repack mh-tool-bar-folder-buttons)
479 (tool-bar-add-item "repack" 'mh-pack-folder 'mh-foldertoolbar-pack
480 :help mh-tool-bar-item-repack))
481 (if (member mh-tool-bar-item-search mh-tool-bar-folder-buttons)
482 (tool-bar-add-item "search"
483 (lambda (&optional arg)
484 (interactive "P")
485 (call-interactively
486 mh-tool-bar-search-function))
487 'mh-foldertoolbar-search
488 :help mh-tool-bar-item-search))
489 (if (member mh-tool-bar-item-visit mh-tool-bar-folder-buttons)
490 (tool-bar-add-item "fld_open" 'mh-visit-folder
491 'mh-foldertoolbar-visit
492 :help mh-tool-bar-item-visit))
493 (if (member mh-tool-bar-item-prefs mh-tool-bar-folder-buttons)
494 (tool-bar-add-item "preferences" (lambda ()
495 (interactive)
496 (mh-customize t))
497 'mh-foldertoolbar-customize
498 :help mh-tool-bar-item-prefs))
499 (if (member mh-tool-bar-item-help mh-tool-bar-folder-buttons)
500 (tool-bar-add-item "help" (lambda ()
501 (interactive)
502 (Info-goto-node "(mh-e)Top")
503 (delete-other-windows))
504 'mh-foldertoolbar-help
505 :help mh-tool-bar-item-help))
506 tool-bar-map))
508 (setq mh-folder-seq-tool-bar-map
509 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map)))
510 (if (member mh-tool-bar-item-widen mh-tool-bar-folder-buttons)
511 (tool-bar-add-item "widen" 'mh-widen 'mh-foldertoolbar-widen
512 :help mh-tool-bar-item-widen))
513 tool-bar-map))))
515 (defun mh-tool-bar-folder-buttons-set (symbol value)
516 "Update the `mh-tool-bar-folder-buttons' variable, and rebuild the tool-bar.
517 Sets the default for SYMBOL (e.g. `mh-tool-bar-folder-buttons') to VALUE (as
518 set in customization). This is called after 'customize is used to alter
519 `mh-tool-bar-folder-buttons'."
520 (set-default symbol value)
521 (mh-tool-bar-show-set)
522 (mh-tool-bar-folder-set))
524 (custom-declare-variable
525 'mh-tool-bar-folder-buttons
526 '(append
527 (list mh-tool-bar-item-inc
528 mh-tool-bar-item-save-mime
529 mh-tool-bar-item-prev-msg
530 mh-tool-bar-item-page-msg
531 mh-tool-bar-item-next-msg
532 mh-tool-bar-item-delete
533 mh-tool-bar-item-refile
534 mh-tool-bar-item-undo
535 mh-tool-bar-item-perform
536 ;;; mh-tool-bar-item-toggle-show
538 (if mh-tool-bar-reply-3-buttons-flag
539 (list mh-tool-bar-item-reply-from
540 mh-tool-bar-item-reply-to
541 mh-tool-bar-item-reply-all)
542 (list mh-tool-bar-item-reply))
543 (list mh-tool-bar-item-alias
544 mh-tool-bar-item-compose
545 mh-tool-bar-item-rescan
546 ;;; mh-tool-bar-item-repack
547 mh-tool-bar-item-search
548 mh-tool-bar-item-visit
549 mh-tool-bar-item-prefs
550 mh-tool-bar-item-help
551 mh-tool-bar-item-widen))
552 "Buttons to include in MH-E folder/show toolbar."
553 :group 'mh-toolbar
554 :set 'mh-tool-bar-folder-buttons-set
555 :type `(set (const ,mh-tool-bar-item-inc)
556 (const ,mh-tool-bar-item-save-mime)
557 (const ,mh-tool-bar-item-prev-msg)
558 (const ,mh-tool-bar-item-page-msg)
559 (const ,mh-tool-bar-item-next-msg)
560 (const ,mh-tool-bar-item-delete)
561 (const ,mh-tool-bar-item-refile)
562 (const ,mh-tool-bar-item-undo)
563 (const ,mh-tool-bar-item-perform)
564 (const ,mh-tool-bar-item-toggle-show)
565 (const ,mh-tool-bar-item-reply-from)
566 (const ,mh-tool-bar-item-reply-to)
567 (const ,mh-tool-bar-item-reply-all)
568 (const ,mh-tool-bar-item-reply)
569 (const ,mh-tool-bar-item-alias)
570 (const ,mh-tool-bar-item-compose)
571 (const ,mh-tool-bar-item-rescan)
572 (const ,mh-tool-bar-item-repack)
573 (const ,mh-tool-bar-item-search)
574 (const ,mh-tool-bar-item-visit)
575 (const ,mh-tool-bar-item-prefs)
576 (const ,mh-tool-bar-item-help)
577 (const ,mh-tool-bar-item-widen)))
579 (defun mh-tool-bar-letter-buttons-set (symbol value)
580 "Update the `mh-tool-bar-letter-buttons' variable, and rebuild the tool-bar.
581 Sets the default for SYMBOL (e.g. `mh-tool-bar-letter-buttons') to VALUE (as
582 set in customization). This is called after 'customize is used to alter
583 `mh-tool-bar-letter-buttons'."
584 (set-default symbol value)
585 (mh-tool-bar-letter-set))
587 (custom-declare-variable
588 'mh-tool-bar-letter-buttons
589 '(list mh-tool-bar-item-send
590 mh-tool-bar-item-attach
591 mh-tool-bar-item-spell
592 mh-tool-bar-item-save
593 mh-tool-bar-item-undo-op
594 mh-tool-bar-item-kill
595 mh-tool-bar-item-copy
596 mh-tool-bar-item-paste
597 mh-tool-bar-item-kill-draft
598 mh-tool-bar-item-comp-prefs
599 mh-tool-bar-item-help)
600 "Buttons to include in MH-E letter toolbar."
601 :group 'mh-toolbar
602 :set 'mh-tool-bar-letter-buttons-set
603 :type `(set (const ,mh-tool-bar-item-send)
604 (const ,mh-tool-bar-item-attach)
605 (const ,mh-tool-bar-item-spell)
606 (const ,mh-tool-bar-item-save)
607 (const ,mh-tool-bar-item-undo-op)
608 (const ,mh-tool-bar-item-kill)
609 (const ,mh-tool-bar-item-copy)
610 (const ,mh-tool-bar-item-paste)
611 (const ,mh-tool-bar-item-kill-draft)
612 (const ,mh-tool-bar-item-comp-prefs)
613 (const ,mh-tool-bar-item-help)))
617 ;;; Speedbar and folder configuration (:group 'mh-speed)
619 (defcustom mh-large-folder 200
620 "The number of messages that indicates a large folder.
621 If a folder is deemed to be large, that is the number of messages in it exceed
622 this value, then confirmation is needed when it is visited. Even when
623 `mh-show-threads-flag' is non-nil, the folder is not automatically threaded, if
624 it is large. If set to nil all folders are treated as if they are small."
625 :type '(choice (const :tag "No limit") integer)
626 :group 'mh-speed)
628 (defcustom mh-speed-flists-interval 60
629 "Time between calls to flists in seconds.
630 If 0, flists is not called repeatedly."
631 :type 'integer
632 :group 'mh-speed)
634 (defcustom mh-speed-run-flists-flag t
635 "Non-nil means flists is used.
636 If non-nil, flists is executed every `mh-speed-flists-interval' seconds to
637 update the display of the number of unseen and total messages in each folder.
638 If resources are limited, this can be set to nil and the speedbar display can
639 be updated manually with the \\[mh-speed-flists] command."
640 :type 'boolean
641 :group 'mh-speed)
645 ;;; Options for controlling scan listing (:group 'mh-folder)
647 (defcustom mh-adaptive-cmd-note-flag t
648 "*Non-nil means that the message number width is determined dynamically.
649 This is done once when a folder is first opened by running scan on the last
650 message of the folder. The message number for the last message is extracted
651 and its width calculated. This width is used when calling `mh-set-cmd-note'.
653 If you prefer fixed-width message numbers, set this variable to nil and call
654 `mh-set-cmd-note' with the width specified by the scan format in
655 `mh-scan-format-file'. For example, the default width is 4, so you would use
656 \"(mh-set-cmd-note 4)\" if `mh-scan-format-file' were nil."
657 :type 'boolean
658 :group 'mh-folder)
660 (defcustom mh-default-folder-list nil
661 "*Alist of addresses and folders.
662 When refiling messages, these folders are the default that is provided if the
663 sender has the associated address. You do not need to list your aliases here
664 as that lookup is already performed.
665 See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more
666 information."
667 :type '(repeat (list (string :tag "Address")
668 (string :tag "Folder")))
669 :group 'mh-folder)
671 (defcustom mh-default-folder-must-exist-flag t
672 "*Non-nil means guessed folder name must exist to be used.
673 If this variable is t, then the guessed name is only used if the folder
674 already exists\; if the folder doesn't exist, then the last folder name used
675 is suggested. This is useful if you get mail from various people for whom you
676 have an alias, but file them all in the same project folder.
677 See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more
678 information."
679 :type 'boolean
680 :group 'mh-folder)
682 (defcustom mh-default-folder-prefix ""
683 "*Prefix used for guessed folder names.
684 This can be used to put folders associated with your aliases in a sub-folder
685 so as to not clutter your mail directory.
686 See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more
687 information."
688 :type 'string
689 :group 'mh-folder)
691 (defcustom mh-inc-prog "inc"
692 "*Program to run to incorporate new mail into a folder.
693 Normally \"inc\". This file is searched for relative to
694 the `mh-progs' directory unless it is an absolute pathname."
695 :type 'string
696 :group 'mh-folder)
698 (defcustom mh-lpr-command-format "lpr -J '%s'"
699 "*Format for Unix command that prints a message.
700 The string should be a Unix command line, with the string '%s' where
701 the job's name (folder and message number) should appear. The formatted
702 message text is piped to this command when you type \\<mh-folder-mode-map>`\\[mh-print-msg]'."
703 :type 'string
704 :group 'mh-folder)
706 (defcustom mh-mime-save-parts-default-directory t
707 "Default directory to use for `mh-mime-save-parts'.
708 If nil, prompt and set for next time the command is used during same session.
709 If t, prompt always"
710 :type '(choice (const :tag "Prompt the first time" nil)
711 (const :tag "Prompt always" t)
712 directory)
713 :group 'mh-folder)
715 (defcustom mh-recenter-summary-flag nil
716 "*Non-nil means to recenter the summary window.
717 Recenter the summary window when the show window is toggled off if non-nil."
718 :type 'boolean
719 :group 'mh-folder)
721 (defcustom mh-print-background-flag nil
722 "*Non-nil means messages should be printed in the background.
723 WARNING: do not delete the messages until printing is finished;
724 otherwise, your output may be truncated."
725 :type 'boolean
726 :group 'mh-folder)
728 (defcustom mh-recursive-folders-flag nil
729 "*Non-nil means that commands which operate on folders do so recursively."
730 :type 'boolean
731 :group 'mh-folder)
733 (defcustom mh-scan-format-file t
734 "Specifies the format file to pass to the scan program.
735 If t, the format string will be taken from the either `mh-scan-format-mh'
736 or `mh-scan-format-nmh' depending on whether MH or nmh is in use.
737 If nil, the default scan output will be used.
739 If you customize the scan format, you may need to modify a few variables
740 containing regexps that MH-E uses to identify specific portions of the output.
741 Use `M-x apropos RET mh-scan.*regexp' to obtain a list of these variables. You
742 may also have to call `mh-set-cmd-note' with the width of your message
743 numbers. See also `mh-adaptive-cmd-note-flag'."
744 :type '(choice (const :tag "Use MH-E scan format" t)
745 (const :tag "Use default scan format" nil)
746 (file :tag "Specify a scan format file"))
747 :group 'mh-folder)
749 (defcustom mh-scan-prog "scan"
750 "*Program to run to generate one-line-per-message listing of a folder.
751 Normally \"scan\" or a file name linked to scan. This file is searched
752 for relative to the `mh-progs' directory unless it is an absolute pathname."
753 :type 'string
754 :group 'mh-folder)
755 (make-variable-buffer-local 'mh-scan-prog)
757 (defcustom mh-show-threads-flag nil
758 "Non-nil means new folders start in threaded mode.
759 Threading large number of messages can be time consuming. So if the flag is
760 non-nil then threading will be done only if the number of messages being
761 threaded is less than `mh-large-folder'."
762 :type 'boolean
763 :group 'mh-folder)
765 (defcustom mh-store-default-directory nil
766 "*Last directory used by \\[mh-store-msg]; default for next store.
767 A directory name string, or nil to use current directory."
768 :type '(choice (const :tag "Current" nil)
769 directory)
770 :group 'mh-folder)
772 (defcustom mh-update-sequences-after-mh-show-flag t
773 "*Non-nil means `mh-update-sequence' is called from `mh-show-mode'.
774 If set, `mh-update-sequence' is run every time a message is shown, telling
775 MH or nmh that this is your current message. It's useful, for example, to
776 display MIME content using \"M-! mhshow RET\""
777 :type 'boolean
778 :group 'mh-folder)
782 ;;; Message display (:group 'mh-show)
784 (defcustom mh-bury-show-buffer-flag t
785 "*Non-nil means that the displayed show buffer for a folder is buried."
786 :type 'boolean
787 :group 'mh-show)
789 (defcustom mh-clean-message-header-flag t
790 "*Non-nil means clean headers of messages that are displayed or inserted.
791 The variables `mh-invisible-headers' and `mh-visible-headers' control
792 what is removed."
793 :type 'boolean
794 :group 'mh-show)
796 (defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode")))
797 "*Non-nil means that Gnus is used to show MIME attachments with Gnus."
798 :type 'boolean
799 :group 'mh-show)
801 (defcustom mh-decode-content-transfer-encoded-message-flag
802 (and (fboundp 'executable-find) (executable-find "mimencode") t)
803 "Non-nil means decode messages with `mimencode', if necessary.
805 Messages which are encoded as quoted-printable or base64 are translated into
806 8-bit characters by the `mimencode' command.
808 This variable is initialized to t if `mimencode' is available.
810 The `mimencode' program is part of the metamail package. The source can be
811 obtained from
812 ftp://thumper.bellcore.com/pub/nsb/"
813 :type 'boolean
814 :group 'mh-show)
816 (defcustom mh-display-buttons-for-inline-parts-flag nil
817 "*Non-nil means display buttons for all inline MIME parts.
818 If non-nil, buttons are displayed for all MIME parts. Inline parts start off
819 in displayed state but they can be hidden by clicking the button. If nil no
820 buttons are shown for inline parts."
821 :type 'boolean
822 :group 'mh-show)
824 (defcustom mh-do-not-confirm-flag nil
825 "*Non-nil means do not prompt for confirmation.
826 Commands such as `mh-pack-folder' prompt to confirm whether to process
827 outstanding moves and deletes or not before continuing. A non-nil setting will
828 perform the action--which is usually desired but cannot be retracted--without
829 question."
830 :type 'boolean
831 :group 'mh-show)
833 (defcustom mh-graphical-smileys-flag t
834 "*Non-nil means graphical smileys are displayed.
835 Non-nil means that small graphics will be used in the show buffer instead of
836 patterns like :-), ;-) etc. The setting only has effect if
837 `mh-decode-mime-flag' is non-nil."
838 :type 'boolean
839 :group 'mh-show)
841 (defcustom mh-graphical-emphasis-flag t
842 "*Non-nil means graphical emphasis is displayed.
843 Non-nil means that _underline_ will be underlined, *bold* will appear in bold,
844 /italic/ will appear in italic etc. See `gnus-emphasis-alist' for the whole
845 list. The setting only has effect if `mh-decode-mime-flag' is non-nil."
846 :type 'boolean
847 :group 'mh-show)
849 (defcustom mh-highlight-citation-p 'gnus
850 "How to highlight citations in show buffers.
851 The gnus method uses a different color for each indentation."
852 :type '(choice (const :tag "Use Gnus" gnus)
853 (const :tag "Use font-lock" font-lock)
854 (const :tag "Don't fontify" nil))
855 :group 'mh-show)
857 (defcustom mh-max-inline-image-height nil
858 "*Maximum inline image height if Content-Disposition is not present.
859 If nil, image will be displayed if its height is smaller than the height of
860 the window."
861 :type '(choice (const nil) integer)
862 :group 'mh-show)
864 (defcustom mh-max-inline-image-width nil
865 "*Maximum inline image width if Content-Disposition is not present.
866 If nil, image will be displayed if its width is smaller than the width of the
867 window."
868 :type '(choice (const nil) integer)
869 :group 'mh-show)
871 (defcustom mh-show-maximum-size 0
872 "*Maximum size of message (in bytes) to display automatically.
873 Provides an opportunity to skip over large messages which may be slow to load.
874 Use a value of 0 to display all messages automatically regardless of size."
875 :type 'integer
876 :group 'mh-show)
878 ;; Use goto-addr if it was already loaded (which probably sets this
879 ;; variable to t), or if this variable is otherwise set to t.
880 (defcustom mh-show-use-goto-addr-flag (and (boundp 'goto-address-highlight-p)
881 goto-address-highlight-p)
882 "*Non-nil means highlight URLs and email addresses.
883 The `goto-addr' module is used."
884 :type 'boolean
885 :group 'mh-show)
887 (defcustom mh-show-use-xface-flag
888 (and window-system
889 (not (null (cond
890 (mh-xemacs-flag
891 (locate-library "x-face"))
892 ((>= emacs-major-version 21)
893 (locate-library "x-face-e21"))
894 (t ;Emacs20
895 nil))))
896 (not (null (and (fboundp 'executable-find)
897 (executable-find
898 "uncompface")))))
899 "*Non-nil means display faces in `mh-show-mode' with external x-face package.
900 It is available from ftp://ftp.jpl.org/pub/elisp/. Download it and put its
901 files in the Emacs `load-path' and MH-E will invoke it automatically for you if
902 this variable is non-nil.
904 The `uncompface' binary is also required to be in the execute PATH. It can
905 be obtained from: ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z"
906 :type 'boolean
907 :group 'mh-show)
909 (defcustom mh-summary-height (or (and (fboundp 'frame-height)
910 (> (frame-height) 24)
911 (min 10 (/ (frame-height) 6)))
913 "*Number of lines in MH-Folder window (including the mode line)."
914 :type 'integer
915 :group 'mh-show)
917 (defcustom mh-visible-headers nil
918 "*Contains a regexp specifying the headers to keep when cleaning.
919 Only used if `mh-clean-message-header-flag' is non-nil. Setting it overrides
920 the variable `mh-invisible-headers'."
921 :type '(choice (const nil) regexp)
922 :group 'mh-show)
924 (defcustom mhl-formfile nil
925 "*Name of format file to be used by mhl to show and print messages.
926 A value of t means use the default format file.
927 nil means don't use mhl to format messages when showing; mhl is still used,
928 with the default format file, to format messages when printing them.
929 The format used should specify a non-zero value for overflowoffset so
930 the message continues to conform to RFC 822 and MH-E can parse the headers."
931 :type '(choice (const nil) (const t) string)
932 :group 'mh-show)
933 (put 'mhl-formfile 'info-file "mh-e")
935 (defvar mh-invisible-headers nil
936 "*Regexp matching lines in a message header that are not to be shown.
937 If `mh-visible-headers' is non-nil, it is used instead to specify what
938 to keep.")
940 (defun mh-invisible-headers ()
941 "Make or remake the variable `mh-invisible-headers'.
942 Done using `mh-invisible-header-fields' as input."
943 (setq mh-invisible-headers
944 (concat
946 (let ((max-specpdl-size 1000) ;workaround for insufficient default
947 (fields (append (if (not mh-show-use-xface-flag)
948 '("X-Face: "))
949 mh-invisible-header-fields)))
950 (regexp-opt fields t)))))
952 (defun mh-invisible-header-fields-set (symbol value)
953 "Update `mh-invisible-header-fields'.
954 The function is called with SYMBOL bound to `mh-invisible-header-fields' and
955 VALUE is the the list of headers that are invisible. As a side effect, the
956 variable `mh-invisible-fields' is set."
957 (set-default symbol value)
958 (mh-invisible-headers))
960 ;; Keep fields alphabetized. Mention source, if known.
961 (defcustom mh-invisible-header-fields
962 '("Autoforwarded: "
963 "Bestservhost: "
964 "Content-" ; RFC 2045
965 "Delivered-To: " ; Egroups/yahoogroups mailing list manager
966 "Delivery-Date: " ; MH
967 "Delivery: "
968 "Encoding: "
969 "Errors-To: "
970 "Forwarded: " ; MH
971 "From " ; sendmail
972 "Importance: " ; MS Outlook
973 "In-Reply-To: " ; MH
974 "Lines: "
975 "List-" ; Mailman mailing list manager
976 "List-" ; Unknown mailing list managers
977 "List-Subscribe: " ; Unknown mailing list managers
978 "List-Unsubscribe: " ; Unknown mailing list managers
979 "Mail-from: " ; MH
980 "Mailing-List: " ; Egroups/yahoogroups mailing list manager
981 "Message-Id: " ; RFC 822
982 "Mime-Version" ; RFC 2045
983 "NNTP-" ; News
984 "Old-Return-Path: "
985 "Original-Encoded-Information-Types: " ; X400
986 "P1-Content-Type: " ; X400
987 "P1-Message-Id: " ; X400
988 "P1-Recipient: " ; X400
989 "Path: "
990 "Precedence: "
991 "Prev-Resent" ; MH
992 "Priority: "
993 "Received: " ; RFC 822
994 "References: "
995 "Remailed-" ; MH
996 "Replied: " ; MH
997 "Resent" ; MH
998 "Return-Path: " ; RFC 822
999 "Sensitivity: " ; MS Outlook
1000 "Status: " ; sendmail
1001 "Ua-Content-Id: " ; X400
1002 "User-Agent: "
1003 "Via: " ; MH
1004 "X-Abuse-Info: "
1005 "X-Accept-Language: "
1006 "X-Accept-Language: " ; Netscape/Mozilla
1007 "X-Ack: "
1008 "X-Apparently-From: " ; MS Outlook
1009 "X-Apparently-To: " ; Egroups/yahoogroups mailing list manager
1010 "X-Authentication-Warning: " ; sendmail
1011 "X-Beenthere: " ; Mailman mailing list manager
1012 "X-Complaints-To: "
1013 "X-Cron-Env: "
1014 "X-Delivered"
1015 "X-Envelope-Sender: "
1016 "X-Envelope-To: "
1017 "X-Folder: " ; Spam
1018 "X-From-Line"
1019 "X-Gnus-Mail-Source: " ; gnus
1020 "X-Habeas-SWE-1: " ; Spam
1021 "X-Habeas-SWE-2: " ; Spam
1022 "X-Habeas-SWE-3: " ; Spam
1023 "X-Habeas-SWE-4: " ; Spam
1024 "X-Habeas-SWE-5: " ; Spam
1025 "X-Habeas-SWE-6: " ; Spam
1026 "X-Habeas-SWE-7: " ; Spam
1027 "X-Habeas-SWE-8: " ; Spam
1028 "X-Habeas-SWE-9: " ; Spam
1029 "X-Info: " ; NTMail
1030 "X-Juno-" ; Juno
1031 "X-List-Host: " ; Unknown mailing list managers
1032 "X-List-Subscribe: " ; Unknown mailing list managers
1033 "X-List-Unsubscribe: " ; Unknown mailing list managers
1034 "X-Listserver: " ; Unknown mailing list managers
1035 "X-Loop: " ; Unknown mailing list managers
1036 "X-MIME-Autoconverted: " ; sendmail
1037 "X-MIMETrack: "
1038 "X-MS-TNEF-Correlator: " ; MS Outlook
1039 "X-Mailing-List: " ; Unknown mailing list managers
1040 "X-Mailman-Version: " ; Mailman mailing list manager
1041 "X-Message-Id"
1042 "X-MHE-Checksum" ; Checksum added during index search
1043 "X-MimeOLE: " ; MS Outlook
1044 "X-Mozilla-Status: " ; Netscape/Mozilla
1045 "X-Msmail-" ; MS Outlook
1046 "X-News: " ; News
1047 "X-No-Archive: "
1048 "X-Orcl-Content-Type: "
1049 "X-Original-Complaints-To: "
1050 "X-Original-Date: " ; SourceForge mailing list manager
1051 "X-Original-Trace: "
1052 "X-OriginalArrivalTime: " ; Hotmail
1053 "X-Originating-IP: " ; Hotmail
1054 "X-Priority: " ; MS Outlook
1055 "X-Qotd-" ; User added
1056 "X-Received-Date: "
1057 "X-Received: "
1058 "X-Request-"
1059 "X-SBClass: " ; Spam
1060 "X-SBNote: " ; Spam
1061 "X-SBPass: " ; Spam
1062 "X-SBRule: " ; Spam
1063 "X-Scanned-By"
1064 "X-Sender: "
1065 "X-Server-Date: "
1066 "X-Server-Uuid: "
1067 "X-Sieve: " ; Sieve filtering
1068 "X-Spam-Level: " ; Spam
1069 "X-Spam-Score: " ; Spam
1070 "X-Spam-Status: " ; Spam
1071 "X-SpamBouncer: " ; Spam
1072 "X-Trace: "
1073 "X-UIDL: "
1074 "X-UserInfo1: "
1075 "X-VSMLoop: " ; NTMail
1076 "X-Vms-To: "
1077 "X-Wss-Id: " ; Worldtalk gateways
1078 "X-eGroups-" ; Egroups/yahoogroups mailing list manager
1079 "X-pgp: "
1080 "X-submission-address: "
1081 "X400-" ; X400
1082 "Xref: ")
1083 "*List of header fields that are not to be shown.
1084 Regexps are not allowed. Unique fields should have a \": \" suffix; otherwise,
1085 the element can be used to render invisible an entire class of fields that
1086 start with the same prefix.
1087 This variable is ignored if `mh-visible-headers' is set."
1088 :type '(repeat (string :tag "Header field"))
1089 :set 'mh-invisible-header-fields-set
1090 :group 'mh-show)
1094 ;;; Composing messages (:group 'mh-letter)
1096 (defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn)
1097 "Use either 'gnus or 'mhn to insert MIME message directives in messages."
1098 :type '(choice (const :tag "Use Gnus" gnus)
1099 (const :tag "Use mhn" mhn))
1100 :group 'mh-letter)
1102 (defcustom mh-compose-letter-function nil
1103 "Invoked when setting up a letter draft.
1104 It is passed three arguments: TO recipients, SUBJECT, and CC recipients."
1105 :type '(choice (const nil) function)
1106 :group 'mh-letter)
1108 (defcustom mh-delete-yanked-msg-window-flag nil
1109 "*Non-nil means delete any window displaying the message.
1110 Controls window display when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1111 If non-nil, yanking the current message into a draft letter deletes any
1112 windows displaying the message."
1113 :type 'boolean
1114 :group 'mh-letter)
1116 (defcustom mh-extract-from-attribution-verb "wrote:"
1117 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]."
1118 :type '(choice (const "wrote:")
1119 (const "a écrit :")
1120 (string :tag "Custom string"))
1121 :group 'mh-letter)
1123 (defcustom mh-forward-subject-format "%s: %s"
1124 "*Format to generate the Subject: line contents for a forwarded message.
1125 The two string arguments to the format are the sender of the original
1126 message and the original subject line."
1127 :type 'string
1128 :group 'mh-letter)
1130 (defcustom mh-ins-buf-prefix "> "
1131 "*String to put before each non-blank line of a yanked or inserted message.
1132 \\<mh-letter-mode-map>Used when the message is inserted into an outgoing letter
1133 by \\[mh-insert-letter] or \\[mh-yank-cur-msg]."
1134 :type 'string
1135 :group 'mh-letter)
1137 (defcustom mh-insert-mail-followup-to-flag t
1138 "Non-nil means maybe append a Mail-Followup-To field to the header.
1139 The insertion is done if the To: or Cc: fields matches an entry in
1140 `mh-insert-mail-followup-to-list'."
1141 :type 'boolean
1142 :group 'mh-letter)
1144 (defcustom mh-insert-mail-followup-to-list nil
1145 "Alist of addresses for which a Mail-Followup-To field is inserted.
1146 Each element has the form (REGEXP ADDRESS).
1147 When the REGEXP appears in the To or cc fields of a message, the corresponding
1148 ADDRESS is inserted in a Mail-Followup-To field.
1150 Here's a customization example:
1152 regexp: mh-e-users@lists.s\\\\(ourceforge\\\\|f\\\\).net
1153 address: mh-e-users@lists.sourceforge.net
1155 This corresponds to:
1157 (setq mh-insert-mail-followup-to-list
1158 '((\"mh-e-users@lists.s\\\\(ourceforge\\\\|f\\\\).net\"
1159 \"mh-e-users@lists.sourceforge.net\")))
1161 While it might be tempting to add a descriptive name to the mailing list
1162 address, consider that this field will appear in other people's outgoing
1163 mail in their To: field. It might be best to keep it simple."
1164 :type '(repeat (list (string :tag "Regexp")
1165 (string :tag "Address")))
1166 :group 'mh-letter)
1168 (defcustom mh-insert-x-mailer-flag t
1169 "*Non-nil means append an X-Mailer field to the header."
1170 :type 'boolean
1171 :group 'mh-letter)
1173 (defcustom mh-letter-fill-column 72
1174 "*Fill column to use in `mh-letter-mode'.
1175 This is usually less than in other text modes because email messages get
1176 quoted by some prefix (sometimes many times) when they are replied to,
1177 and it's best to avoid quoted lines that span more than 80 columns."
1178 :type 'integer
1179 :group 'mh-letter)
1181 (defcustom mh-reply-default-reply-to nil
1182 "*Sets the person or persons to whom a reply will be sent.
1183 If nil, prompt for recipient. If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this
1184 value and it should be one of \"from\", \"to\", \"cc\", or \"all\".
1185 The values \"cc\" and \"all\" do the same thing."
1186 :type '(choice (const :tag "Prompt" nil)
1187 (const "from") (const "to")
1188 (const "cc") (const "all"))
1189 :group 'mh-letter)
1191 (defcustom mh-reply-show-message-flag t
1192 "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply].
1194 The setting of this variable determines whether the MH `show-buffer' is
1195 displayed with the current message when using `mh-reply' without a prefix
1196 argument. Set it to nil if you already include the message automatically
1197 in your draft using
1198 repl: -filter repl.filter
1199 in your ~/.mh_profile file."
1200 :type 'boolean
1201 :group 'mh-letter)
1203 (defcustom mh-signature-file-name "~/.signature"
1204 "*Name of file containing the user's signature.
1205 Inserted into message by \\<mh-letter-mode-map>\\[mh-insert-signature]."
1206 :type 'file
1207 :group 'mh-letter)
1209 (defcustom mh-x-face-file "~/.face"
1210 "*File name containing the encoded X-Face string to insert in outgoing mail.
1211 If nil, or the file does not exist, nothing is added to message headers."
1212 :type 'file
1213 :group 'mh-letter)
1215 (defvar mh-x-mailer-string nil
1216 "*String containing the contents of the X-Mailer header field.
1217 If nil, this variable is initialized to show the version of MH-E, Emacs, and
1218 MH the first time a message is composed.")
1220 (defcustom mh-yank-from-start-of-msg 'attribution
1221 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1222 If t, include the entire message, with full headers. This is historically
1223 here for use with supercite, but is now deprecated in favor of the setting
1224 `supercite' below.
1226 If the symbol `body', then yank the message minus the header.
1228 If the symbol `supercite', include the entire message, with full headers.
1229 This also causes the invocation of `sc-cite-original' without the setting
1230 of `mail-citation-hook', now deprecated practice.
1232 If the symbol `autosupercite', do as for `supercite' automatically when
1233 show buffer matches the message being replied-to. When this option is used,
1234 the -noformat switch is passed to the repl program to override a -filter or
1235 -format switch.
1237 If the symbol `attribution', then yank the message minus the header and add
1238 a simple attribution line at the top.
1240 If the symbol `autoattrib', do as for `attribution' automatically when show
1241 buffer matches the message being replied-to. You can make sure this is
1242 always the case by setting `mh-reply-show-message-flag' to t (which is the
1243 default) and optionally `mh-delete-yanked-msg-window-flag' to t as well such
1244 that the show window is never displayed. When the `autoattrib' option is
1245 used, the -noformat switch is passed to the repl program to override a
1246 -filter or -format switch.
1248 If nil, yank only the portion of the message following the point.
1250 If the show buffer has a region, this variable is ignored unless its value is
1251 one of `attribution' or `autoattrib' in which case the attribution is added
1252 to the yanked region."
1253 :type '(choice (const :tag "Below point" nil)
1254 (const :tag "Without header" body)
1255 (const :tag "Invoke supercite" supercite)
1256 (const :tag "Invoke supercite, automatically" autosupercite)
1257 (const :tag "Without header, with attribution" attribution)
1258 (const :tag "Without header, with attribution, automatically"
1259 autoattrib)
1260 (const :tag "Entire message with headers" t))
1261 :group 'mh-letter)
1263 (defcustom mh-letter-complete-function 'ispell-complete-word
1264 "*Function to call when completing outside of fields specific to aliases."
1265 :type '(choice function (const nil))
1266 :group 'mh-letter)
1270 ;;; Alias handling (:group 'mh-alias)
1272 (defcustom mh-alias-system-aliases
1273 '("/etc/nmh/MailAliases" "/usr/lib/mh/MailAliases" "/etc/passwd")
1274 "*A list of system files from which to cull aliases.
1275 If these files are modified, they are automatically reread. This list need
1276 include only system aliases and the passwd file, since personal alias files
1277 listed in your \"AliasFile\" MH profile component are automatically included.
1278 You can update the alias list manually using \\[mh-alias-reload]."
1279 :group 'mh-alias
1280 :type '(choice (file) (repeat file)))
1282 (defcustom mh-alias-expand-aliases-flag nil
1283 "*Non-nil means to expand aliases entered in the minibuffer.
1284 In other words, aliases entered in the minibuffer will be expanded to the full
1285 address in the message draft. By default, this expansion is not performed."
1286 :group 'mh-alias
1287 :type 'boolean)
1289 (defcustom mh-alias-completion-ignore-case-flag t
1290 "*Non-nil means don't consider case significant in MH alias completion.
1291 This is the default in plain MH, so it is the default here as well. It
1292 can be useful to set this to t if, for example, you use lowercase
1293 aliases for people and uppercase for mailing lists."
1294 :group 'mh-alias
1295 :type 'boolean)
1297 (defcustom mh-alias-flash-on-comma t
1298 "*Specify whether to flash or warn on translation.
1299 When a [comma] is pressed while entering aliases or addresses, setting this
1300 variable to the following values has the listed effects:
1301 t Flash alias translation but don't warn if there is no translation.
1302 1 Flash alias translation and warn if there is no translation.
1303 nil Do not flash alias translation nor warn if there is no translation."
1304 :group 'mh-alias
1305 :type '(choice (const :tag "Flash but don't warn if no translation" t)
1306 (const :tag "Flash and warn if no translation" 1)
1307 (const :tag "Don't flash nor warn if no translation" nil)))
1309 (defcustom mh-alias-local-users t
1310 "*If t, local users are completed in MH-E To: and Cc: prompts.
1312 Users with a userid greater than some magic number (usually 200) are available
1313 for completion.
1315 If you set this variable to a string, it will be executed to generate a
1316 password file. A value of \"ypcat passwd\" is helpful if NIS is in use."
1317 :group 'mh-alias
1318 :type '(choice (boolean) (string)))
1320 (defcustom mh-alias-insert-file nil
1321 "*Filename to use to store new MH-E aliases.
1322 This variable can also be a list of filenames, in which case MH-E will prompt
1323 for one of them. If nil, the default, then MH-E will use the first file found
1324 in the \"AliasFile\" component of the MH profile."
1325 :group 'mh-alias
1326 :type '(choice (const :tag "Use AliasFile MH profile component" nil)
1327 (file :tag "Alias file")
1328 (repeat :tag "List of alias files" file)))
1330 (defcustom mh-alias-insertion-location 'sorted
1331 "Specifies where new aliases are entered in alias files.
1332 Options are sorted alphabetically, at the top of the file or at the bottom."
1333 :type '(choice (const :tag "Sorted alphabetically" sorted)
1334 (const :tag "At the top of file" top)
1335 (const :tag "At the bottom of file" bottom))
1336 :group 'mh-alias)
1340 ;;; Indexed searching (:group 'mh-index)
1342 (defcustom mh-index-program nil
1343 "Indexing program that MH-E shall use.
1344 The possible choices are swish++, swish-e, mairix, namazu, glimpse, pick and
1345 grep. By default this variable is nil which means that the programs are tried
1346 in order and the first one found is used.
1348 More information about setting up an indexing program to use with MH-E can be
1349 found in the documentation of `mh-index-search'."
1350 :type '(choice (const :tag "Auto-detect" nil)
1351 (const :tag "swish++" swish++)
1352 (const :tag "swish-e" swish)
1353 (const :tag "mairix" mairix)
1354 (const :tag "namazu" namazu)
1355 (const :tag "glimpse" glimpse)
1356 (const :tag "pick" pick)
1357 (const :tag "grep" grep))
1358 :group 'mh-index)
1362 ;;; Multiple personalities (:group 'mh-identity)
1364 (defcustom mh-identity-list nil
1365 "*List holding MH-E identity.
1366 Omit the colon and trailing space from the field names.
1367 The keyword name \"none\" is reversed for internal use.
1368 Use the keyname name \"signature\" to specify either a signature file or a
1369 function to call to insert a signature at point.
1371 Providing an empty Value (\"\") will cause the field to be deleted.
1373 Example entries using the customize interface:
1374 Keyword name: work
1375 From
1376 Value: John Doe <john@work.com>
1377 Organization
1378 Value: Acme Inc.
1379 Keyword name: home
1380 From
1381 Value: John Doe <johndoe@home.net>
1382 Organization
1383 Value:
1385 This would produce the equivalent of:
1386 (setq mh-identity-list
1387 '((\"work\"
1388 ((\"From\" . \"John Doe <john@work.com>\")
1389 (\"Organization\" . \"Acme Inc.\")))
1390 (\"home\"
1391 ((\"From\" . \"John Doe <johndoe@home.net>\")
1392 (\"Organization\" . \"\")))))"
1393 :type '(repeat (list :tag ""
1394 (string :tag "Keyword name")
1395 (repeat :tag "At least one pair from below"
1396 (choice (cons :tag "From field"
1397 (const "From")
1398 (string :tag "Value"))
1399 (cons :tag "Organization field"
1400 (const "Organization")
1401 (string :tag "Value"))
1402 (cons :tag "Signature"
1403 (const "signature")
1404 (choice (file) (function)))
1405 (cons :tag "Other field & value pair"
1406 (string :tag "Field")
1407 (string :tag "Value"))))))
1408 :set 'mh-identity-list-set
1409 :group 'mh-identity)
1411 (defcustom mh-identity-default nil
1412 "Default identity to use when `mh-letter-mode' is called."
1413 ;; Dynamically render :type corresponding to `mh-identity-list' entries,
1414 ;; e.g.:
1415 ;; :type '(radio (const :tag "none" nil)
1416 ;; (const "home")
1417 ;; (const "work"))
1418 :type (append
1419 '(radio)
1420 (cons '(const :tag "None" nil)
1421 (mapcar (function (lambda (arg) `(const ,arg)))
1422 (mapcar 'car mh-identity-list))))
1423 :group 'mh-identity)
1427 ;;; Hooks (:group 'mh-hooks + group where hook defined)
1429 ;;; These are alphabetized. All hooks should be placed in the 'mh-hook group;
1430 ;;; in addition, add the group in which the hook is defined in the manual (or,
1431 ;;; if it is new, where it would be defined).
1433 (defcustom mh-before-quit-hook nil
1434 "Invoked by \\<mh-folder-mode-map>`\\[mh-quit]' before quitting MH-E.
1435 See also `mh-quit-hook'."
1436 :type 'hook
1437 :group 'mh-hooks
1438 :group 'mh-folder)
1440 (defcustom mh-before-send-letter-hook nil
1441 "Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command."
1442 :type 'hook
1443 :group 'mh-hooks
1444 :group 'mh-letter)
1446 (defcustom mh-delete-msg-hook nil
1447 "Invoked after marking each message for deletion."
1448 :type 'hook
1449 :group 'mh-hooks
1450 :group 'mh-folder)
1452 (defcustom mh-edit-mhn-hook nil
1453 "Invoked on the formatted letter by \\<mh-letter-mode-map>\\[mh-edit-mhn]."
1454 :type 'hook
1455 :group 'mh-hooks
1456 :group 'mh-letter)
1458 (defcustom mh-find-path-hook nil
1459 "Invoked by `mh-find-path' after reading the user's MH profile."
1460 :type 'hook
1461 :group 'mh-hooks
1462 :group 'mh-folder)
1464 (defcustom mh-folder-mode-hook nil
1465 "Invoked in `mh-folder-mode' on a new folder."
1466 :type 'hook
1467 :group 'mh-hooks
1468 :group 'mh-folder)
1470 (defcustom mh-folder-updated-hook nil
1471 "Invoked when the folder actions (such as moves and deletes) are performed.
1472 Variables that are useful in this hook include `mh-delete-list' and
1473 `mh-refile-list' which can be used to see which changes are being made to
1474 current folder, `mh-current-folder'."
1475 :type 'hook
1476 :group 'mh-hooks)
1478 (defcustom mh-inc-folder-hook nil
1479 "Invoked by \\<mh-folder-mode-map>`\\[mh-inc-folder]' after incorporating mail into a folder."
1480 :type 'hook
1481 :group 'mh-hooks
1482 :group 'mh-folder)
1484 (defcustom mh-index-show-hook nil
1485 "Invoked after the message has been displayed."
1486 :type 'hook
1487 :group 'mh-hooks
1488 :group 'mh-index)
1490 (defcustom mh-letter-insert-signature-hook nil
1491 "Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-insert-signature] command.
1492 Can be used to determine which signature file to use based on message content.
1493 On return, if `mh-signature-file-name' is non-nil that file will be inserted at
1494 the current point in the buffer."
1495 :type 'hook
1496 :group 'mh-hooks
1497 :group 'mh-letter)
1499 (defcustom mh-letter-mode-hook nil
1500 "Invoked in `mh-letter-mode' on a new letter."
1501 :type 'hook
1502 :group 'mh-hooks
1503 :group 'mh-letter)
1505 (defcustom mh-pick-mode-hook nil
1506 "Invoked upon entry to `mh-pick-mode'."
1507 :type 'hook
1508 :group 'mh-hooks
1509 :group 'mh-folder)
1511 (defcustom mh-quit-hook nil
1512 "Invoked after \\<mh-folder-mode-map>`\\[mh-quit]' quits MH-E.
1513 See also `mh-before-quit-hook'."
1514 :type 'hook
1515 :group 'mh-hooks
1516 :group 'mh-folder)
1518 (defcustom mh-refile-msg-hook nil
1519 "Invoked after marking each message for refiling."
1520 :type 'hook
1521 :group 'mh-hooks
1522 :group 'mh-folder)
1524 (defcustom mh-show-hook nil
1525 "Invoked after \\<mh-folder-mode-map>`\\[mh-show]' shows a message."
1526 :type 'hook
1527 :group 'mh-hooks
1528 :group 'mh-show)
1530 (defcustom mh-show-mode-hook nil
1531 "Invoked upon entry to `mh-show-mode'."
1532 :type 'hook
1533 :group 'mh-hooks
1534 :group 'mh-show)
1536 (defcustom mh-unseen-updated-hook nil
1537 "Invoked after the unseen sequence has been updated.
1538 The variable `mh-seen-list' can be used to obtain the list of messages which
1539 will be removed from the unseen sequence."
1540 :type 'hook
1541 :group 'mh-hooks
1542 :group 'mh-folder)
1546 ;;; Faces
1548 ;;; Faces used in speedbar (:group mh-speed-faces)
1550 (defface mh-speedbar-folder-face
1551 '((((class color) (background light))
1552 (:foreground "blue4"))
1553 (((class color) (background dark))
1554 (:foreground "light blue")))
1555 "Face used for folders in the speedbar buffer."
1556 :group 'mh-speed-faces)
1558 (defface mh-speedbar-selected-folder-face
1559 '((((class color) (background light))
1560 (:foreground "red" :underline t))
1561 (((class color) (background dark))
1562 (:foreground "red" :underline t))
1563 (t (:underline t)))
1564 "Face used for the current folder."
1565 :group 'mh-speed-faces)
1567 (defface mh-speedbar-folder-with-unseen-messages-face
1568 '((t (:inherit mh-speedbar-folder-face :bold t)))
1569 "Face used for folders in the speedbar buffer which have unread messages."
1570 :group 'mh-speed-faces)
1572 (defface mh-speedbar-selected-folder-with-unseen-messages-face
1573 '((t (:inherit mh-speedbar-selected-folder-face :bold t)))
1574 "Face used for the current folder when it has unread messages."
1575 :group 'mh-speed-faces)
1579 ;;; Faces used in scan listing (:group mh-folder-faces)
1581 (defvar mh-folder-body-face 'mh-folder-body-face
1582 "Face for highlighting body text in MH-Folder buffers.")
1583 (defface mh-folder-body-face
1584 '((((type tty) (class color)) (:foreground "green"))
1585 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
1586 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
1587 (((class color) (background light)) (:foreground "RosyBrown"))
1588 (((class color) (background dark)) (:foreground "LightSalmon"))
1589 (t (:italic t)))
1590 "Face for highlighting body text in MH-Folder buffers."
1591 :group 'mh-folder-faces)
1593 (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face
1594 "Face for the current message line in MH-Folder buffers.")
1595 (defface mh-folder-cur-msg-face
1596 '((((type tty pc) (class color))
1597 (:background "LightGreen"))
1598 (((class color) (background light))
1599 (:background "LightGreen") ;Use this for solid background colour
1600 ;; (:underline t) ;Use this for underlining
1602 (((class color) (background dark))
1603 (:background "DarkOliveGreen4"))
1604 (t (:underline t)))
1605 "Face for the current message line in MH-Folder buffers."
1606 :group 'mh-folder-faces)
1608 (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face
1609 "Face for highlighting the current message in MH-Folder buffers.")
1610 (defface mh-folder-cur-msg-number-face
1611 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
1612 (((class grayscale) (background light)) (:foreground "LightGray" :bold t))
1613 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
1614 (((class color) (background light)) (:foreground "Purple"))
1615 (((class color) (background dark)) (:foreground "Cyan"))
1616 (t (:bold t)))
1617 "Face for highlighting the current message in MH-Folder buffers."
1618 :group 'mh-folder-faces)
1620 (defvar mh-folder-date-face 'mh-folder-date-face
1621 "Face for highlighting the date in MH-Folder buffers.")
1622 (defface mh-folder-date-face
1623 '((((class color) (background light))
1624 (:foreground "snow4"))
1625 (((class color) (background dark))
1626 (:foreground "snow3"))
1628 (:bold t)))
1629 "Face for highlighting the date in MH-Folder buffers."
1630 :group 'mh-folder-faces)
1632 (defvar mh-folder-followup-face 'mh-folder-followup-face
1633 "Face for highlighting Re: (followup) subject text in MH-Folder buffers.")
1634 (defface mh-folder-followup-face
1635 '((((class color) (background light))
1636 (:foreground "blue3"))
1637 (((class color) (background dark))
1638 (:foreground "LightGoldenRod"))
1640 (:bold t)))
1641 "Face for highlighting Re: (followup) subject text in MH-Folder buffers."
1642 :group 'mh-folder-faces)
1644 (defvar mh-folder-msg-number-face 'mh-folder-msg-number-face
1645 "Face for highlighting the message number in MH-Folder buffers.")
1646 (defface mh-folder-msg-number-face
1647 '((((class color) (background light))
1648 (:foreground "snow4"))
1649 (((class color) (background dark))
1650 (:foreground "snow3"))
1652 (:bold t)))
1653 "Face for highlighting the message number in MH-Folder buffers."
1654 :group 'mh-folder-faces)
1656 (defvar mh-folder-deleted-face 'mh-folder-deleted-face
1657 "Face for highlighting deleted messages in MH-Folder buffers.")
1658 (copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face)
1660 (defvar mh-folder-refiled-face 'mh-folder-refiled-face
1661 "Face for highlighting refiled messages in MH-Folder buffers.")
1662 (defface mh-folder-refiled-face
1663 '((((type tty) (class color)) (:foreground "yellow" :weight light))
1664 (((class grayscale) (background light))
1665 (:foreground "Gray90" :bold t :italic t))
1666 (((class grayscale) (background dark))
1667 (:foreground "DimGray" :bold t :italic t))
1668 (((class color) (background light)) (:foreground "DarkGoldenrod"))
1669 (((class color) (background dark)) (:foreground "LightGoldenrod"))
1670 (t (:bold t :italic t)))
1671 "Face for highlighting refiled messages in MH-Folder buffers."
1672 :group 'mh-folder-faces)
1674 (defvar mh-folder-subject-face 'mh-folder-subject-face
1675 "Face for highlighting subject text in MH-Folder buffers.")
1676 (if (boundp 'facemenu-unlisted-faces)
1677 (add-to-list 'facemenu-unlisted-faces "^mh-folder"))
1678 (defface mh-folder-subject-face
1679 '((((class color) (background light))
1680 (:foreground "blue4"))
1681 (((class color) (background dark))
1682 (:foreground "yellow"))
1684 (:bold t)))
1685 "Face for highlighting subject text in MH-Folder buffers."
1686 :group 'mh-folder-faces)
1688 (defvar mh-folder-address-face 'mh-folder-address-face
1689 "Face for highlighting the address in MH-Folder buffers.")
1690 (copy-face 'mh-folder-subject-face 'mh-folder-address-face)
1692 (defvar mh-folder-scan-format-face 'mh-folder-scan-format-face
1693 "Face for highlighting `mh-scan-format-regexp' matches in MH-Folder buffers.")
1694 (copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face)
1696 (defvar mh-folder-to-face 'mh-folder-to-face
1697 "Face for highlighting the To: string in MH-Folder buffers.")
1698 (defface mh-folder-to-face
1699 '((((type tty) (class color)) (:foreground "green"))
1700 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
1701 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
1702 (((class color) (background light)) (:foreground "RosyBrown"))
1703 (((class color) (background dark)) (:foreground "LightSalmon"))
1704 (t (:italic t)))
1705 "Face for highlighting the To: string in MH-Folder buffers."
1706 :group 'mh-folder-faces)
1710 ;;; Faces used in message display (:group mh-show-faces)
1712 (defvar mh-show-cc-face 'mh-show-cc-face
1713 "Face for highlighting cc header fields.")
1714 (defface mh-show-cc-face
1715 '((((type tty) (class color)) (:foreground "yellow" :weight light))
1716 (((class grayscale) (background light))
1717 (:foreground "Gray90" :bold t :italic t))
1718 (((class grayscale) (background dark))
1719 (:foreground "DimGray" :bold t :italic t))
1720 (((class color) (background light)) (:foreground "DarkGoldenrod"))
1721 (((class color) (background dark)) (:foreground "LightGoldenrod"))
1722 (t (:bold t :italic t)))
1723 "Face for highlighting cc header fields."
1724 :group 'mh-show-faces)
1726 (defvar mh-show-date-face 'mh-show-date-face
1727 "Face for highlighting the Date header field.")
1728 (defface mh-show-date-face
1729 '((((type tty) (class color)) (:foreground "green"))
1730 (((class grayscale) (background light)) (:foreground "Gray90" :bold t))
1731 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
1732 (((class color) (background light)) (:foreground "ForestGreen"))
1733 (((class color) (background dark)) (:foreground "PaleGreen"))
1734 (t (:bold t :underline t)))
1735 "Face for highlighting the Date header field."
1736 :group 'mh-show-faces)
1738 (defvar mh-show-header-face 'mh-show-header-face
1739 "Face used to deemphasize unspecified header fields.")
1740 (defface mh-show-header-face
1741 '((((type tty) (class color)) (:foreground "green"))
1742 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
1743 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
1744 (((class color) (background light)) (:foreground "RosyBrown"))
1745 (((class color) (background dark)) (:foreground "LightSalmon"))
1746 (t (:italic t)))
1747 "Face used to deemphasize unspecified header fields."
1748 :group 'mh-show-faces)
1750 (defvar mh-show-to-face 'mh-show-to-face
1751 "Face for highlighting the To: header field.")
1752 (if (boundp 'facemenu-unlisted-faces)
1753 (add-to-list 'facemenu-unlisted-faces "^mh-show"))
1754 (defface mh-show-to-face
1755 '((((class grayscale) (background light))
1756 (:foreground "DimGray" :underline t))
1757 (((class grayscale) (background dark))
1758 (:foreground "LightGray" :underline t))
1759 (((class color) (background light)) (:foreground "SaddleBrown"))
1760 (((class color) (background dark)) (:foreground "burlywood"))
1761 (t (:underline t)))
1762 "Face for highlighting the To: header field."
1763 :group 'mh-show-faces)
1765 (defvar mh-show-from-face 'mh-show-from-face
1766 "Face for highlighting the From: header field.")
1767 (defface mh-show-from-face
1768 '((((class color) (background light))
1769 (:foreground "red3"))
1770 (((class color) (background dark))
1771 (:foreground "cyan"))
1773 (:bold t)))
1774 "Face for highlighting the From: header field."
1775 :group 'mh-show-faces)
1777 (defvar mh-show-subject-face 'mh-show-subject-face
1778 "Face for highlighting the Subject header field.")
1779 (copy-face 'mh-folder-subject-face 'mh-show-subject-face)
1783 ;;; Faces used in indexed searches (:group mh-index-faces)
1785 (defvar mh-index-folder-face 'mh-index-folder-face
1786 "Face for highlighting folders in MH-Index buffers.")
1787 (defface mh-index-folder-face
1788 '((((class color) (background light))
1789 (:foreground "dark green" :bold t))
1790 (((class color) (background dark))
1791 (:foreground "indian red" :bold t))
1793 (:bold t)))
1794 "Face for highlighting folders in MH-Index buffers."
1795 :group 'mh-index-faces)
1797 ;;; Local Variables:
1798 ;;; indent-tabs-mode: nil
1799 ;;; sentence-end-double-space: nil
1800 ;;; End:
1802 ;;; mh-customize.el ends here