1 |
;;; mh-customize.el --- MH-E customization |
;;; mh-customize.el --- MH-E customization |
2 |
|
|
3 |
;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Bill Wohler <wohler@newt.com> |
;; Author: Bill Wohler <wohler@newt.com> |
6 |
;; Maintainer: Bill Wohler <wohler@newt.com> |
;; Maintainer: Bill Wohler <wohler@newt.com> |
57 |
|
|
58 |
;;; Code: |
;;; Code: |
59 |
(provide 'mh-customize) |
(provide 'mh-customize) |
60 |
(require 'mh-e) |
(require 'mh-utils) |
61 |
|
|
62 |
|
(when mh-xemacs-flag |
63 |
|
(require 'mh-xemacs)) |
64 |
|
|
65 |
;;;###mh-autoload |
;;;###mh-autoload |
66 |
(defun mh-customize (&optional delete-other-windows-flag) |
(defun mh-customize (&optional delete-other-windows-flag) |
161 |
:group 'mh-faces |
:group 'mh-faces |
162 |
:group 'mh-folder) |
:group 'mh-folder) |
163 |
|
|
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) |
170 |
|
|
171 |
(defgroup mh-show-faces nil |
(defgroup mh-show-faces nil |
172 |
"Faces used in message display." |
"Faces used in message display." |
173 |
:link '(custom-manual "(mh-e)Customizing mh-e") |
:link '(custom-manual "(mh-e)Customizing mh-e") |
175 |
:group 'mh-faces |
:group 'mh-faces |
176 |
:group 'mh-show) |
:group 'mh-show) |
177 |
|
|
178 |
(defgroup mh-index-faces nil |
(defgroup mh-letter-faces nil |
179 |
"Faces used in indexed searches." |
"Faces used when composing messages." |
180 |
:link '(custom-manual "(mh-e)Customizing mh-e") |
:link '(custom-manual "(mh-e)Customizing mh-e") |
181 |
:prefix "mh-" |
:prefix "mh-" |
182 |
:group 'mh-faces |
:group 'mh-faces |
183 |
:group 'mh-index) |
:group 'mh-letter) |
184 |
|
|
185 |
|
|
186 |
|
|
240 |
|
|
241 |
;; XEmacs has a couple of extra customizations... |
;; XEmacs has a couple of extra customizations... |
242 |
(mh-do-in-xemacs |
(mh-do-in-xemacs |
|
(require 'mh-xemacs-icons) |
|
243 |
(defcustom mh-xemacs-use-toolbar-flag (if (and (featurep 'toolbar) |
(defcustom mh-xemacs-use-toolbar-flag (if (and (featurep 'toolbar) |
244 |
(featurep 'xpm) |
(featurep 'xpm) |
245 |
(device-on-window-system-p)) |
(device-on-window-system-p)) |
292 |
:letter then the default buttons in the letter mode are listed. FUNC1, FUNC2, |
:letter then the default buttons in the letter mode are listed. FUNC1, FUNC2, |
293 |
FUNC3, ... are the names of the functions that the buttons would execute. |
FUNC3, ... are the names of the functions that the buttons would execute. |
294 |
|
|
295 |
Each element of BUTTONS is a list of four things: |
Each element of BUTTONS is a list consisting of four mandatory items and one |
296 |
|
optional item as follows: |
297 |
|
|
298 |
(FUNCTION MODES ICON DOC) |
(FUNCTION MODES ICON DOC &optional ENABLE-EXPR) |
299 |
|
|
300 |
where, |
where, |
301 |
|
|
318 |
DOC is the documentation for the button. It is used in tool-tips and in |
DOC is the documentation for the button. It is used in tool-tips and in |
319 |
providing other help to the user. GNU Emacs uses only the first line of the |
providing other help to the user. GNU Emacs uses only the first line of the |
320 |
string. So the DOC should be formatted such that the first line is useful and |
string. So the DOC should be formatted such that the first line is useful and |
321 |
complete without the rest of the string." |
complete without the rest of the string. |
322 |
|
|
323 |
|
Optional item ENABLE-EXPR is an arbitrary lisp expression. If it evaluates |
324 |
|
to nil, then the button is deactivated, otherwise it is active. If is in't |
325 |
|
present then the button is always active." |
326 |
;; The following variable names have been carefully chosen to make code |
;; The following variable names have been carefully chosen to make code |
327 |
;; generation easier. Modifying the names should be done carefully. |
;; generation easier. Modifying the names should be done carefully. |
328 |
(let (folder-buttons folder-docs folder-button-setter sequence-button-setter |
(let (folder-buttons folder-docs folder-button-setter sequence-button-setter |
334 |
(cond ((eq (car x) :folder) (setq folder-defaults (cdr x))) |
(cond ((eq (car x) :folder) (setq folder-defaults (cdr x))) |
335 |
((eq (car x) :letter) (setq letter-defaults (cdr x))))) |
((eq (car x) :letter) (setq letter-defaults (cdr x))))) |
336 |
(dolist (button buttons) |
(dolist (button buttons) |
337 |
(unless (and (listp button) (equal (length button) 4)) |
(unless (and (listp button) |
338 |
|
(or (equal (length button) 4) (equal (length button) 5))) |
339 |
(error "Incorrect MH-E tool-bar button specification: %s" button)) |
(error "Incorrect MH-E tool-bar button specification: %s" button)) |
340 |
(let* ((name (nth 0 button)) |
(let* ((name (nth 0 button)) |
341 |
(name-str (symbol-name name)) |
(name-str (symbol-name name)) |
346 |
(doc (if (string-match "\\(.*\\)\n" full-doc) |
(doc (if (string-match "\\(.*\\)\n" full-doc) |
347 |
(match-string 1 full-doc) |
(match-string 1 full-doc) |
348 |
full-doc)) |
full-doc)) |
349 |
|
(enable-expr (or (nth 4 button) t)) |
350 |
(modes (nth 1 button)) |
(modes (nth 1 button)) |
351 |
functions show-sym) |
functions show-sym) |
352 |
(when (memq 'letter modes) (setq functions `(:letter ,name))) |
(when (memq 'letter modes) (setq functions `(:letter ,name))) |
385 |
(add-to-list |
(add-to-list |
386 |
setter `(when (member ',name ,list) |
setter `(when (member ',name ,list) |
387 |
(mh-funcall-if-exists |
(mh-funcall-if-exists |
388 |
tool-bar-add-item ,icon ',function ',key :help ,doc))) |
tool-bar-add-item ,icon ',function ',key |
389 |
|
:help ,doc :enable ',enable-expr))) |
390 |
(add-to-list mbuttons name) |
(add-to-list mbuttons name) |
391 |
(if docs (add-to-list docs doc)))))) |
(if docs (add-to-list docs doc)))))) |
392 |
(setq folder-buttons (nreverse folder-buttons) |
(setq folder-buttons (nreverse folder-buttons) |
481 |
(when (and mh-xemacs-toolbar-position mh-xemacs-use-toolbar-flag) |
(when (and mh-xemacs-toolbar-position mh-xemacs-use-toolbar-flag) |
482 |
(cond |
(cond |
483 |
((eq mh-xemacs-toolbar-position 'top) |
((eq mh-xemacs-toolbar-position 'top) |
484 |
(set-specifier top-toolbar (cons buffer toolbar)) |
(set-specifier top-toolbar toolbar buffer) |
485 |
(set-specifier top-toolbar-visible-p t) |
(set-specifier top-toolbar-visible-p t) |
486 |
(set-specifier top-toolbar-height height)) |
(set-specifier top-toolbar-height height)) |
487 |
((eq mh-xemacs-toolbar-position 'bottom) |
((eq mh-xemacs-toolbar-position 'bottom) |
488 |
(set-specifier bottom-toolbar (cons buffer toolbar)) |
(set-specifier bottom-toolbar toolbar buffer) |
489 |
(set-specifier bottom-toolbar-visible-p t) |
(set-specifier bottom-toolbar-visible-p t) |
490 |
(set-specifier bottom-toolbar-height height)) |
(set-specifier bottom-toolbar-height height)) |
491 |
((eq mh-xemacs-toolbar-position 'left) |
((eq mh-xemacs-toolbar-position 'left) |
492 |
(set-specifier left-toolbar (cons buffer toolbar)) |
(set-specifier left-toolbar toolbar buffer) |
493 |
(set-specifier left-toolbar-visible-p t) |
(set-specifier left-toolbar-visible-p t) |
494 |
(set-specifier left-toolbar-width width)) |
(set-specifier left-toolbar-width width)) |
495 |
((eq mh-xemacs-toolbar-position 'right) |
((eq mh-xemacs-toolbar-position 'right) |
496 |
(set-specifier right-toolbar (cons buffer toolbar)) |
(set-specifier right-toolbar toolbar buffer) |
497 |
(set-specifier right-toolbar-visible-p t) |
(set-specifier right-toolbar-visible-p t) |
498 |
(set-specifier right-toolbar-width width)) |
(set-specifier right-toolbar-width width)) |
499 |
(t (set-specifier default-toolbar (cons buffer toolbar)))))))) |
(t (set-specifier default-toolbar toolbar buffer))))))) |
500 |
;; Declare customizable toolbars |
;; Declare customizable toolbars |
501 |
(custom-declare-variable |
(custom-declare-variable |
502 |
'mh-tool-bar-folder-buttons |
'mh-tool-bar-folder-buttons |
558 |
(mh-reply (folder) "mail/reply2" |
(mh-reply (folder) "mail/reply2" |
559 |
"Reply to this message\nThis button runs `mh-reply'") |
"Reply to this message\nThis button runs `mh-reply'") |
560 |
(mh-alias-grab-from-field (folder) "alias" |
(mh-alias-grab-from-field (folder) "alias" |
561 |
"Grab From alias\nThis button runs `mh-alias-grab-from-field'") |
"Grab From alias\nThis button runs `mh-alias-grab-from-field'" |
562 |
|
(mh-alias-from-has-no-alias-p)) |
563 |
(mh-send (folder) "mail_compose" |
(mh-send (folder) "mail_compose" |
564 |
"Compose new message\nThis button runs `mh-send'") |
"Compose new message\nThis button runs `mh-send'") |
565 |
(mh-rescan-folder (folder) "rescan" |
(mh-rescan-folder (folder) "rescan" |
679 |
:type 'string |
:type 'string |
680 |
:group 'mh-folder) |
:group 'mh-folder) |
681 |
|
|
|
|
|
682 |
(defcustom mh-inc-spool-list nil |
(defcustom mh-inc-spool-list nil |
683 |
"*Alist of alternate spool files, corresponding folders and keybindings. |
"*Alist of alternate spool files, corresponding folders and keybindings. |
684 |
Here's an example. Suppose you have subscribed to the MH-E devel mailing |
Here's an example. Suppose you have subscribed to the MH-E devel mailing |
716 |
:set 'mh-inc-spool-list-set |
:set 'mh-inc-spool-list-set |
717 |
:group 'mh-folder) |
:group 'mh-folder) |
718 |
|
|
719 |
|
(defcustom mh-interpret-number-as-range-flag t |
720 |
|
"Non-nil means interpret a number as a range. |
721 |
|
If the variable is non-nil, and you use an integer, N, when asked for a |
722 |
|
range to scan, then MH-E uses the range \"last:N\"." |
723 |
|
:type 'boolean |
724 |
|
:group 'mh-folder) |
725 |
|
|
726 |
(defcustom mh-lpr-command-format "lpr -J '%s'" |
(defcustom mh-lpr-command-format "lpr -J '%s'" |
727 |
"*Format for Unix command that prints a message. |
"*Format for Unix command that prints a message. |
728 |
The string should be a Unix command line, with the string '%s' where |
The string should be a Unix command line, with the string '%s' where |
758 |
:type 'boolean |
:type 'boolean |
759 |
:group 'mh-folder) |
:group 'mh-folder) |
760 |
|
|
761 |
|
;;; If `mh-unpropagated-sequences' becomes a defcustom, add the following tot |
762 |
|
;;; he docstring: "Additional sequences that should not to be preserved can be |
763 |
|
;;; specified by setting `mh-unpropagated-sequences' appropriately." XXX |
764 |
|
|
765 |
|
(defcustom mh-refile-preserves-sequences-flag t |
766 |
|
"*Non-nil means that sequences are preserved when messages are refiled. |
767 |
|
If this variable is non-nil and a message belonging to a sequence other than |
768 |
|
cur or Previous-Sequence (see mh-profile 5) is refiled then it is put in the |
769 |
|
same sequence in the destination folder." |
770 |
|
:type 'boolean |
771 |
|
:group 'mh-folder) |
772 |
|
|
773 |
(defcustom mh-scan-format-file t |
(defcustom mh-scan-format-file t |
774 |
"Specifies the format file to pass to the scan program. |
"Specifies the format file to pass to the scan program. |
775 |
If t, the format string will be taken from the either `mh-scan-format-mh' |
If t, the format string will be taken from the either `mh-scan-format-mh' |
855 |
(const :tag "grep" grep)) |
(const :tag "grep" grep)) |
856 |
:group 'mh-index) |
:group 'mh-index) |
857 |
|
|
858 |
|
(defcustom mh-index-ticked-messages-folders t |
859 |
|
"Folders searched for `mh-tick-seq'. |
860 |
|
If t, then `mh-inbox' is searched. If nil, all the top level folders are |
861 |
|
searched. Otherwise the list of folders specified as strings are searched. |
862 |
|
See also `mh-recursive-folders-flag'." |
863 |
|
:group 'mh-index |
864 |
|
:type '(choice (const :tag "Inbox" t) |
865 |
|
(const :tag "All" nil) |
866 |
|
(repeat :tag "Choose folders" (string :tag "Folder")))) |
867 |
|
|
868 |
|
|
869 |
|
|
870 |
;;; Spam Handling (:group 'mh-junk) |
;;; Spam Handling (:group 'mh-junk) |
924 |
|
|
925 |
(defcustom mh-clean-message-header-flag t |
(defcustom mh-clean-message-header-flag t |
926 |
"*Non-nil means clean headers of messages that are displayed or inserted. |
"*Non-nil means clean headers of messages that are displayed or inserted. |
927 |
The variables `mh-invisible-headers' and `mh-visible-headers' control |
The variable `mh-invisible-headers' if set determines the header fields that |
928 |
what is removed." |
are displayed. If it isn't set, then the variable `mh-invisible-headers' |
929 |
|
determines the header fields that are removed." |
930 |
:type 'boolean |
:type 'boolean |
931 |
:group 'mh-show) |
:group 'mh-show) |
932 |
|
|
935 |
:type 'boolean |
:type 'boolean |
936 |
:group 'mh-show) |
:group 'mh-show) |
937 |
|
|
938 |
|
(defcustom mh-display-buttons-for-alternatives-flag nil |
939 |
|
"*Non-nil means display buttons for all MIME alternatives. |
940 |
|
Default behavior is to display only the preferred alternative. If this |
941 |
|
variable is non-nil, then the preferred part is shown inline and buttons |
942 |
|
are shown for each of the other alternatives." |
943 |
|
:type 'boolean |
944 |
|
:group 'mh-show) |
945 |
|
|
946 |
(defcustom mh-display-buttons-for-inline-parts-flag nil |
(defcustom mh-display-buttons-for-inline-parts-flag nil |
947 |
"*Non-nil means display buttons for all inline MIME parts. |
"*Non-nil means display buttons for all inline MIME parts. |
948 |
If non-nil, buttons are displayed for all MIME parts. Inline parts start off |
If non-nil, buttons are displayed for all MIME parts. Inline parts start off |
1004 |
|
|
1005 |
(defvar mh-invisible-headers nil |
(defvar mh-invisible-headers nil |
1006 |
"*Regexp matching lines in a message header that are not to be shown. |
"*Regexp matching lines in a message header that are not to be shown. |
1007 |
Use the function `mh-invisible-headers' to generate this variable. |
Customize the variable `mh-invisible-header-fields' to generate this variable; |
1008 |
If `mh-visible-headers' is non-nil, it is used instead to specify what |
It will in turn automatically use the function `mh-invisible-headers' to |
1009 |
to keep.") |
generate this variable. |
1010 |
|
If the variable `mh-visible-headers' is non-nil, it is used instead to specify |
1011 |
|
what to keep.") |
1012 |
|
|
1013 |
(defun mh-invisible-headers () |
(defun mh-invisible-headers () |
1014 |
"Make or remake the variable `mh-invisible-headers'. |
"Make or remake the variable `mh-invisible-headers'. |
1015 |
Done using `mh-invisible-header-fields' as input." |
Done using `mh-invisible-header-fields' as input." |
1016 |
(setq mh-invisible-headers |
(if mh-invisible-header-fields |
1017 |
(concat |
(setq mh-invisible-headers |
1018 |
"^" |
(concat |
1019 |
(let ((max-specpdl-size 1000) ;workaround for insufficient default |
"^" |
1020 |
(fields mh-invisible-header-fields)) |
(let ((max-specpdl-size 1000) ;workaround for insufficient default |
1021 |
(regexp-opt fields t))))) |
(fields mh-invisible-header-fields)) |
1022 |
|
(regexp-opt fields t)))) |
1023 |
(defun mh-invisible-header-fields-set (symbol value) |
(setq mh-invisible-headers nil))) |
|
"Update `mh-invisible-header-fields'. |
|
|
The function is called with SYMBOL bound to `mh-invisible-header-fields' and |
|
|
VALUE is the the list of headers that are invisible. As a side effect, the |
|
|
variable `mh-invisible-fields' is set." |
|
|
(set-default symbol value) |
|
|
(mh-invisible-headers)) |
|
1024 |
|
|
1025 |
;; Keep fields alphabetized. Mention source, if known. |
;; Keep fields alphabetized. Mention source, if known. |
1026 |
(defcustom mh-invisible-header-fields |
(defcustom mh-invisible-header-fields |
1033 |
"Delivery-Date:" ; MH |
"Delivery-Date:" ; MH |
1034 |
"Delivery:" |
"Delivery:" |
1035 |
"Encoding:" |
"Encoding:" |
1036 |
|
"Envelope-to:" |
1037 |
"Errors-To:" |
"Errors-To:" |
1038 |
"Face:" ; Gnus Face header |
"Face:" ; Gnus Face header |
1039 |
"Forwarded:" ; MH |
"Forwarded:" ; MH |
1075 |
"Sensitivity:" ; MS Outlook |
"Sensitivity:" ; MS Outlook |
1076 |
"Status:" ; sendmail |
"Status:" ; sendmail |
1077 |
"Ua-Content-Id:" ; X400 |
"Ua-Content-Id:" ; X400 |
1078 |
"User-Agent:" |
;; "User-Agent:" ; Similar to X-Mailer, so display it. |
1079 |
"Via:" ; MH |
"Via:" ; MH |
1080 |
"X-Abuse-Info:" |
"X-Abuse-Info:" |
1081 |
"X-Accept-Language:" |
"X-Accept-Language:" |
1128 |
"X-Orcl-Content-Type:" |
"X-Orcl-Content-Type:" |
1129 |
"X-Original-Complaints-To:" |
"X-Original-Complaints-To:" |
1130 |
"X-Original-Date:" ; SourceForge mailing list manager |
"X-Original-Date:" ; SourceForge mailing list manager |
1131 |
|
"X-Original-To:" |
1132 |
"X-Original-Trace:" |
"X-Original-Trace:" |
1133 |
"X-OriginalArrivalTime:" ; Hotmail |
"X-OriginalArrivalTime:" ; Hotmail |
1134 |
"X-Originating-IP:" ; Hotmail |
"X-Originating-IP:" ; Hotmail |
1166 |
Regexps are not allowed. Unique fields should have a \":\" suffix; otherwise, |
Regexps are not allowed. Unique fields should have a \":\" suffix; otherwise, |
1167 |
the element can be used to render invisible an entire class of fields that |
the element can be used to render invisible an entire class of fields that |
1168 |
start with the same prefix. |
start with the same prefix. |
1169 |
This variable is ignored if `mh-visible-headers' is set." |
This variable is ignored if the variable `mh-visible-headers' is set." |
1170 |
:type '(repeat (string :tag "Header field")) |
:type '(repeat (string :tag "Header field")) |
1171 |
:set 'mh-invisible-header-fields-set |
:set (lambda (symbol value) |
1172 |
|
(set-default symbol value) |
1173 |
|
(mh-invisible-headers)) |
1174 |
:group 'mh-show) |
:group 'mh-show) |
1175 |
|
|
1176 |
(defcustom mh-max-inline-image-height nil |
(defcustom mh-max-inline-image-height nil |
1240 |
:type 'boolean |
:type 'boolean |
1241 |
:group 'mh-show) |
:group 'mh-show) |
1242 |
|
|
1243 |
(defcustom mh-summary-height (or (and (fboundp 'frame-height) |
(defcustom mh-summary-height nil |
|
(> (frame-height) 24) |
|
|
(min 10 (/ (frame-height) 6))) |
|
|
4) |
|
1244 |
"*Number of lines in MH-Folder window (including the mode line)." |
"*Number of lines in MH-Folder window (including the mode line)." |
1245 |
:type 'integer |
:type '(choice (const :tag "Automatic" nil) |
1246 |
|
(integer :tag "Fixed sized")) |
1247 |
:group 'mh-show) |
:group 'mh-show) |
1248 |
|
|
1249 |
(defcustom mh-visible-headers nil |
(defvar mh-visible-headers nil |
1250 |
"*Contains a regexp specifying the headers to keep when cleaning. |
"*Regexp matching lines in a message header that are to be shown. |
1251 |
|
Customize the variable `mh-visible-header-fields' to generate this variable; |
1252 |
|
It will in turn automatically use the function `mh-visible-headers' to |
1253 |
|
generate this variable. |
1254 |
Only used if `mh-clean-message-header-flag' is non-nil. Setting it overrides |
Only used if `mh-clean-message-header-flag' is non-nil. Setting it overrides |
1255 |
the variable `mh-invisible-headers'." |
the variable `mh-invisible-headers'.") |
1256 |
:type '(choice (const nil) regexp) |
|
1257 |
|
(defun mh-visible-headers () |
1258 |
|
"Make or remake the variable `mh-visible-headers'. |
1259 |
|
Done using `mh-visible-header-fields' as input." |
1260 |
|
(if mh-visible-header-fields |
1261 |
|
(setq mh-visible-headers |
1262 |
|
(concat |
1263 |
|
"^" |
1264 |
|
(let ((max-specpdl-size 1000) ;workaround for insufficient default |
1265 |
|
(fields mh-visible-header-fields)) |
1266 |
|
(regexp-opt fields t)))) |
1267 |
|
(setq mh-visible-headers nil))) |
1268 |
|
|
1269 |
|
(defcustom mh-visible-header-fields nil |
1270 |
|
"*List of header fields that are to be shown. |
1271 |
|
Regexps are not allowed. Unique fields should have a \":\" suffix; otherwise, |
1272 |
|
the element can be used to render visible an entire class of fields that |
1273 |
|
start with the same prefix. |
1274 |
|
Only used if `mh-clean-message-header-flag' is non-nil. |
1275 |
|
Setting it overrides the variable `mh-invisible-headers'." |
1276 |
|
:type '(repeat (string :tag "Header field")) |
1277 |
|
:set (lambda (symbol value) |
1278 |
|
(set-default symbol value) |
1279 |
|
(mh-visible-headers)) |
1280 |
:group 'mh-show) |
:group 'mh-show) |
1281 |
|
|
1282 |
(defcustom mhl-formfile nil |
(defcustom mhl-formfile nil |
1306 |
:type '(choice (const nil) function) |
:type '(choice (const nil) function) |
1307 |
:group 'mh-letter) |
:group 'mh-letter) |
1308 |
|
|
1309 |
|
(defcustom mh-compose-prompt-flag nil |
1310 |
|
"*Non-nil means prompt for header fields when composing a new draft." |
1311 |
|
:type 'boolean |
1312 |
|
:group 'mh-letter) |
1313 |
|
|
1314 |
|
(defcustom mh-compose-skipped-header-fields |
1315 |
|
'("from" "organization" "references" "in-reply-to" "x-face" "face" |
1316 |
|
"x-mailer") |
1317 |
|
"List of header fields to skip over when navigating in draft." |
1318 |
|
:type '(repeat (string :tag "Field")) |
1319 |
|
:group 'mh-letter) |
1320 |
|
|
1321 |
|
(defcustom mh-compose-space-does-completion-flag nil |
1322 |
|
"*Non-nil means that SPACE does completion in message header." |
1323 |
|
:type 'boolean |
1324 |
|
:group 'mh-letter) |
1325 |
|
|
1326 |
(defcustom mh-delete-yanked-msg-window-flag nil |
(defcustom mh-delete-yanked-msg-window-flag nil |
1327 |
"*Non-nil means delete any window displaying the message. |
"*Non-nil means delete any window displaying the message. |
1328 |
Controls window display when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. |
Controls window display when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. |
1524 |
:type '(choice (boolean) (string)) |
:type '(choice (boolean) (string)) |
1525 |
:group 'mh-alias) |
:group 'mh-alias) |
1526 |
|
|
1527 |
|
(defcustom mh-alias-local-users-prefix "local." |
1528 |
|
"*String prepended to the real names of users from the passwd file. |
1529 |
|
If nil, use the username string unmodified instead of the real name from |
1530 |
|
the gecos field of the passwd file. |
1531 |
|
|
1532 |
|
For example, given the following passwd file line: |
1533 |
|
|
1534 |
|
psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh |
1535 |
|
|
1536 |
|
here are the derived aliases for different values of this variable: |
1537 |
|
|
1538 |
|
\"local.\" -> local.peter.galbraith |
1539 |
|
\"\" -> peter.galbraith |
1540 |
|
nii -> psg |
1541 |
|
|
1542 |
|
This variable is only meaningful if the variable `mh-alias-local-users' is |
1543 |
|
non-nil." |
1544 |
|
:type '(choice (const :tag "Use username instead of real name" nil) |
1545 |
|
(string)) |
1546 |
|
:group 'mh-alias) |
1547 |
|
|
1548 |
|
(defcustom mh-alias-passwd-gecos-comma-separator-flag t |
1549 |
|
"*Non-nil means the gecos field in the passwd file uses comma as a separator. |
1550 |
|
Used to construct aliases for users in the passwd file." |
1551 |
|
:type 'boolean |
1552 |
|
:group 'mh-alias) |
1553 |
|
|
1554 |
(defcustom mh-alias-system-aliases |
(defcustom mh-alias-system-aliases |
1555 |
'("/etc/nmh/MailAliases" "/usr/lib/mh/MailAliases" "/etc/passwd") |
'("/etc/nmh/MailAliases" "/usr/lib/mh/MailAliases" "/etc/passwd") |
1556 |
"*A list of system files from which to cull aliases. |
"*A list of system files from which to cull aliases. |
1565 |
|
|
1566 |
;;; Multiple personalities (:group 'mh-identity) |
;;; Multiple personalities (:group 'mh-identity) |
1567 |
|
|
1568 |
(defvar mh-identity-list ()) |
(defcustom mh-identity-list nil |
1569 |
|
"*List holding MH-E identity. |
1570 |
|
Omit the colon and trailing space from the field names. |
1571 |
|
The keyword name \"none\" is reserved for internal use. |
1572 |
|
Use the keyname name \"signature\" to specify either a signature file or a |
1573 |
|
function to call to insert a signature at point. |
1574 |
|
|
1575 |
|
Providing an empty Value (\"\") will cause the field to be deleted. |
1576 |
|
|
1577 |
|
Example entries using the customize interface: |
1578 |
|
Keyword name: work |
1579 |
|
From |
1580 |
|
Value: John Doe <john@work.com> |
1581 |
|
Organization |
1582 |
|
Value: Acme Inc. |
1583 |
|
Keyword name: home |
1584 |
|
From |
1585 |
|
Value: John Doe <johndoe@home.net> |
1586 |
|
Organization |
1587 |
|
Value: |
1588 |
|
|
1589 |
|
This would produce the equivalent of: |
1590 |
|
(setq mh-identity-list |
1591 |
|
'((\"work\" |
1592 |
|
((\"From\" . \"John Doe <john@work.com>\") |
1593 |
|
(\"Organization\" . \"Acme Inc.\"))) |
1594 |
|
(\"home\" |
1595 |
|
((\"From\" . \"John Doe <johndoe@home.net>\") |
1596 |
|
(\"Organization\" . \"\")))))" |
1597 |
|
:type '(repeat (list :tag "" |
1598 |
|
(string :tag "Keyword name") |
1599 |
|
(repeat :tag "At least one pair from below" |
1600 |
|
(choice (cons :tag "From field" |
1601 |
|
(const "From") |
1602 |
|
(string :tag "Value")) |
1603 |
|
(cons :tag "Organization field" |
1604 |
|
(const "Organization") |
1605 |
|
(string :tag "Value")) |
1606 |
|
(cons :tag "Signature" |
1607 |
|
(const "signature") |
1608 |
|
(choice (file) (function))) |
1609 |
|
(cons :tag "Other field & value pair" |
1610 |
|
(string :tag "Field") |
1611 |
|
(string :tag "Value")))))) |
1612 |
|
:set 'mh-identity-list-set |
1613 |
|
:group 'mh-identity) |
1614 |
|
|
1615 |
(defcustom mh-auto-fields-list nil |
(defcustom mh-auto-fields-list nil |
1616 |
"Alist of addresses for which header lines are automatically inserted. |
"Alist of addresses for which header lines are automatically inserted. |
1659 |
(mapcar 'car mh-identity-list)))) |
(mapcar 'car mh-identity-list)))) |
1660 |
:group 'mh-identity) |
:group 'mh-identity) |
1661 |
|
|
|
(defcustom mh-identity-list nil |
|
|
"*List holding MH-E identity. |
|
|
Omit the colon and trailing space from the field names. |
|
|
The keyword name \"none\" is reversed for internal use. |
|
|
Use the keyname name \"signature\" to specify either a signature file or a |
|
|
function to call to insert a signature at point. |
|
|
|
|
|
Providing an empty Value (\"\") will cause the field to be deleted. |
|
|
|
|
|
Example entries using the customize interface: |
|
|
Keyword name: work |
|
|
From |
|
|
Value: John Doe <john@work.com> |
|
|
Organization |
|
|
Value: Acme Inc. |
|
|
Keyword name: home |
|
|
From |
|
|
Value: John Doe <johndoe@home.net> |
|
|
Organization |
|
|
Value: |
|
|
|
|
|
This would produce the equivalent of: |
|
|
(setq mh-identity-list |
|
|
'((\"work\" |
|
|
((\"From\" . \"John Doe <john@work.com>\") |
|
|
(\"Organization\" . \"Acme Inc.\"))) |
|
|
(\"home\" |
|
|
((\"From\" . \"John Doe <johndoe@home.net>\") |
|
|
(\"Organization\" . \"\")))))" |
|
|
:type '(repeat (list :tag "" |
|
|
(string :tag "Keyword name") |
|
|
(repeat :tag "At least one pair from below" |
|
|
(choice (cons :tag "From field" |
|
|
(const "From") |
|
|
(string :tag "Value")) |
|
|
(cons :tag "Organization field" |
|
|
(const "Organization") |
|
|
(string :tag "Value")) |
|
|
(cons :tag "Signature" |
|
|
(const "signature") |
|
|
(choice (file) (function))) |
|
|
(cons :tag "Other field & value pair" |
|
|
(string :tag "Field") |
|
|
(string :tag "Value")))))) |
|
|
:set 'mh-identity-list-set |
|
|
:group 'mh-identity) |
|
|
|
|
1662 |
|
|
1663 |
|
|
1664 |
;;; Hooks (:group 'mh-hooks + group where hook defined) |
;;; Hooks (:group 'mh-hooks + group where hook defined) |
1718 |
:group 'mh-hooks |
:group 'mh-hooks |
1719 |
:group 'mh-folder) |
:group 'mh-folder) |
1720 |
|
|
1721 |
|
(defcustom mh-kill-folder-suppress-prompt-hook '(mh-index-p) |
1722 |
|
"Invoked at the beginning of the \\<mh-folder-mode-map>`\\[mh-kill-folder]' command. |
1723 |
|
This hook is a list of functions to be called, with no arguments, which should |
1724 |
|
return a value of non-nil if you should not be asked if you're sure that you |
1725 |
|
want to remove the folder. This is useful for folders that are easily |
1726 |
|
regenerated. |
1727 |
|
|
1728 |
|
The default value of `mh-index-p' suppresses the prompt on folders generated |
1729 |
|
by an index search. |
1730 |
|
|
1731 |
|
WARNING: Use this hook with care. If there is a bug in your hook which returns |
1732 |
|
t on +inbox and you hit \\<mh-folder-mode-map>`\\[mh-kill-folder]' by accident |
1733 |
|
in the +inbox buffer, you will not be happy." |
1734 |
|
:type 'hook |
1735 |
|
:group 'mh-hooks |
1736 |
|
:group 'mh-folder) |
1737 |
|
|
1738 |
(defcustom mh-letter-insert-signature-hook nil |
(defcustom mh-letter-insert-signature-hook nil |
1739 |
"Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-insert-signature] command. |
"Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-insert-signature] command. |
1740 |
Can be used to determine which signature file to use based on message content. |
Can be used to determine which signature file to use based on message content. |
2055 |
"Face for highlighting folders in MH-Index buffers." |
"Face for highlighting folders in MH-Index buffers." |
2056 |
:group 'mh-index-faces) |
:group 'mh-index-faces) |
2057 |
|
|
2058 |
|
|
2059 |
|
|
2060 |
|
;;; Faces used when composing messages. |
2061 |
|
|
2062 |
|
(defface mh-letter-header-field-face |
2063 |
|
'((((class color) (background light)) |
2064 |
|
(:background "gray90")) |
2065 |
|
(((class color) (background dark)) |
2066 |
|
(:background "gray10")) |
2067 |
|
(t (:bold t))) |
2068 |
|
"Face for displaying header fields in draft buffers." |
2069 |
|
:group 'mh-letter-faces) |
2070 |
|
|
2071 |
;;; Local Variables: |
;;; Local Variables: |
2072 |
;;; indent-tabs-mode: nil |
;;; indent-tabs-mode: nil |
2073 |
;;; sentence-end-double-space: nil |
;;; sentence-end-double-space: nil |