Debian Codegraph @

mew-vars.el

raw ◀ ▶
2 Debian patches touch this file
1 ;;; mew-vars.el --- Variables and Constants for Mew
2
3 ;; Author: Kazu Yamamoto <[email protected]>
4 ;; Created: Nov 22, 1997
5
6 ;;; Code:
7
8 (require 'mew-env)
9 (eval-when-compile
10 (require 'mew-env0))
11
12 ;;;
13 ;;; User option variables which are easy to set.
14 ;;;
15
16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17 ;;;
18 ;;; Defining groups
19 ;;;
20
21 (defgroup mew nil
22 "Messaging in the Emacs World."
23 :group 'mail)
24
25 (defgroup mew-basic nil
26 "Basic configuration."
27 :group 'mew)
28
29 (defgroup mew-env nil
30 "Basic environment."
31 :group 'mew)
32
33 (defgroup mew-folder nil
34 "Basic folder."
35 :group 'mew)
36
37 (defgroup mew-summary nil
38 "Summary mode."
39 :group 'mew)
40
41 (defgroup mew-message nil
42 "Message mode."
43 :group 'mew)
44
45 (defgroup mew-cache nil
46 "Message Caching."
47 :group 'mew)
48
49 (defgroup mew-draft nil
50 "Draft mode."
51 :group 'mew)
52
53 (defgroup mew-cite nil
54 "Citation."
55 :group 'mew)
56
57 (defgroup mew-reply nil
58 "Reply to message."
59 :group 'mew)
60
61 (defgroup mew-refile nil
62 "Refiling."
63 :group 'mew)
64
65 (defgroup mew-complete nil
66 "Completion."
67 :group 'mew)
68
69 (defgroup mew-highlight nil
70 "Highlight."
71 :group 'faces
72 :group 'mew)
73
74 (defgroup mew-privacy nil
75 "Privacy setting."
76 :group 'mew)
77
78 (defgroup mew-addrbook nil
79 "Address book."
80 :group 'mew)
81
82 (defgroup mew-net nil
83 "Network."
84 :group 'mew)
85
86 (defgroup mew-pop nil
87 "POP."
88 :group 'mew)
89
90 (defgroup mew-smtp nil
91 "SMTP."
92 :group 'mew)
93
94 (defgroup mew-imap nil
95 "IMAP."
96 :group 'mew)
97
98 (defgroup mew-nntp nil
99 "NNTP."
100 :group 'mew)
101
102 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
103 ;;;
104 ;;; Environment variables
105 ;;;
106
107 (defcustom mew-rc-file "~/.mew"
108 "*A file to be loaded after Mew's variables are initialized."
109 :group 'mew-env
110 :type 'file)
111
112 (defcustom mew-mail-path "~/Mail"
113 "*A directory where folders locate."
114 :group 'mew-env
115 :type 'directory)
116
117 (defcustom mew-conf-path mew-mail-path
118 "*A directory where Mew's configuration files locate."
119 :group 'mew-env
120 :type 'directory)
121
122 (defcustom mew-suffix ".mew"
123 "*Suffix of message files. This suffix will be added if
124 `mew-use-suffix` is non-nil."
125 :group 'mew-env
126 :type 'string)
127
128 (defcustom mew-pop-inbox-folder "$inbox"
129 "*The default folder for POP."
130 :group 'mew-folder
131 :type 'string)
132
133 (defcustom mew-imap-inbox-folder "%inbox"
134 "*The default folder for IMAP."
135 :group 'mew-folder
136 :type 'string)
137
138 (defcustom mew-imap-queue-folder "%queue"
139 "*The queue folder for IMAP jobs."
140 :group 'mew-folder
141 :type 'string)
142
143 (defcustom mew-imap-trash-folder "%trash"
144 "*The trash folder for IMAP. If non-nil, deleted messages are
145 moved to this folder. Deleting messages in this folder makes them
146 really deleted."
147 :group 'mew-folder
148 :type '(choice string (const nil)))
149
150 (defcustom mew-imap-trash-folder-list nil
151 "*A list of IMAP folders whose messages marked with 'D' are really deleted."
152 :group 'mew-summary
153 :type '(choice (const nil) (repeat string)))
154
155 (defcustom mew-inbox-folder "+inbox"
156 "*The folder where new messages are incorporated."
157 :group 'mew-folder
158 :type 'string)
159
160 (defcustom mew-draft-folder "+draft"
161 "*The folder where draft are contained."
162 :group 'mew-folder
163 :type 'string)
164
165 (defcustom mew-trash-folder "+trash"
166 "*The trash folder."
167 :group 'mew-folder
168 :type '(choice string (const nil)))
169
170 (defcustom mew-trash-folder-list nil
171 "*A list of folders whose messages marked with 'D' are really deleted."
172 :group 'mew-summary
173 :type '(choice (const nil) (repeat string)))
174
175 (defcustom mew-queue-folder "+queue"
176 "*The queue folder to send messages."
177 :group 'mew-folder
178 :type 'string)
179
180 (defcustom mew-postq-folder "+postq"
181 "*The queue folder to post messages."
182 :group 'mew-folder
183 :type 'string)
184
185 (defcustom mew-attach-folder "+attach"
186 "*The folder where attachments are contained."
187 :group 'mew-folder
188 :type 'string)
189
190 (defcustom mew-friend-folder "+from"
191 "*The folder where personal messages are refiled."
192 :group 'mew-folder
193 :type 'string)
194
195 (defcustom mew-imap-friend-folder "%from"
196 "*The folder where personal messages are refiled for IMAP."
197 :group 'mew-folder
198 :type 'string)
199
200 (defcustom mew-imap-spam-field nil
201 "*The field name of anti spam information to be used for IMAP spam filter.
202 If both 'mew-imap-spam-field' and 'mew-imap-spam-word' are defined,
203 messages whose the field contains the word are automatically
204 removed or refiled to 'mew-imap-spam-folder' or 'mew-imap-trash-folder'
205 \(if defined) while scanning %inbox."
206 :group 'mew-imap
207 :type '(choice (const :tag "Not use" nil)
208 (string :tag "Spam field")))
209
210 (defcustom mew-imap-spam-word nil
211 "*The word of anti spam information to be used for IMAP spam filter.
212 See 'mew-imap-spam-field'."
213 :group 'mew-imap
214 :type '(choice (const :tag "Not use" nil)
215 (string :tag "Spam word")))
216
217 (defcustom mew-imap-spam-pattern nil
218 "*IMAP SEARCH pattern to filter spams.
219 If non-nil, 'mew-imap-spam-field' and 'mew-imap-spam-field'
220 treated as 'nil'."
221 :group 'mew-imap
222 :type '(choice (const :tag "Not use" nil)
223 (string :tag "Spam word")))
224
225 (defcustom mew-imap-spam-folder nil
226 "*A folder to be used for IMAP spam filter.
227 See 'mew-imap-spam-field'."
228 :group 'mew-imap
229 :type '(choice (const :tag "Not use" nil)
230 (string :tag "Spam folder")))
231
232 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
233 ;;;
234 ;;; Hooks
235 ;;;
236
237 (defcustom mew-env-hook nil
238 "*Hook called at initialize time before setting environment."
239 :group 'mew-env
240 :type 'hook)
241
242 (defcustom mew-init-hook nil
243 "*Hook called at initialize time."
244 :group 'mew-env
245 :type 'hook)
246
247 (defcustom mew-summary-mode-hook nil
248 "*Hook called in Summary mode."
249 :group 'mew-summary
250 :type 'hook)
251
252 (defcustom mew-virtual-mode-hook nil
253 "*Hook called in Virtual mode."
254 :group 'mew-summary
255 :type 'hook)
256
257 (defcustom mew-thread-display-hook nil
258 "*Hook called after new threads are displayed."
259 :group 'mew-summary
260 :type 'hook)
261
262 (defcustom mew-header-mode-hook nil
263 "*Hook called in Header mode."
264 :group 'mew-draft
265 :type 'hook)
266
267 (defcustom mew-draft-mode-hook nil
268 "*Hook called in Draft mode."
269 :group 'mew-draft
270 :type 'hook)
271
272 (defcustom mew-draft-mode-newdraft-hook nil
273 "*Hook called in Draft mode only when new draft is prepared."
274 :group 'mew-draft
275 :type 'hook)
276
277 (defcustom mew-draft-mode-reedit-hook nil
278 "*Hook called in Draft mode when a message not in +draft or +queue
279 is re-edited."
280 :group 'mew-draft
281 :type 'hook)
282
283 (defcustom mew-draft-mode-reedit-draft-hook nil
284 "*Hook called in Draft mode when a message in +draft is re-edited."
285 :group 'mew-draft
286 :type 'hook)
287
288 (defcustom mew-draft-mode-reedit-queue-hook nil
289 "*Hook called in Draft mode when a message in +queue is re-edited."
290 :group 'mew-draft
291 :type 'hook)
292
293 (defcustom mew-draft-mode-edit-hook nil
294 "*Hook called in Edit mode"
295 :group 'mew-draft
296 :type 'hook)
297
298 (defcustom mew-draft-mode-edit-again-hook nil
299 "*Hook called in Draft mode when a message returned with the old style
300 is edited again."
301 :group 'mew-draft
302 :type 'hook)
303
304 (defcustom mew-message-mode-hook nil
305 "*Hook called in Message mode."
306 :group 'mew-message
307 :type 'hook)
308
309 (defcustom mew-message-hook nil
310 "*Hook called whenever message displayed."
311 :group 'mew-message
312 :type 'hook)
313
314 (defcustom mew-make-message-hook nil
315 "*Hook called before making a message in Draft mode. A good example
316 is as follows:
317 (add-hook 'mew-make-message-hook 'ispell-message)"
318 :group 'mew-draft
319 :type 'hook)
320
321 (defcustom mew-send-hook nil
322 "*Hook called before sending/queuing an e-mail message in Draft mode.
323 Note that this hook is called before composition of the message."
324 :group 'mew-draft
325 :type 'hook)
326
327 (defcustom mew-post-hook nil
328 "*Hook called before posting/queuing a NetNews message in Draft mode.
329 Note that this hook is called before composition of the message."
330 :group 'mew-draft
331 :type 'hook)
332
333 (defcustom mew-real-send-hook nil
334 "*Hook called before sending/queuing an e-mail message in Draft mode.
335 Note that this hook is called after composition of the message."
336 :group 'mew-draft
337 :type 'hook)
338
339 (defcustom mew-real-post-hook nil
340 "*Hook called before sending/queuing a NetNews message in Draft mode.
341 Note that this hook is called after composition of the message."
342 :group 'mew-draft
343 :type 'hook)
344
345 (defcustom mew-smtp-flush-hook nil
346 "*Hook called before SMTP runs if messages exist in +queue."
347 :group 'mew-draft
348 :type 'hook)
349
350 (defcustom mew-nntp2-flush-hook nil
351 "*Hook called before NNTP runs if messages exist in +postq"
352 :group 'mew-draft
353 :type 'hook)
354
355 (defcustom mew-smtp-sentinel-hook nil
356 "*Hook called when a SMTP process finished."
357 :group 'mew-draft
358 :type 'hook)
359
360 (defcustom mew-nntp-sentinel-hook nil
361 "*Hook called when a NNTP process to receive messages finished."
362 :group 'mew-summary
363 :type 'hook)
364
365 (defcustom mew-nntp2-sentinel-hook nil
366 "*Hook called when a NNTP process to post messages finished."
367 :group 'mew-draft
368 :type 'hook)
369
370 (defcustom mew-pop-sentinel-hook nil
371 "*Hook called when a POP process finished."
372 :group 'mew-summary
373 :type 'hook)
374
375 (defcustom mew-pop-sentinel-non-biff-hook nil
376 "*Hook called when a non-Biff POP process finished."
377 :group 'mew-summary
378 :type 'hook)
379
380 (defcustom mew-imap-sentinel-hook nil
381 "*Hook called when an IMAP process finished."
382 :group 'mew-summary
383 :type 'hook)
384
385 (defcustom mew-imap-sentinel-non-biff-hook nil
386 "*Hook called when a non-Biff IMAP process finished."
387 :group 'mew-summary
388 :type 'hook)
389
390 (defcustom mew-scan-sentinel-hook nil
391 "*Hook called when scan finished."
392 :group 'mew-summary
393 :type 'hook)
394
395 (defcustom mew-summary-ls-no-scan-hook nil
396 "*Hook called when mew-summary-ls does not scan a folder."
397 :group 'mew-summary
398 :type 'hook)
399
400 (defcustom mew-summary-exec-hook nil
401 "*Hook called when mew-summary-exec finished."
402 :group 'mew-summary
403 :type 'hook)
404
405 (defcustom mew-sort-hook nil
406 "*Hook called when sort finished."
407 :group 'mew-summary
408 :type 'hook)
409
410 (defcustom mew-summary-toggle-disp-msg-hook nil
411 "*Hook called when mew-summary-toggle-disp-msg finished."
412 :group 'mew-summary
413 :type 'hook)
414
415 (defcustom mew-summary-delete-folder-hook nil
416 "*Hook called when a folder deleted.
417 Eash function is called with a deleted folder as the argument."
418 :group 'mew-summary
419 :type 'hook)
420
421 (defcustom mew-summary-rename-folder-hook nil
422 "*Hook called when a folder renamed.
423 Each function is called with a source folder and a destination
424 folder as the argument."
425 :group 'mew-summary
426 :type 'hook)
427
428 (defcustom mew-syntax-format-hook nil
429 "*Hook called when mew-syntax-format is called."
430 :group 'mew-message
431 :type 'hook)
432
433 (defcustom mew-addrbook-mode-hook nil
434 "*Hook called in Addrbook mode."
435 :group 'mew-addrbook
436 :type 'hook)
437
438 (defcustom mew-suspend-hook nil
439 "*Hook called on suspend."
440 :group 'mew-env
441 :type 'hook)
442
443 (defcustom mew-quit-hook nil
444 "*Hook called on quit."
445 :group 'mew-env
446 :type 'hook)
447
448 (defcustom mew-status-update-hook nil
449 "*Hook called to update status."
450 :group 'mew-env
451 :type 'hook)
452
453 (defcustom mew-refile-guess-by-from-learn-hook nil
454 "*Hook called in mew-refile-guess-by-from-learn."
455 :group 'mew-env
456 :type 'hook)
457
458 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
459 ;;;
460 ;;; Mail Addresses for Draft
461 ;;;
462
463 (defcustom mew-mail-address-list nil
464 "*The addresses included in this list never appear on the Cc: field
465 on a draft buffer. If nil, this value is automatically generated from
466 'mew-config-alist'."
467 :group 'mew-draft
468 :type '(choice (const nil) (repeat string)))
469
470 (defcustom mew-mail-domain-list nil
471 "*Your e-mail address domain list like
472 \(\"example.org\" \"example.jp\").
473 They are used for mail-domain completion in Draft mode(C-cTAB). If
474 nil, this value is automatically generated from 'mew-config-alist'."
475 :group 'mew-draft
476 :type '(choice (const nil) (repeat string)))
477
478 (defcustom mew-from-list nil
479 "*A list of From: for circular completion in Draft mode. If nil,
480 this value is automatically generated from 'mew-config-alist'. See
481 also 'mew-from'."
482 :group 'mew-draft
483 :type '(choice (const nil) (repeat string)))
484
485 (defcustom mew-warn-addresses nil
486 "A list of addresses to be warned."
487 :group 'mew-draft
488 :type '(choice (const nil) (repeat string)))
489
490 (defcustom mew-safe-addresses nil
491 "A list of addresses not to be warned."
492 :group 'mew-draft
493 :type '(choice (const nil) (repeat string)))
494
495 (defcustom mew-warn-domains nil
496 "A list of domains to be warned."
497 :group 'mew-draft
498 :type '(choice (const nil) (repeat string)))
499
500 (defcustom mew-safe-domains nil
501 "A list of domains not to be warned."
502 :group 'mew-draft
503 :type '(choice (const nil) (repeat string)))
504
505 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
506 ;;;
507 ;;; Mail Addresses
508 ;;;
509
510 (defcustom mew-name (user-full-name)
511 "*Friendly name of e-mail address.
512 i.e. \"Friendly name <user@mail-domain>\"."
513 :group 'mew-basic
514 :type '(choice string (const nil)))
515
516 (defcustom mew-user (user-login-name)
517 "*User part of e-mail address."
518 :group 'mew-basic
519 :type 'string)
520
521 (defcustom mew-mail-domain (or (car mew-mail-domain-list)
522 mail-host-address
523 (system-name))
524 "*Your e-mail address domain."
525 :group 'mew-basic
526 :type 'string)
527
528
529 (defvar mew-reply-all-alist
530 '((("Followup-To:" "poster")
531 ("To:" "From:"))
532 ("Followup-To:"
533 ("Newsgroups:" "Followup-To:" "Newsgroups:"))
534 ("Newsgroups:"
535 ("Newsgroups:" "Newsgroups:"))
536 ("Reply-To:"
537 ("To:" "Reply-To:" "From:")
538 ("Cc:" "To:" "Cc:" "Apparently-To:"))
539 (t
540 ("To:" "From:")
541 ("Cc:" "To:" "Cc:" "Apparently-To:")))
542 "*Alist to be used to prepare To:/Cc:/Newsgroups: in a reply draft.
543 For most cases, this alist is used.
544 For more infomation, see the document of '\\<mew-summary-mode-map>\\[mew-summary-reply]'")
545
546 (defvar mew-reply-sender-alist
547 '(("Reply-To:"
548 ("To:" "Reply-To:" "From:"))
549 (t
550 ("To:" "From:")))
551 "*Alist to be used to prepare To:/Cc:/Newsgroups: in a reply draft.
552 When '\\[universal-argument]' is specified for '\\<mew-summary-mode-map>\\[mew-summary-reply]' and '\\[mew-summary-reply-with-citation]', this alist is used.
553 For more infomation, see the document of '\\[mew-summary-reply]'")
554
555 (defvar mew-reply-fromme-alist
556 '((t
557 ("To:" "To:")
558 ("Cc:" "Cc:")
559 ("Newsgroups:" "Newsgroups:")))
560 "*Alist to be used to prepare To:/Cc:/Newsgroups: in a reply draft.
561 When the message to be replied is sent/posted by ME, this alist is used.
562 For more infomation, see the document of '\\<mew-summary-mode-map>\\[mew-summary-reply]'")
563
564 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
565 ;;;
566 ;;; SSH/SSL/TLS
567 ;;;
568
569 (defcustom mew-ssh-keep-connection t
570 "*If non-nil, an SSH process for each service (POP, IMAP, NNTP, SMTP)
571 is kept for further connections. This must be 't' for IMAP and NNTP."
572 :group 'mew-net
573 :type 'boolean)
574
575 (defcustom mew-ssl-keep-connection t
576 "*If non-nil, an SSL/TLS process for each service (POP, IMAP, NNTP, SMTP)
577 is kept for further connections. This must be 't' for IMAP and NNTP."
578 :group 'mew-net
579 :type 'boolean)
580
•581 (defcustom mew-ssl-default 'tunnel
582 "*Default SSL/TLS type when mew-{imap,nntp,pop,smtp}-ssl is 't'."
583 :group 'mew-net
584 :type '(choice (const :tag "Native (GnuTLS)" native)
585 (const :tag "External (stunnel)" tunnel)))
586
587 ;; XXX: the default value of gnutls-trustfiles can
588 ;; be different from the compile-time list.
589 (defcustom mew-ssl-trustfiles nil
590 "List of CA buldle location filenames used by GnuTLS.
591 nil - use the default list specified at compile time of the Emacs."
592 :group 'mew-net
593 :type '(choice (const :tag "System Default" nil)
594 (repeat string)))
595
596 (defcustom mew-ssl-algorithm-priority nil
597 "TLS priority string used by GnuTLS.
598 nil - use the default specified by Emacs Network Security Manager."
599 :group 'mew-net
600 :type '(choice (const :tag "System Default" nil)
601 (string :tag "Priority string")))
602
603 (defcustom mew-ssl-client-keycert-list nil
604 "The client-side certificate used for TLS connection.
605 '((\"keyfile\" \"certfile\")) - A list of key/cert pairs."
606 :group 'mew-net
607 :type '(choice (const :tag "None" nil)
608 (repeat string)))
609
610 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
611 ;;;
612 ;;; SMTP
613 ;;;
614
615 (defcustom mew-smtp-server "localhost"
616 "*The name of your SMTP server. If you want to use a remote SMTP
617 server, set an appropriate value."
618 :group 'mew-smtp
619 :type 'string)
620
621 (defcustom mew-smtp-port "smtp"
•622 "*The SMTP port. (e.g. \"smtp\" or 25)"
623 :group 'mew-smtp
•624 :type 'string)
625
626 (defcustom mew-smtp-ssh-server nil
627 "*The name of SSH server which forwards the SMTP port."
628 :group 'mew-smtp
629 :type '(choice (const :tag "Not use" nil)
630 (string :tag "Ssh server")))
631
632 (defcustom mew-smtp-ssl nil
•633 "*If non-nil, SMTP connections are made over SSL/TLS.
634 native - Use GnuTLS (this requires Emacs compiled with GnuTLS
635 library). When mew-smtp-ssl-port is equal to
636 mew-smtp-port, a plain connection will be opened and
637 upgraded by STARTTLS.
638 tunnel - Use an external program to establish a TLS tunnel.
639 stunnel(1) utility is used by default."
640 :group 'mew-smtp
•641 :type '(choice (const :tag "No TLS/SSL" nil)
642 (const :tag "Native (GnuTLS)" native)
643 (const :tag "External (stunnel)" tunnel)))
644
•645 (defcustom mew-smtp-ssl-port 465 ;; RFC 8314
646 "*The port for SMTP over SSL/TLS. Set this to \"smtp\" if you
647 want to use TLS."
648 :group 'mew-smtp
649 :type 'string)
650
651 (defcustom mew-smtp-user nil
652 "*The user name on your SMTP server. If not configured,
653 your e-mail address is automatically set"
654 :group 'mew-smtp
655 :type '(choice string (const nil)))
656
657 (defcustom mew-smtp-auth-list '("CRAM-MD5" "PLAIN" "LOGIN")
658 "*A list of SMTP AUTH methods in the preferred order.
659 Currently, \"CRAM-MD5\", \"PLAIN\", \"LOGIN\", and \"XOAUTH2\" can be used."
660 :group 'mew-smtp
661 :type '(repeat (choice (const "CRAM-MD5") (const "PLAIN") (const "LOGIN") (const "XOAUTH2"))))
662
663 (defcustom mew-smtp-helo-domain "localhost"
664 "*An e-mail domain to tell a SMTP server with HELO/EHLO."
665 :group 'mew-smtp
666 :type 'string)
667
668 (defcustom mew-smtp-mail-from nil
669 "*An e-mail address to tell a SMTP server with MAIL FROM:.
670 If nil, an address specified by the From: field is used."
671 :group 'mew-smtp
672 :type '(choice string (const nil)))
673
674 (defcustom mew-smtp-msgid-user nil
675 "*A user part for creation of Message-Id: for SMTP. If nil, the
676 value of 'mew-user' is used."
677 :group 'mew-smtp
678 :type '(choice string (const nil)))
679
680 (defcustom mew-smtp-msgid-domain nil
681 "*A domain name for creation of Message-Id: for SMTP. If nil, the
682 value of 'mew-mail-domain' is used."
683 :group 'mew-smtp
684 :type '(choice string (const nil)))
685
686 (defvar mew-smtp-timeout-time 4)
687
688 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
689 ;;;
690 ;;; Retrieving messages
691 ;;;
692
693 (defcustom mew-mailbox-type 'pop
694 "'pop, 'imap or 'mbox"
695 :group 'mew-net
696 :type '(choice (const pop) (const imap) (const mbox)))
697
698 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
699 ;;;
700 ;;; mbox
701 ;;;
702
703 (defcustom mew-mbox-command "incm"
704 "*A command to be execute if 'mew-mailbox-type' is 'mbox."
705 :group 'mew-pop
706 :type '(choice string (const nil)))
707
708 (defcustom mew-mbox-command-arg "-u"
709 "*Arguments for 'mew-mbox-command'.
710 For maildir, set this to '-u -d /path/to/mbox'."
711 :group 'mew-pop
712 :type '(choice string (const nil)))
713
714 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
715 ;;;
716 ;;; Biff
717 ;;;
718
719 (defcustom mew-biff-interval 5
720 "*Minutes of biff interval. This should be smaller than
721 'mew-passwd-timer-unit' * 'mew-passwd-lifetime'."
722 :group 'mew-net
723 :type 'integer)
724
725 (defcustom mew-biff-function 'mew-biff-bark
726 "*A function to be called when messages arrive."
727 :group 'mew-net
728 :type '(choice function (const nil)))
729
730 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
731 ;;;
732 ;;; POP
733 ;;;
734
735 (defcustom mew-pop-server "localhost"
736 "*The name of your POP server. If you want to use a remote POP
737 server, set an appropriate value."
738 :group 'mew-pop
•739 :type 'string)
740
•741 (defcustom mew-pop-port "pop3"
742 "*The POP3 port. (e.g. \"pop3\" or 110)"
743 :group 'mew-pop
744 :type 'string)
745
746 (defcustom mew-pop-ssh-server nil
747 "*The name of SSH server which forwards the POP3 port."
748 :group 'mew-pop
749 :type '(choice string (const nil)))
750
751 (defcustom mew-pop-ssl nil
•752 "*If non-nil, POP connections are made over SSL/TLS.
753 native - Use GnuTLS (this requires Emacs compiled with GnuTLS
754 library). When mew-pop-ssl-port is equal to
755 mew-pop-port, a plain connection will be opened and
756 upgraded by STARTTLS.
757 tunnel - Use an external program to establish a TLS tunnel.
758 stunnel(1) utility is used by default."
759 :group 'mew-pop
•760 :type '(choice (const :tag "No TLS/SSL" nil)
761 (const :tag "Native (GnuTLS)" native)
762 (const :tag "External (stunnel)" tunnel)))
763
764 (defcustom mew-pop-ssl-port "pop3s"
765 "*The port for POP over SSL/TLS."
766 :group 'mew-pop
767 :type 'string)
768
769 (defcustom mew-pop-user (user-login-name)
770 "*The user name on your POP server."
771 :group 'mew-pop
772 :type 'string)
773
774 (defcustom mew-pop-auth 'apop
775 "*The authentication method for POP3.
776 'pass means the authentication with USER/PASS (i.e. plain password).
777 'apop means the authentication with APOP.
778 t means SASL according to 'mew-pop-auth-list'."
779 :group 'mew-pop
780 :type '(choice (const apop) (const pass) (const t)))
781
782 (defcustom mew-pop-auth-list '("CRAM-MD5" "PLAIN")
783 "*A list of SASL methods in the preferred order.
784 Currently, \"CRAM-MD5\", \"PLAIN\", and \"XOAUTH2\" can be used."
785 :group 'mew-pop
786 :type '(repeat (choice (const "CRAM-MD5") (const "PLAIN") (const "XOAUTH2"))))
787
788 (defcustom mew-pop-delete t
789 "*Whether or not delete messages on a POP server after retrieval by
790 POP. If t, delete the messages. If nil, retain the messages. If
791 number N, delete the messages N days after the first access.
792 Otherwise they are not deleted."
793 :group 'mew-pop
794 :type '(choice
795 (const :tag "Delete immediately" t)
796 (const :tag "Retain the messages" nil)
797 (integer :tag "Delete N days after")))
798
799 (defcustom mew-pop-size (* 54 1024) ;; 4K hdr + 50K bdy
800 "*The limit size of messages to be retrieved by POP. The default is
801 55296 byte. 0 means unlimited, so you can get all messages from the
802 POP server."
803 :group 'mew-pop
804 :type 'integer)
805
806 (defcustom mew-pop-body-lines 40
807 "*The limit of body lines to get when the size of message
808 exceeds 'mew-pop-size'."
809 :group 'mew-pop
810 :type 'integer)
811
812 (defcustom mew-pop-header-only nil
813 "*Whether or not the body of a message is retrieved by POP.
814 If non-nil, only header is retrieved."
815 :group 'mew-pop
816 :type 'boolean)
817
818 (defcustom mew-pop-proxy-server nil
819 "*The name of POP proxy server."
820 :group 'mew-pop
821 :type '(choice (const :tag "Not use" nil)
822 (string :tag "Pop proxy server")))
823
824 (defcustom mew-pop-proxy-port nil
825 "*The port for POP proxy."
826 :group 'mew-pop
827 :type '(choice string (const nil)))
828
•829 (defvar mew-pop-timeout-time 4)
830
•831 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
832 ;;;
•833 ;;; IMAP
834 ;;;
835
836 (defcustom mew-imap-server "localhost"
837 "*The name of your IMAP server. If you want to use a remote IMAP
838 server, set an appropriate value."
839 :group 'mew-imap
840 :type 'string)
841
842 (defcustom mew-imap-port "imap"
843 "*The IMAP4 port. (e.g. \"imap\" or 143)"
844 :group 'mew-imap
845 :type 'string)
846
847 (defcustom mew-imap-ssh-server nil
848 "*The name of SSH server which forwards the IMAP4 port."
849 :group 'mew-imap
850 :type '(choice string (const nil)))
851
852 (defcustom mew-imap-ssl nil
•853 "*If non-nil, IMAP connections are made over SSL/TLS.
854 native - Use GnuTLS (this requires Emacs compiled with GnuTLS
855 library). When mew-imap-ssl-port is equal to
856 mew-imap-port, a plain connection will be opened and
857 upgraded by STARTTLS.
858 tunnel - Use an external program to establish a TLS tunnel.
859 stunnel(1) utility is used by default."
860 :group 'mew-imap
•861 :type '(choice (const :tag "No TLS/SSL" nil)
862 (const :tag "Native (GnuTLS)" native)
863 (const :tag "External (stunnel)" tunnel)))
864
865 (defcustom mew-imap-ssl-port "imaps"
866 "*The port for IMAP over SSL/TLS."
867 :group 'mew-imap
868 :type 'string)
869
870 (defcustom mew-imap-user (user-login-name)
871 "*The user name on the IMAP server."
872 :group 'mew-imap
873 :type 'string)
874
875 (defcustom mew-imap-auth t
876 "*The authentication method for IMAP4.
877 nil means the authentication with LOGIN (i.e. plain password).
878 t means SASL according to 'mew-imap-auth-list'."
879 :group 'mew-imap
880 :type 'boolean)
881
882 (defcustom mew-imap-auth-list '("CRAM-MD5" "LOGIN")
883 "*A list of SASL methods in the preferred order.
884 Currently, \"CRAM-MD5\", \"LOGIN\", and \"XOAUTH2\" can be used."
885 :group 'mew-imap
886 :type '(repeat (choice (const "CRAM-MD5") (const "LOGIN") (const "XOAUTH2"))))
887
888 (defcustom mew-imap-delete t
889 "*Whether or not delete messages on an IMAP server after retrieval by
890 IMAP. If t, delete the messages. If nil, retain the messages. If
891 number N, delete the messages N days after the first access.
892 Otherwise they are not deleted."
893 :group 'mew-imap
894 :type 'boolean)
895
896 (defcustom mew-imap-size (* 54 1024) ;; 4K hdr + 50K bdy
897 "*The limit size of messages to be retrieved by IMAP. The default is
898 55296 byte. 0 means unlimited, so you can get all messages from the
899 IMAP server."
900 :group 'mew-imap
901 :type 'integer)
902
903 (defcustom mew-imap-header-only nil
904 "*Whether or not the body of a message is retrieved by IMAP.
905 If non-nil, only header is retrieved."
906 :group 'mew-imap
907 :type 'boolean)
908
909 (defcustom mew-imap-prefix-list nil
910 "A list to define which prefixes of user mailboxes should be used.
911
912 For example, the WU IMAP server returns the following value
913 for the NAMESPACE command.
914
915 ((\"\" \"/\")(\"#mhinbox\" NIL)(\"#mh/\" \"/\")) ((\"/\" \"/\")) ((\"#shared/\" \"/\")(\"#ftp/\" \"/\")(\"#news.\" \".\")(\"#public/\" \"/\"))
916
917 The first list is prefixes of user mailboxes. Each element consists
918 of a prefix and a separator.
919
920 If this valuable is nil, the prefix in the first element of the
921 list is used as a prefix of user mailboxes.
922
923 If this value is a list of strings, matched elements are used.
924 If the separator is non-nil, the prefix is used. If the separator
925 is nil, the prefix is added to mailbox alist as a mailbox.
926
927 If you want to used your home directory with WU, configure as
928 follows:
929
930 (setq mew-imap-prefix-list '(\"\"))
931
932 If you want to used the MH directory with WU, configure as
933 follows:
934
935 (setq mew-imap-prefix-list '(\"#mh/\" \"#mhinbox\"))
936
937 Note that %inbox means /var/mail/<user> while %#mhinbox refers to
938 Mail/inbox.
939 "
940 :group 'mew-imap
941 :type '(choice (const nil) (repeat string)))
942
943 (defcustom mew-imap-proxy-server nil
944 "*The name of IMAP proxy server."
945 :group 'mew-imap
946 :type '(choice (const :tag "Not use" nil)
947 (string :tag "Imap proxy server")))
948
949 (defcustom mew-imap-proxy-port nil
950 "*The port for IMAP proxy."
951 :group 'mew-imap
952 :type '(choice string (const nil)))
953
954 (defvar mew-imap-timeout-time 4)
955
956 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
957 ;;;
958 ;;; NNTP
959 ;;;
960
961 (defcustom mew-nntp-server "localhost"
962 "*The name of your NNTP server. If you want to use a remote NNTP
963 server, set an appropriate value."
964 :group 'mew-nntp
965 :type 'string)
966
967 (defcustom mew-nntp-port "nntp"
968 "*The NNTP port. (e.g. \"nntp\" or 119)"
969 :group 'mew-nntp
970 :type 'string)
971
972 (defcustom mew-nntp-ssh-server nil
973 "*The name of SSH server which forwards the NNTP port."
974 :group 'mew-nntp
975 :type '(choice string (const nil)))
976
977 (defcustom mew-nntp-ssl nil
•978 "*If non-nil, NNTP connections are made over SSL/TLS.
979 native - Use GnuTLS (this requires Emacs compiled with GnuTLS
980 library). When mew-nntp-ssl-port is equal to
981 mew-nntp-port, a plain connection will be opened and
982 upgraded by STARTTLS.
983 tunnel - Use an external program to establish a TLS tunnel.
984 stunnel(1) utility is used by default."
985 :group 'mew-nntp
•986 :type '(choice (const :tag "No TLS/SSL" nil)
987 (const :tag "Native (GnuTLS)" native)
988 (const :tag "External (stunnel)" tunnel)))
989
990 (defcustom mew-nntp-ssl-port "nntps"
991 "*The port for NNTP over SSL/TLS."
992 :group 'mew-nntp
993 :type 'string)
994
995 (defcustom mew-nntp-user nil
996 "*The user name on the NNTP server. If non-nil, authentication is
997 used."
998 :group 'mew-nntp
999 :type '(choice (const :tag "Not use" nil)
1000 (string :tag "Nntp user")))
1001
1002 (defcustom mew-nntp-newsgroup "-fj.mail.reader.mew"
1003 "*The name of default Newsgroup."
1004 :group 'mew-nntp
1005 :type 'string)
1006
1007 (defcustom mew-nntp-size (* 54 1024) ;; 4K hdr + 50K bdy
1008 "*The limit size of messages to be retrieved by NNTP. The default is
1009 55296 byte. 0 means unlimited, so you can get all messages from the
1010 NNTP server."
1011 :group 'mew-nntp
1012 :type 'integer)
1013
1014 (defcustom mew-nntp-header-only nil
1015 "*Whether or not the body of a message is retrieved by NNTP.
1016 If non-nil, only header is retrieved."
1017 :group 'mew-nntp
1018 :type 'boolean)
1019
1020 (defcustom mew-nntp-msgid-user nil
1021 "*A user part for creation of Message-Id: for NNTP. If nil, the
1022 value of 'mew-user' is used."
1023 :group 'mew-nntp
1024 :type '(choice string (const nil)))
1025
1026 (defcustom mew-nntp-msgid-domain nil
1027 "*A domain name for creation of Message-Id: for NNTP. If nil, the
1028 value of 'mew-mail-domain' is used."
1029 :group 'mew-nntp
1030 :type '(choice string (const nil)))
1031
1032 (defvar mew-nntp-timeout-time 4)
1033
1034 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1035 ;;;
1036 ;;; range
1037 ;;;
1038
1039 (defcustom mew-range-list nil
1040 "*A list of (KEY VALUE) to define RANGE for each folder.
1041
1042 If KEY is t, all folders matches it. The corresponding RANGE is
1043 returned always.
1044
1045 If KEY is a string, match-function is applied according to
1046 'mew-range-list-string-type'. If matched, the corresponding RANGE is
1047 returned.
1048
1049 If KEY is a list of strings, match-function is applied according to
1050 'mew-range-list-list-type'. If a match found out of the strings,
1051 the corresponding RANGE is returned.
1052
1053 Candidate values for 'mew-rage-list-string-type' and
1054 'mew-range-list-list-type' are as follows:
1055
1056 'regex Regular expression.
1057 'recursive Initial substring match. That is,
1058 not only a folder specified but all so
1059 all sub-folders are matched.
1060 'string String comparison.
1061
1062 An example is as follows:
1063 '(((\"+queue\" \"+postq\" \"+draft\") \"all\")
1064 ((\"$inbox\") \"sync\")
1065 (t \"update\"))
1066
1067 If this value is nil, an appropriate value is set when Mew is booting.
1068 "
1069 :group 'mew-summary
1070 :type '(choice
1071 (const nil)
1072 (repeat
1073 (list (choice (string :tag "Folder")
1074 (repeat :tag "Folders" (string :tag "Folder"))
1075 (const :tag "Other" t))
1076 string))))
1077
1078 (defcustom mew-range-list-string-type 'regex
1079 "*A value to specify an action if the key is a string in
1080 'mew-range-list'. Candidates are 'regex, 'recursive, and 'string."
1081 :group 'mew-summary
1082 :type '(choice (const regex) (const recursive) (const string)))
1083
1084 (defcustom mew-range-list-list-type 'recursive
1085 "*A value to specify an action if the key is a list of strings in
1086 'mew-range-list'. Candidates are 'regex, 'recursive, and 'string."
1087 :group 'mew-summary
1088 :type '(choice (const regex) (const recursive) (const string)))
1089
1090 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1091 ;;;
1092 ;;; unread-mark
1093 ;;;
1094
1095 (defcustom mew-unread-mark-list
1096 '((("+inbox" "$inbox" "%inbox" "-") t)
1097 (t nil))
1098 "*A list of (KEY VALUE) to define the read/unread marks for
1099 each folder when scanning. If VALUE is non-nil, messages are
1100 marked as unread. Otherwise, message are not marked, that is,
1101 marked as read.
1102
1103 If KEY is t, all folders matches it. The corresponding VALUE is
1104 returned always.
1105
1106 If KEY is a string, match-function is applied according to
1107 'mew-unread-mark-list-string-type'. If matched, the corresponding
1108 VALUE is returned.
1109
1110 If KEY is a list of strings, match-function is applied according to
1111 'mew-unread-mark-list-list-type'. If a match found out of the strings,
1112 the corresponding VALUE is returned.
1113
1114 Candidate values for 'mew-rage-list-string-type' and
1115 'mew-unread-mark-list-list-type' are as follows:
1116
1117 'regex Regular expression.
1118 'recursive Initial substring match. That is,
1119 not only a folder specified but all so
1120 all sub-folders are matched.
1121 'string String comparison.
1122
1123 The default value is:
1124 '(((\"+inbox\" \"$inbox\" \"%inbox\" \"-\") t)
1125 (t nil))
1126
1127 An example for the case where messages are marked as unread in any
1128 folders:
1129 '((t t))
1130
1131 Note that this variable is effective only when 'mew-use-unread-mark'
1132 is non-nil.
1133 "
1134 :group 'mew-summary
1135 :type '(choice
1136 (const nil)
1137 (repeat
1138 (list (choice (string :tag "Folder")
1139 (repeat :tag "Folders" (string :tag "Folder"))
1140 (const :tag "Other" t))
1141 string))))
1142
1143 (defcustom mew-unread-mark-list-string-type 'regex
1144 "*A value to specify an action if the key is a string in
1145 'mew-unread-mark-list'. Candidates are 'regex, 'recursive, and 'string."
1146 :group 'mew-summary
1147 :type '(choice (const regex) (const recursive) (const string)))
1148
1149 (defcustom mew-unread-mark-list-list-type 'recursive
1150 "*A value to specify an action if the key is a list of strings in
1151 'mew-unread-mark-list'. Candidates are 'regex, 'recursive, and 'string."
1152 :group 'mew-summary
1153 :type '(choice (const regex) (const recursive) (const string)))
1154
1155 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1156 ;;;
1157 ;;; Scan
1158 ;;;
1159
1160 (defconst mew-summary-form-header '(mark)
1161 "*A list to be appended to summary-form if the first element of
1162 summary-form is not an integer. Since Mew assumes that
1163 each line of Summary mode begins with one mark, this variable
1164 MUST be '(mark).")
1165
1166 (defconst mew-custom-type-of-summary-form
1167 '(choice
1168 (cons :tag "Setup message number column"
1169 (integer :tag "Message number column" )
1170 (repeat (choice (string :tag "Insert string")
1171 (const :tag "Thread indent" t)
1172 (list :tag "Width and symbol"
1173 :value (0 type)
1174 (integer :tag "Display width")
1175 (choice :tag "Symbol"
1176 :value type
1177 (const type) (const time)
1178 (const date) (const year)
1179 (const size) (const from)
1180 (const subj) (symbol :tag "Other")))
1181 (choice :tag "Symbol"
1182 :value type
1183 (const type) (const time)
1184 (const date) (const year)
1185 (const size) (const from)
1186 (const subj) (symbol :tag "Other")))))
1187 (repeat :tag "Use default number column"
1188 (choice (integer :tag "Message number column")
1189 (string :tag "Insert string")
1190 (const :tag "Thread indent" t)
1191 (list :tag "Width and symbol"
1192 :value (0 type)
1193 (integer :tag "Display width")
1194 (choice :tag "Symbol"
1195 :value type
1196 (const type) (const time)
1197 (const date) (const year)
1198 (const size) (const from)
1199 (const subj) (symbol :tag "Other")))
1200 (choice :tag "Symbol"
1201 :value type
1202 (const type) (const time)
1203 (const date) (const year)
1204 (const size) (const from)
1205 (const subj) (symbol :tag "Other"))))))
1206
1207 (defvar mew-summary-form-body-starter "|")
1208
1209 (defcustom mew-summary-form
1210 `(type (5 date) " " (14 from) " " t (30 subj)
1211 ,mew-summary-form-body-starter (0 body))
1212 "*The format in Summary mode, called summary-form. summary-form is a list
1213 of list, symbol, and string.
1214
1215 \(a) A string is printed as it is.
1216
1217 \(b) A list consists of an integer and a symbol. The symbol specifies a
1218 function to be called. The name of the function is produced by
1219 concatenating 'mew-summary-form-func-prefix' and the symbol name.
1220 \(e.g. 'mew-summary-form-date' for the symbol 'date').
1221
1222 Pre-defined symbols are 'type, 'time, 'date, 'year, 'size, 'from,
1223 'subj and 'body. For more details, see the explanation of the
1224 functions called 'mew-summary-form-<symbol>'.
1225
1226 The integer specifies the width of field which will be filled with a
1227 return string of the function.
1228
1229 A positive value means padding SPCs on the right if necessary.
1230
1231 A negative value means padding SPCs on the left if necessary. If a
1232 negative value is specified, the corresponding function must return an
1233 ASCII string.
1234
1235 0 means the remaining width and is treated as a positive value.
1236
1237 \(c) A symbol except 't' is equivalent to (1 symbol).
1238
1239 \(d) The value of mew-summary-form-header (mark) is appended to
1240 summary-form when used. See also 'mew-summary-form-header'.
1241
1242 \(e) 't' means the position where thread indentation is inserted.
1243
1244 An example is as follows:
1245 '(type (5 date) \" \" (-4 size) \" \" (14 from) \" \" t (30 subj) \"|\" (0 body))
1246
1247 You can also set this value in 'mew-summary-form-list'."
1248 :group 'mew-summary
1249 :type mew-custom-type-of-summary-form)
1250
1251 (defcustom mew-summary-form-list nil
1252 "*A list of (KEY VALUE) to define 'mew-summary-form' for each
1253 folder. Each component is (key summary-form).
1254
1255 If KEY is t, all folders matches it. The corresponding SUMMARY-FORM is
1256 returned always.
1257
1258 If KEY is a string, match-function is applied according to
1259 'mew-summary-form-list-string-type'. If matched, the corresponding
1260 SUMMARY-FORM is returned.
1261
1262 If KEY is a list of strings, match-function is applied according to
1263 'mew-summary-form-list-list-type'. If a match found out of the strings,
1264 the corresponding SUMMARY-FORM is returned.
1265
1266 Candidate values for 'mew-summary-form-list-string-type' and
1267 'mew-summary-form-list-list-type' are as follows:
1268
1269 'regex Regular expression.
1270 'recursive Initial substring match. That is,
1271 not only a folder specified but all so
1272 all sub-folders are matched.
1273 'string String comparison.
1274
1275 SUMMARY-FORM is a list. See 'mew-summary-form' for more information.
1276
1277 An example is as follows:
1278 '(((\"+inbox\")
1279 (type (5 date) \" \" (-4 size) \" \" (14 from) \" \" t (30 subj) \"|\" (0 body)))
1280 (t
1281 (type (5 date) \" \" (14 from) \" \" t (30 subj) \"|\" (0 body))))
1282 "
1283 :group 'mew-summary
1284 :type `(choice
1285 (const nil)
1286 (repeat
1287 (list (choice (string :tag "Folder")
1288 (repeat :tag "Folders" (string :tag "Folder"))
1289 (const :tag "Other" t))
1290 ,mew-custom-type-of-summary-form
1291 (choice (integer :tag "Thread indent column")
1292 (const nil))))))
1293
1294 (defcustom mew-summary-form-list-string-type 'regex
1295 "*A value to specify an action if the key is a string in
1296 'mew-summary-form-list'. Candidates are 'regex, 'recursive, and 'string."
1297 :group 'mew-summary
1298 :type '(choice (const regex) (const recursive) (const string)))
1299
1300 (defcustom mew-summary-form-list-list-type 'recursive
1301 "*A value to specify an action if the key is a list of strings in
1302 'mew-summary-form-list'. Candidates are 'regex, 'recursive, and 'string."
1303 :group 'mew-summary
1304 :type '(choice (const regex) (const recursive) (const string)))
1305
1306 (defcustom mew-summary-form-from-me-prefix "To:"
1307 "*The prefix to be prepend to an destination address
1308 if the message is originated by me."
1309 :group 'mew-summary
1310 :type 'string)
1311
1312 (defcustom mew-summary-form-extract-rule '(nickname)
1313 "*A list to specify what part to extract from the From: field. Each
1314 element must be 'name, 'comment, 'address, 'nickname, or appropriate
1315 \"regex\".
1316
1317 Consider the following examples:
1318
1319 A: Kazu Yamamoto <[email protected]>
1320 B: [email protected] (Kazu Yamamoto)
1321 C: Kazuhiko Yamamoto (Kazu) <[email protected]>
1322
1323 Each element returns the following value:
1324
1325 'name Name part, if any
1326 A: Kazu Yamamoto
1327 B: (No match)
1328 C: Kazuhiko Yamamoto (Kazu)
1329 'comment Comment part, if any
1330 A: (No match)
1331 B: Kazu Yamamoto
1332 C: (Kazu)
1333 'address Address part
1334 A: [email protected]
1335 B: [email protected]
1336 C: [email protected]
1337
1338 'nickname One element of personal information in
1339 Addrbook according to 'mew-addrbook-for-summary'.
1340 The default value of 'mew-addrbook-for-summary'
1341 is 'nickname. So, From: is converted a nickname
1342 by default. For more information, see
1343 'mew-addrbook-switch'.
1344
1345 (regex) The substring first matched
1346
1347 If a element does not match, the next element is applied. If no
1348 element matches to the From: field, or this value is nil, the whole
1349 of the From: field is used."
1350 :group 'mew-summary
1351 :type '(repeat (choice regexp (const name) (const comment)
1352 (const address) (const nickname))))
1353
1354 (defcustom mew-summary-form-mark-delete nil
1355 "*If non-nil, the 'D' mark automatically is put onto
1356 duplicated messages. If a character, use it as a mark
1357 instead of the 'D' mark."
1358 :group 'mew-summary
1359 :type '(choice (const :tag "Use mew-mark-delete" t)
1360 (const :tag "Not use" nil)
1361 (character :tag "Use another character")))
1362
1363 (defcustom mew-summary-form-mark-spam nil
1364 "*If non-nil, the 'D' mark automatically is put onto
1365 SPAM messages. A message is considered a SPAM message
1366 if the MD5 checksum of its body is duplicated in a scan.
1367 If a character, use it as a mark instead of the 'D' mark."
1368 :group 'mew-summary
1369 :type '(choice (const :tag "Use mew-mark-delete" t)
1370 (const :tag "Not use" nil)
1371 (character :tag "Use another character")))
1372
1373 (defcustom mew-summary-form-mark-review nil
1374 "*If non-nil, the '*' mark automatically is put onto
1375 messages destined to me. If a character, use it as a mark
1376 instead of the '*' mark."
1377 :group 'mew-summary
1378 :type '(choice (const :tag "Use mew-mark-review" t)
1379 (const :tag "Not use" nil)
1380 (character :tag "Use another character")))
1381
1382 (defcustom mew-summary-form-size-0k nil
1383 "*If non-nil, the size of message is displayed as '0k'
1384 if the size is less than 1k byte."
1385 :group 'mew-summary
1386 :type 'boolean)
1387
1388 (defcustom mew-summary-form-size-huge t
1389 "*If non-nil, the size of message is displayed as 'HUGE'
1390 when the size is greater than or equal to 1000 after maximum
1391 quantization by 'mew-summary-form-size-unit'."
1392 :group 'mew-summary
1393 :type 'boolean)
1394
1395 (defcustom mew-spam: "X-Bogosity:"
1396 "*The field name which your spam filter inserts.
1397 E.g.
1398 \"X-Spam-Flag:\" for 'spamassassin'
1399 \"X-Bogosity:\" for 'bogofilter'"
1400 :group 'mew-summary
1401 :type 'string)
1402
1403 (defcustom mew-scan-fields nil
1404 "*A list which specifies mewl's output.
1405 The first element MUST be \"Folder:\".
1406 The second element MUST be \"Filename:\".
1407 Both \"In-Reply-To:\" and \"References:\" MUST be included for thread.
1408 The last MUST be \"Body\"."
1409 :group 'mew-summary
1410 :type '(cons (const "Folder:")
1411 (cons (const "Filename:")
1412 (repeat string))))
1413
1414 (defvar mew-scan-fields-alias nil
1415 "*A list of aliases for 'mew-scan-fields'.
1416 Functions called MEW-FOO will be defined according to this variable.")
1417
1418 (defvar mew-summary-form-func-prefix "mew-summary-form-"
1419 "The prefix for symbol used in 'mew-summary-form'.")
1420
1421 (defvar mew-scan-decode-fields (list mew-subj: mew-from: mew-to:))
1422
1423 (defvar mew-scan-decode-bq-body t)
1424
1425 (defvar mew-draft-address-warning-fields
1426 (list mew-to: mew-cc: mew-dcc: mew-bcc:
1427 mew-resent-to: mew-resent-cc: mew-resent-dcc: mew-resent-bcc:))
1428
1429 (defcustom mew-thread-column 28
1430 "A position where thread indentation is inserted
1431 for indentation of thread. This valuable is for backward compatibility
1432 only. Use 't' in 'mew-summary-form instead."
1433 :group 'mew-summary
1434 :type 'integer)
1435
1436 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1437 ;;;
1438 ;;; Demo
1439 ;;;
1440
1441 (defcustom mew-demo t
1442 "*Mew demo is displayed at boot time if *non-nil*."
1443 :group 'mew-env
1444 :type 'boolean)
1445
1446 (defcustom mew-demo-picture t
1447 "*A picture of cats is displayed if *non-nil*."
1448 :group 'mew-env
1449 :type 'boolean)
1450
1451 (defcustom mew-demo-sit-for 0
1452 "*Time of demo picture staying."
1453 :group 'mew-env
1454 :type '(choice integer (const nil)))
1455
1456 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1457 ;;;
1458 ;;; Limits
1459 ;;;
1460
1461 (defcustom mew-file-max-size 100000
1462 "*The max size of messages. If the size of a message is greater
1463 than mew-file-max-size, Mew skips MIME analysis."
1464 :group 'mew-message
1465 :type 'integer)
1466
1467 (defcustom mew-header-reasonable-size 10000
1468 "*The max size of header to be inserted to a temporary buffer to
1469 obtain any fields."
1470 :group 'mew-message
1471 :type 'integer)
1472
1473 (defcustom mew-header-max-length 400
1474 "*If the length of a header exceeds this value,
1475 it is not arranged nor MIME decoded.
1476 See also 'mew-header-max-depth'."
1477 :group 'mew-message
1478 :type 'integer)
1479
1480 (defcustom mew-header-max-depth 50
1481 "*A value to decide loop depth for header field syntax analysis.
1482 It was known as mew-loop-depth.
1483 See also 'mew-header-max-length'."
1484 :group 'mew-message
1485 :type 'integer)
1486
1487 (defcustom mew-references-max-count 3
1488 "*A value for the max number of message IDs in References: when reply.
1489 Non-integer means no limit."
1490 :group 'mew-reply
1491 :type '(choice (integer :tag "Max count")
1492 (const :tag "No limit" nil)))
1493
1494 (defcustom mew-lisp-max-length 2000
1495 "*Mew saves an internal lisp structure to a file truncating
1496 to this file."
1497 :group 'mew-env
1498 :type 'integer)
1499
1500 (defcustom mew-expand-max-depth 5
1501 "*A value to limit Addrbook expansion loop."
1502 :group 'mew-draft
1503 :type 'integer)
1504
1505 (defcustom mew-log-max-size 512000 ;; 500KB
1506 "*A value for the max size of log files."
1507 :group 'mew-draft
1508 :type 'integer)
1509
1510 (defcustom mew-highlight-body-max-size 10000
1511 "A limit for highlighting a body. '0' means No-Limitation"
1512 :group 'mew-highlight
1513 :type 'integer)
1514
1515 (defcustom mew-scan-max-field-length 5
1516 "*Max field length which 'mewl' treats."
1517 :group 'mew-env
1518 :type 'integer)
1519
1520 (defcustom mew-scan-max-body-length 20
1521 "*Max body length which 'mewl' treats."
1522 :group 'mew-env
1523 :type 'integer)
1524
1525 (defcustom mew-scan-body-length 10
1526 "*Body length which Mew treats.
1527 Increase this value if 'mew-summary-form-mark-spam' put
1528 the 'D' mark onto different messages."
1529 :group 'mew-env
1530 :type 'integer)
1531
1532 (defcustom mew-flowed-fold-threshold 78
1533 "*A threshold length of lines in a draft body.
1534 if `mew-use-format-flowed' is `t' and any lines are over this
1535 threshold, the format=flowed encoding is used."
1536 :group 'mew-draft
1537 :type 'integer)
1538
1539 (defcustom mew-flowed-fold-length 70
1540 "*A length to which each line is folded when format=flowed is used."
1541 :group 'mew-draft
1542 :type 'integer)
1543
1544 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1545 ;;;
1546 ;;; Ask?
1547 ;;;
1548
1549 (defcustom mew-ask-subject nil
1550 "*If *non-nil* and Subject: is empty, ask a user its value."
1551 :group 'mew-draft
1552 :type 'boolean)
1553
1554 (defcustom mew-ask-to nil
1555 "*If *non-nil*, ask a user to whom he/she sends."
1556 :group 'mew-draft
1557 :type 'boolean)
1558
1559 (defcustom mew-ask-cc nil
1560 "*If *non-nil*, ask a user to whom he/she sends Cc."
1561 :group 'mew-draft
1562 :type 'boolean)
1563
1564 (defcustom mew-ask-fcc nil
1565 "*If *non-nil* and a folder on Fcc: does not exist, ask a user to
1566 create it. If nil, folders which are not present are created without
1567 any query."
1568 :group 'mew-draft
1569 :type 'boolean)
1570
1571 (defcustom mew-ask-newsgroups nil
1572 "*If *non-nil* and Newsgroups: exists, ask a user to send this really."
1573 :group 'mew-draft
1574 :type 'boolean)
1575
1576 (defcustom mew-ask-range nil
1577 "*If *non-nil*, Mew asks range if the cache in Summary mode seems
1578 invalid. Otherwise, 'update is used for range in the case."
1579 :group 'mew-summary
1580 :type 'boolean)
1581
1582 (defcustom mew-ask-cite-prefix nil
1583 "*If *non-nil*, ask citation prefix when cite a message."
1584 :group 'mew-cite
1585 :type 'boolean)
1586
1587 (defcustom mew-ask-pack t
1588 "*If *non-nil*, ask whether or not you really want to pack."
1589 :group 'mew-summary
1590 :type 'boolean)
1591
1592 (defcustom mew-ask-send t
1593 "*If *non-nil*, ask whether or not you really want to send the message."
1594 :group 'mew-draft
1595 :type 'boolean)
1596
1597 (defcustom mew-ask-post t
1598 "*If *non-nil*, ask whether or not you really want to post the message."
1599 :group 'mew-draft
1600 :type 'boolean)
1601
1602 (defcustom mew-ask-flush-queue nil
1603 "*If *non-nil*, ask whether or not you really want to flush queue."
1604 :group 'mew-draft
1605 :type 'boolean)
1606
1607 (defcustom mew-ask-flush-case nil
1608 "*If *non-nil*, ask case when flushing queue."
1609 :group 'mew-summary
1610 :type 'boolean)
1611
1612 (defcustom mew-ask-charset nil
1613 "*Mew asks a user whether or not the charset chosen on composing
1614 is appropriate.
1615 nil: not ask
1616 A list of charset: ask if the charset is not a member of the list
1617 t: ask if 'mew-charset-m17n' is used."
1618 :group 'mew-draft
1619 :type '(choice (const nil) (const t) (repeat string)))
1620
1621 (defcustom mew-ask-folder-after-join nil
1622 "*If *non-nil*, Mew asks to move to the folder where the join
1623 message is stored."
1624 :group 'mew-summary
1625 :type 'boolean)
1626
1627 (defcustom mew-ask-folder-after-burst nil
1628 "*If *non-nil*, Mew asks to move to the folder where the burst
1629 messages are stored."
1630 :group 'mew-summary
1631 :type 'boolean)
1632
1633 (defcustom mew-ask-pipe nil
1634 "*If *non-nil*, Mew confirms when '\\<mew-summary-mode-map>\\[mew-summary-pipe-message]' is used."
1635 :group 'mew-summary
1636 :type 'boolean)
1637
1638 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1639 ;;;
1640 ;;; Use
1641 ;;;
1642
1643 (defcustom mew-use-full-window nil
1644 "*If non-nil, the entire frame is used for Mew.
1645 Otherwise, windows are configured dynamically."
1646 :group 'mew-env
1647 :type 'boolean)
1648
1649 (defcustom mew-use-other-frame-for-draft nil
1650 "*If non-nil, a new frame is created when a draft is prepared."
1651 :group 'mew-env
1652 :type 'boolean)
1653
1654 (defcustom mew-use-other-frame-for-summary nil
1655 "*If non-nil, a new frame is created when you visit a new folder."
1656 :group 'mew-env
1657 :type 'boolean)
1658
1659 (defcustom mew-use-text/enriched t
1660 "*If non-nil, Mew parses enriched format text messages."
1661 :group 'mew-message
1662 :type 'boolean)
1663
1664 (defcustom mew-use-text/html nil
1665 "*If non-nil, Mew parses text/html messages.
1666 If you want to use 'mew-use-text/html-list', this value should be 'nil'."
1667 :group 'mew-message
1668 :type 'boolean)
1669
1670 (defcustom mew-use-text/html-list nil
1671 "*A list of (KEY VALUE) to define whether or not HTML should be parsed
1672 for each folder.
1673
1674 If KEY is t, all folders matches it. The corresponding boolean is
1675 returned always.
1676
1677 If KEY is a string, match-function is applied according to
1678 'mew-use-text/html-string-type'. If matched, the corresponding
1679 boolean is returned.
1680
1681 If KEY is a list of strings, match-function is applied according
1682 to 'mew-use-text/html-list-type'. If a match found out of the
1683 strings, the corresponding boolean is returned.
1684
1685 Candidate values for 'mew-use-text/html-string-type' and
1686 'mew-use-text/html-list-type' are as follows:
1687
1688 'regex Regular expression.
1689 'recursive Initial substring match. That is,
1690 not only a folder specified but all so
1691 all sub-folders are matched.
1692 'string String comparison.
1693 "
1694 :group 'mew-summary
1695 :type '(choice
1696 (const nil)
1697 (repeat
1698 (list (choice (string :tag "Folder")
1699 (repeat :tag "Folders" (string :tag "Folder"))
1700 (const :tag "Other" t))
1701 boolean))))
1702
1703 (defcustom mew-use-text/html-string-type 'regex
1704 "*A value to specify an action if the key is a string in
1705 'mew-use-text/html-list'. Candidates are 'regex, 'recursive, and 'string."
1706 :group 'mew-summary
1707 :type '(choice (const regex) (const recursive) (const string)))
1708
1709 (defcustom mew-use-text/html-list-type 'recursive
1710 "*A value to specify an action if the key is a list of strings in
1711 'mew-use-text/html-list'. Candidates are 'regex, 'recursive, and 'string."
1712 :group 'mew-summary
1713 :type '(choice (const regex) (const recursive) (const string)))
1714
1715
1716 (defcustom mew-use-text/xml nil
1717 "*If non-nil, Mew parses text/xml messages."
1718 :group 'mew-message
1719 :type 'boolean)
1720
1721 (defcustom mew-use-symbolic-link-for-forwarding nil
1722 "*If nil, messages to be forwarded is copied to +draft when
1723 '\\<mew-summary-mode-map>\\[mew-summary-forward]' and '\\[mew-summary-multi-forward]' are used. Otherwise, symbolic links are
1724 created (if the feature is provided)."
1725 :group 'mew-draft
1726 :type 'boolean)
1727
1728 (defcustom mew-use-cached-passwd nil
1729 "*if non-nil, passwords are cached."
1730 :group 'mew-privacy
1731 :type 'boolean)
1732
1733 (defcustom mew-use-master-passwd nil
1734 "*if non-nil, a master password is used."
1735 :group 'mew-privacy
1736 :type 'boolean)
1737
•1738 (defcustom mew-master-passwd-type 'master
1739 "*Type of the password manager when mew-use-master-passwd is non-nil."
1740 :group 'mew-privacy
1741 :type '(choice
1742 (const :tag "Master Password" 'master)
1743 (const :tag "auth-source" 'auth-source)))
1744
1745 (defcustom mew-use-8bit nil
1746 "*If non-nil, the 8bit-clean charset mechanism is used for 8bit
1747 charsets, such as ISO-8859-1, in Draft mode. If nil, an appropriate
1748 MIME encoding such as quoted-printable is applied. This also enables
1749 to attach 8bit messages as it is. If nil, 8bit messages are converted
1750 into the 7bit form."
1751 :group 'mew-draft
1752 :type 'boolean)
1753
1754 (defcustom mew-use-charset-sanity-check t
1755 "*If non-nil, the sanity check of character set is used when
1756 composing."
1757 :group 'mew-draft
1758 :type 'boolean)
1759
1760 (defcustom mew-use-autoconv-when-unknown t
1761 "*If non-nil, Mew uses 'mew-cs-autoconv' for an unknown coding system."
1762 :group 'mew-message
1763 :type 'boolean)
1764
1765 (defcustom mew-use-burst-folder-history nil
1766 "*If non-nil, the folder specified at the previous burst job
1767 is used as a folder candidate instead of inbox."
1768 :group 'mew-summary
1769 :type 'boolean)
1770
1771 (defcustom mew-use-biff nil
1772 "*If non-nil, Mew displays \"Mail(n)\" in the mode line if your
1773 message server receives messages. This is confirmed by POP or IMAP
1774 every 'mew-biff-interval' minutes.
1775
1776 To use this feature, 'mew-use-cached-passwd' should be 't'.
1777
1778 If you want to use the biff functionality against a local mailbox, use
1779 'display-time-mode' instead."
1780 :group 'mew-env
1781 :type 'boolean)
1782
1783 (defcustom mew-use-biff-bell nil
1784 "*If non-nil, Mew beeps when the number of messages in
1785 your POP server becomes non-zero. To use this feature,
1786 'mew-use-biff' should be 't'."
1787 :group 'mew-env
1788 :type 'boolean)
1789
1790 (defcustom mew-use-sender nil
1791 "*If From: contains multiple addresses, Mew adds Sender: anyway.
1792 If From: contains one address and SMTP MAIL FROM
1793 \('mew-smtp-mail-from') is different from it, this variable effects.
1794 If non-nil, Mew adds Sender: and specifies SMTP MAIL FROM to its value.
1795 Otherwise, Mew does not add Sender:."
1796 :group 'mew-draft
1797 :type 'boolean)
1798
1799 (defcustom mew-use-x-mailer t
1800 "*If non-nil, X-Mailer: is prepared in Draft mode"
1801 :group 'mew-draft
1802 :type 'boolean)
1803
1804 (defcustom mew-use-alternative t
1805 "*If non-nil, Multipart/Alternative is treated as a singlepart
1806 according to 'mew-mime-multipart-alternative-list'."
1807 :group 'mew-summary
1808 :type 'boolean)
1809
1810 (defcustom mew-disable-alternative-regex-list nil
1811 "*A list of regular expression to match the value of X-Mailer:.
1812 If one of them matches, Multiprat/Alternative is treated as
1813 Multipart/Mixed.
1814
1815 An example:
1816 (setq mew-disable-alternative-regex-list '(\"Apple Mail\"))"
1817 :group 'mew-summary
1818 :type '(list regexp))
1819
1820 (defcustom mew-use-text-body t
1821 "*If non-nil, a single Text/* body or the first Text/* part in a top level
1822 multipart is displayed with its header."
1823 :group 'mew-summary
1824 :type 'boolean)
1825
1826 (defcustom mew-use-nfs-hack nil
1827 "*If non-nil, Mew takes some workarounds for NFS."
1828 :group 'mew-env
1829 :type 'boolean)
1830
1831 (defcustom mew-use-old-wvhtml nil
1832 "*If non-nil, Mew calls wvHtml in the old argument style."
1833 :group 'mew-message
1834 :type 'boolean)
1835
1836 (defcustom mew-use-net-status t
1837 "*If non-nil, Mew displays network status to the mode line."
1838 :group 'mew-net
1839 :type 'boolean)
1840
1841 (defcustom mew-use-fast-refile nil
1842 "*If non-nil, 'rassoc' is used to look up the alist of
1843 folders. Since it is a built-in function, it makes marking for refile
1844 much faster especially when the alist is long. But the fast method
1845 is not case-sensitive. So, you should set this variable to 't' only when
1846 you does not use capital letters for your folders. If nil, the old
1847 slow method, which is case-sensitive, is used."
1848 :group 'mew-refile
1849 :type 'boolean)
1850
1851 (defcustom mew-use-node-folder t
1852 "*If non-nil, candidate folders chosen by 'mew-refile-guess-by-folder'
1853 includes node folders as well as leaf folders. Otherwise, candidates
1854 are selected out of leaf folders only."
1855 :group 'mew-refile
1856 :type 'boolean)
1857
1858 (defcustom mew-use-case-completion t
1859 "*If non-nil, 'mew-case' is automatically completed when you
1860 input a folder. For example, consider that you input a folder in a
1861 local folder after typing '\\<mew-summary-mode-map>\\[mew-summary-goto-folder]'.
1862 Typing '%' automatically inserts 'mew-case' before '%'."
1863 :group 'mew-summary
1864 :type 'boolean)
1865
1866 (defcustom mew-use-spc-padding t
1867 "*If non-nil, SPCs are padded from the end of lines of Summary mode
1868 to the right side."
1869 :group 'mew-summary
1870 :type 'boolean)
1871
1872 (defcustom mew-use-push-mark nil
1873 "*If non-nil, '\\<mew-summary-mode-map>\\[mew-summary-jump-top]' and '\\<mew-summary-mode-map>\\[mew-summary-jump-bottom]' push the mark."
1874 :group 'mew-summary
1875 :type 'boolean)
1876
1877 (defcustom mew-use-old-pgp nil
1878 "*If non-nil, the old fashioned PGP message are used when signing/encrypting.
1879 Otherwise PGP/MIME is used."
1880 :group 'mew-privacy
1881 :type 'boolean)
1882
1883 (defcustom mew-use-full-alias nil
1884 "*If non-nil, the entire addresses of learned address are used
1885 as a key of address completion. Otherwise, the user parts of the
1886 learned address are used."
1887 :group 'mew-summary
1888 :type 'boolean)
1889
1890 (defcustom mew-use-unread-mark nil
1891 "*If non-nil, the unread mark is used in Summary mode."
1892 :group 'mew-summary
1893 :type 'boolean)
1894
1895 (defcustom mew-delete-unread-mark-by-mark t
1896 "*If nil, the unread mark remains when the cursor is moved
1897 to the current message from the previous message by
1898 putting any mark on the previous one. If non-nil,
1899 the unread mark is deleted."
1900 :group 'mew-summary
1901 :type 'boolean)
1902
1903 (defcustom mew-use-smtp-auth t
1904 "*If nil, SMTP AUTH is ignored even an SMTP server
1905 returns the AUTH capability."
1906 :group 'mew-smtp
1907 :type 'boolean)
1908
1909 (defcustom mew-smtp-auth-plain-authorize-id nil
1910 "*If nil, SMTP AUTH PLAIN is created as follow:
1911 NUL authenticate-id NUL password
1912 If non-nil, it is created as follow:
1913 authorize-id NUL authenticate-id NUL password
1914 For more information, see RFC 2595."
1915 :group 'mew-smtp
1916 :type 'boolean)
1917
1918 (defcustom mew-use-punycode t
1919 "*If non-nil, punycode strings are decoded into IDN strings"
1920 :group 'mew-message
1921 :type 'boolean)
1922
1923 (defcustom mew-use-async-write nil
1924 "*If non-nil, message retrieval of POP/IMAP/NNTP on Unix uses
1925 asynchronous write for each message and fsync in their sentinel."
1926 :group 'mew-net
1927 :type 'boolean)
1928
1929 (defcustom mew-use-format-flowed nil
1930 "*If non-nil, Text/Plain; format=flowed is used when composing.
1931 If you cite a message, the citation style of format=flowed is used. "
1932 :group 'mew-draft
1933 :type 'boolean)
1934
1935 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1936 ;;;
1937 ;;; Appearance
1938 ;;;
1939
1940 (defcustom mew-window-configuration
1941 '((summary (1 0))
1942 (message (8 31))
1943 (draft (1 0)))
1944 "*Ratio of windows"
1945 :group 'mew-env
1946 :type '(list
1947 (list (const summary) (list integer integer))
1948 (list (const message) (list integer integer))
1949 (list (const draft) (list integer integer))))
1950
1951 (defcustom mew-mode-line-id "Mew: %12b"
1952 "*A default value of mode-line-buffer-identification for each Mew mode."
1953 :group 'mew-summary
1954 :type 'sexp)
1955
1956 ;; Indirect call of propertized-buffer-identification due to XEmacs
1957 (defun mew-mode-line-id ()
1958 (propertized-buffer-identification mew-mode-line-id))
1959
1960 (defcustom mew-multipart-icon-position 'right
1961 "*Position where multipart icons are displayed.
1962 If 'left, displayed at the left size of the default toolbar.
1963 If 'right, displayed at the right size of the default toolbar.
1964 Otherwise, not displayed."
1965 :group 'mew-summary
1966 :type 'symbol)
1967
1968 (defcustom mew-window-home-buffer "*scratch*"
1969 "*Buffer name to return if window stack is empty."
1970 :group 'mew-summary
1971 :type 'string)
1972
1973 (defcustom mew-window-magic 80
1974 "*Minimum window width to scan messages in Summary mode."
1975 :group 'mew-summary
1976 :type 'integer)
1977
1978 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1979 ;;;
1980 ;;; Summary mode
1981 ;;;
1982
1983 (defcustom mew-print-function 'lpr-buffer
1984 "*A function for printing"
1985 :group 'mew-summary
1986 :type 'symbol)
1987
1988 (defcustom mew-summary-show-direction 'next
1989 "*Direction for SPC at end of message.
1990 'up 'down 'next(current direction) 'stop.
1991 Other values are considered as 'stop.
1992 See also 'mew-summary-mark-direction'."
1993 :group 'mew-summary
1994 :type '(choice (const next) (const up) (const down) (const stop)))
1995
1996 (defcustom mew-summary-mark-direction 'next
1997 "*Direction after marking a message
1998 'up 'down 'next(current direction) 'stop.
1999 Other values are considered as 'stop.
2000 See also 'mew-summary-show-direction'."
2001 :group 'mew-summary
2002 :type '(choice (const next) (const up) (const down) (const stop)))
2003
2004 (defcustom mew-summary-show-pause nil
2005 "*Pause on going to next message if *non-nil*.
2006 See also 'mew-summary-show-direction' and 'mew-summary-mark-direction'."
2007 :group 'mew-summary
2008 :type 'boolean)
2009
2010 (defcustom mew-summary-mark-duplicated-skip 'first
2011 "*This value decides which duplicated message should not be
2012 marked with 'mew-mark-duplicated' when 'mew-summary-mark-duplicated'
2013 is executed.
2014
2015 Possible value is 'first, 'last, or nil.
2016 nil means to mark all duplicated messages.
2017 Other values are considered as 'first."
2018 :group 'mew-summary
2019 :type '(choice (const first) (const last) (const nil)))
2020
2021 (defcustom mew-summary-recenter-p t
2022 "*If *non-nil*, the current message is recentered in Summary mode when
2023 displayed."
2024 :group 'mew-summary
2025 :type 'boolean)
2026
2027 (defcustom mew-summary-scan-width nil
2028 "*If *non-nil*, used as the width of Summary mode."
2029 :group 'mew-summary
2030 :type '(choice integer (const nil)))
2031
2032 (defcustom mew-summary-goto-line-then-display t
2033 "*If non-nil 'mew-summary-goto-line' displays the message
2034 where the cursor jumped."
2035 :group 'mew-summary
2036 :type 'boolean)
2037
2038 (defcustom mew-summary-jump-top-then-display t
2039 "*If non-nil 'mew-summary-jump-top' displays the top message
2040 where the cursor jumped to the top."
2041 :group 'mew-summary
2042 :type 'boolean)
2043
2044 (defcustom mew-summary-jump-bottom-then-display t
2045 "*If non-nil 'mew-summary-jump-bottom' displays the bottom message
2046 where the cursor jumped to the bottom."
2047 :group 'mew-summary
2048 :type 'boolean)
2049
2050 (defcustom mew-summary-region-include-cursor-line nil
2051 "*This value decides whether or not the cursor line is included
2052 to a region."
2053 :group 'mew-summary
2054 :type '(choice (const :tag "Include if the cursor is not on the beginning of the line" nil)
2055 (const :tag "Include if the cursor is on the end of the line" end)
2056 (const :tag "Include always" t)))
2057
2058 (defvar mew-highlight-timer-interval 3)
2059
2060 (defcustom mew-syntax-treat-filename-function
2061 'mew-syntax-treat-filename-default-function
2062 "*A function to modify file names specified by Content-Disposition:"
2063 :group 'mew-summary
2064 :type 'symbol)
2065
2066 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2067 ;;;
2068 ;;; Message mode
2069 ;;;
2070
2071 (defcustom mew-end-of-message-string "[End of message]"
2072 "*A value inserted on the end of message buffer if *non-nil*."
2073 :group 'mew-message
2074 :type '(choice string (const nil)))
2075
2076 (defcustom mew-end-of-part-string "[Message is continued]"
2077 "*A value inserted on the end of message buffer if *non-nil*."
2078 :group 'mew-message
2079 :type '(choice string (const nil)))
2080
2081 (defcustom mew-break-pages t
2082 "*If *non-nil*, a message is broken by mew-page-delimiter."
2083 :group 'mew-message
2084 :type 'boolean)
2085
2086 (defcustom mew-insert-final-newline t
2087 "*If *non-nil*, and if text/plain does not have final newline,
2088 insert a newline at the end of buffer. "
2089 :group 'mew-message
2090 :type 'boolean)
2091
2092 (defcustom mew-field-other-visible t
2093 "*If *non-nil*, fields which are not found in 'mew-field-spec'
2094 are displayed after visible fields. Otherwise they are
2095 hidden before visible fields (and after invisible fields)."
2096 :group 'mew-message
2097 :type 'boolean)
2098
2099 (defcustom mew-use-header-veil t
2100 "*If *non-nil*, field lines of To: and Cc:
2101 over 'mew-header-veil-count' are covered with invisible veils."
2102 :group 'mew-message
2103 :type 'boolean)
2104
2105 (defcustom mew-header-veil-string "..."
2106 "*A string to indicate some lines are covered with a veil."
2107 :group 'mew-message
2108 :type 'string)
2109
2110 (defcustom mew-header-veil-count 4
2111 "*The limit number for veil."
2112 :group 'mew-message
2113 :type 'integer)
2114
2115 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2116 ;;;
2117 ;;; Draft mode
2118 ;;;
2119
2120 (defcustom mew-draft-mode-auto-save t
2121 "*If t, a draft is repeatedly saved to 'buffer-auto-save-file-name'
2122 by 'do-auto-save'. If automatic saving is enabled and Emacs is crashed,
2123 the '.save-' file remains. If this value is nil, automatic saving does
2124 not work resulting that no garbage file remains."
2125 :group 'mew-draft
2126 :type 'boolean)
2127
2128 (defcustom mew-header-alist nil
2129 "*List of (key value) for header field to be inserted on draft.
2130 '((\"X-fingerprint:\" \"6B 63 38 88 67 5E 96 8E CE A4 62 73 3F 11 64 94\")
2131 (\"X-URL:\" \"http://www.example.org/\"))"
2132 :group 'mew-draft
2133 :type '(list (list string string)))
2134
2135 (defcustom mew-require-final-newline t
2136 "*If non-nil, Mew adds a new line to the draft if ended without a new
2137 line."
2138 :group 'mew-draft
2139 :type 'boolean)
2140
2141 (defcustom mew-comment-start ">"
2142 "*The value to be set to comment-start in Draft mode."
2143 :group 'mew-draft
2144 :type 'string)
2145
2146 (defcustom mew-comment-start-skip "^> *"
2147 "*The value to be set to comment-start-skip in Draft mode."
2148 :group 'mew-draft
2149 :type 'string)
2150
2151 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2152 ;;;
2153 ;;; Draft mode
2154 ;;;
2155
2156 (defcustom mew-reply-to nil
2157 "*A value inserted into Reply-To: field in Draft mode if *non-nil*.
2158 See also 'mew-config-alist'."
2159 :group 'mew-draft
2160 :type '(choice string (const nil)))
2161
2162 (defcustom mew-fcc "+backup"
2163 "*A value inserted into Fcc: field in Draft mode if *non-nil*.
2164 See also 'mew-config-alist'."
2165 :group 'mew-draft
2166 :type '(choice string (const nil)))
2167
2168 (defcustom mew-cc nil
2169 "*A value inserted into Cc: field in Draft mode if *non-nil*.
2170 See also 'mew-config-alist'."
2171 :group 'mew-draft
2172 :type '(choice string (const nil)))
2173
2174 (defcustom mew-bcc nil
2175 "*A value inserted into Bcc: field in Draft mode if *non-nil*.
2176 See also 'mew-config-alist'."
2177 :group 'mew-draft
2178 :type '(choice string (const nil)))
2179
2180 (defcustom mew-dcc nil
2181 "*A value inserted into Dcc: field in Draft mode if *non-nil*.
2182 If the value is 'me, your address is automatically inserted
2183 according to the case.
2184 See also 'mew-config-alist'."
2185 :group 'mew-draft
2186 :type '(choice string (const nil)))
2187
2188 (defcustom mew-from nil
2189 "*A value inserted into From: field in Draft mode if *non-nil*.
2190 For backward-compatibility. See also 'mew-name', 'mew-user', and
2191 'mew-mail-domain'."
2192 :group 'mew-draft
2193 :type '(choice string (const nil)))
2194
2195 (defcustom mew-organization nil
2196 "*A value inserted into Organization: field in Draft mode if *non-nil*.
2197 See also 'mew-config-alist'."
2198 :group 'mew-draft
2199 :type '(choice string (const nil)))
2200
2201 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2202 ;;;
2203 ;;; Citation
2204 ;;;
2205
2206 (defcustom mew-cite-prefix nil
2207 "*Prefix of citation."
2208 :group 'mew-cite
2209 :type '(choice string (const nil)))
2210
2211 (defcustom mew-cite-hook nil
2212 "*Hook for an external cite mechanism. If you want to use
2213 super-cite, (setq mew-cite-hook 'sc-cite-original)."
2214 :group 'mew-cite
2215 :type 'hook)
2216
2217 (defcustom mew-cite-strings-function 'mew-cite-strings
2218 "*Function called from mew-cite-original which to create cite labels
2219 according to 'mew-cite-format' and 'mew-cite-fields'."
2220 :group 'mew-cite
2221 :type '(choice function (const nil)))
2222
2223 (defcustom mew-before-cite-hook nil
2224 "Called in mew-summary-reply-with-citation before citation."
2225 :group 'mew-cite
2226 :type 'hook)
2227
2228 (defcustom mew-cite-prefix-function nil
2229 "*Function called on citations. A good candidate is
2230 'mew-cite-prefix-username"
2231 :group 'mew-cite
2232 :type '(choice function (const nil)))
2233
2234 (defcustom mew-cite-prefix-confirmp nil
2235 "*If *non-nil*, citation prefix (such as 'kazu> ') is
2236 confirmed to be used."
2237 :group 'mew-cite
2238 :type 'boolean)
2239
2240 (defcustom mew-cite-fields (list mew-from: mew-subj: mew-date:)
2241 "*The fields that you want to extract as citation label.
2242 If you change this valuable, you must change mew-cite-format.
2243 The value of the first field becomes the first argument for mew-cite-format.
2244 \(e.g. The default first argument is a value of From: field.)
2245 The value of the second field becomes the second argument for mew-cite-format.
2246 ....
2247 If this is nil, label is not generated."
2248 :group 'mew-cite
2249 :type '(repeat string))
2250
2251 (defcustom mew-cite-format "From: %s\nSubject: %s\nDate: %s\n\n"
2252 "*Format for the citation label."
2253 :group 'mew-cite
2254 :type 'string)
2255
2256 (defcustom mew-draft-cite-fill-mode nil
2257 "*A method to format a citation header.
2258 If 'wrap, format with fill-region.
2259 If 'truncate, cut over fill-column and insert 'mew-draft-cite-ellipses'."
2260 :group 'mew-draft
2261 :type '(choice (symbol :tag "Wrap" wrap)
2262 (symbol :tag "Truncate" truncate)
2263 (symbol :tag "Asis" nil)))
2264
2265 (defcustom mew-draft-cite-ellipses " .."
2266 "String that is inserted a truncated line when
2267 'mew-draft-cite-fill-mode' is 'truncate."
2268 :group 'mew-cite
2269 :type 'string)
2270
2271 (defcustom mew-draft-cite-label-fill-column nil
2272 "If *non-nil*, this value is used for 'mew-draft-cite-fill-mode'
2273 instead of 'fill-column'."
2274 :group 'mew-cite
2275 :type '(choice integer (const nil)))
2276
2277 (defcustom mew-summary-reply-position 'body
2278 "If 'body, the cursor locates in the beginning of the body.
2279 Otherwise, the cursor is after To:."
2280 :group 'mew-cite
2281 :type 'symbol)
2282
2283 (defcustom mew-summary-reply-with-citation-position 'end
2284 "If 'body, the cursor locates in the beginning of the body.
2285 If 'end, the cursor locates after the citation.
2286 Otherwise, the cursor is after To:."
2287 :group 'mew-cite
2288 :type 'symbol)
2289
2290 (defcustom mew-cite-ignore-region nil
2291 "*If *non-nil*, the region of a draft is ignored when citing."
2292 :group 'mew-cite
2293 :type 'boolean)
2294
2295 (defcustom mew-cite-ignore-mouse-region t
2296 "*If *non-nil*, a region specified by mouse is ignored when citing."
2297 :group 'mew-cite
2298 :type 'boolean)
2299
2300 (defcustom mew-visit-queue-after-sending nil
2301 "*If *non-nil*, visit to +queue after '\\<mew-draft-mode-map>\\[mew-draft-make-message]' in Draft mode."
2302 :group 'mew-draft
2303 :type 'boolean)
2304
2305 (defcustom mew-visit-inbox-after-setting-case nil
2306 "*If *non-nil*, visit to an appropriate inbox after setting a case with '\\<mew-summary-mode-map>\\[mew-summary-set-case]'."
2307 :group 'mew-summary
2308 :type 'boolean)
2309
2310 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2311 ;;;
2312 ;;; Charset
2313 ;;;
2314
2315 (defcustom mew-charset-input-method-alist nil
2316 "*Alist of charset and input-method. When a message is cited
2317 into Draft mode the charset of the message is found in this
2318 variable, the corresponding input-method is automatically
2319 selected. An example configuration is as follows:
2320
2321 \(setq mew-charset-input-method-alist
2322 '((\"iso-8859-1\" \"latin-1-postfix\")
2323 (\"iso-8859-2\" \"latin-2-postfix\")))
2324 "
2325 :group 'mew-draft
2326 :type '(list (list string string)))
2327
2328 (defun mew-charset-to-input-method (charset)
2329 (if (stringp charset)
2330 (mew-alist-get-value
2331 (mew-assoc-case-equal
2332 charset mew-charset-input-method-alist 0))))
2333
2334 (defcustom mew-charset-m17n "utf-8"
2335 "*A charset to be used if multiple character set are found and
2336 an appropriate charset cannot be chosen. Possible candidates are
2337 \"utf-8\" and \"iso-2022-jp-2\"."
2338 :group 'mew-draft
2339 :type '(choice (const "utf-8") (const "iso-2022-jp-2")))
2340
2341 (defcustom mew-charset-latin "iso-8859-15"
2342 "*This variable is used for selection of charset when composing.
2343 If characters of both Latin 1 and Lain 9 exist in a draft, Mew takes
2344 the following step to decide a charset.
2345
2346 1. If 'unify-8859-on-decoding-mode' is used:
2347 1.1. Use \"iso-8859-1\" if no loss.
2348 1.2. Otherwise, use \"utf-8\".
2349 2. If 'unify-8859-on-decoding-mode' is not used:
2350
2351 2.1. If both ISO-8859-1 and ISO-8859-15 can be used with no
2352 loss, 'mew-charset-latin' is used.
2353 2.2. Use \"iso-8859-1\" if no loss.
2354 2.3. Use \"iso-8859-15\" if no loss.
2355 2.3. Otherwise, use \"utf-8\".
2356 "
2357 :group 'mew-draft
2358 :type '(choice (const "iso-8859-1") (const "iso-8859-15")))
2359
2360 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2361 ;;;
2362 ;;; Signature
2363 ;;;
2364
2365 (defcustom mew-signature-file "~/.signature"
2366 "*A signature file to be inserted in Draft mode. To support multiple
2367 signature files, use 'c-sig.el'."
2368 :group 'mew-draft
2369 :type 'file)
2370
2371 (defcustom mew-signature-insert-last nil
2372 "*If *non-nil*, the signature file is inserted in the last of body.
2373 Otherwise, it is inserted at the current point. If you created multipart
2374 and mew-signature-as-lastpart is *non-nil*, this variable is ignored."
2375 :group 'mew-draft
2376 :type 'boolean)
2377
2378 (defcustom mew-signature-as-lastpart nil
2379 "*If *non-nil*, the signature file is appended as the final part
2380 when you create multipart."
2381 :group 'mew-draft
2382 :type 'boolean)
2383
2384 (defcustom mew-signature-description "My signature"
2385 "*This variable is used as a description if the signature is appended
2386 as the final part."
2387 :group 'mew-draft
2388 :type 'string)
2389
2390 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2391 ;;;
2392 ;;; Samba
2393 ;;;
2394
2395 (defcustom mew-use-samba-encoding nil
2396 "*Use SAMBA encoding for non-ASCII file name when saving."
2397 :group 'mew-summary
2398 :type 'boolean)
2399
2400 (defcustom mew-use-samba-encoding-type 'cap
2401 "*A type of SAMBA encoding. Either 'cap or 'hex."
2402 :group 'mew-summary
2403 :type '(choice (const cap) (const hex)))
2404
2405 (defcustom mew-cs-samba 'shift_jis
2406 "*A character set before SAMBA encoding."
2407 :group 'mew-summary
2408 :type 'coding-system)
2409
2410 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2411 ;;;
2412 ;;; Attachments
2413 ;;;
2414
2415 (defcustom mew-attach-move-by-line nil
2416 "*If non-nil, 'mew-attach-{next,previous}' move the cursor line by line."
2417 :group 'mew-draft
2418 :type 'boolean)
2419
2420 (defcustom mew-attach-move-next-after-copy nil
2421 "If non-nil, the cursor moves the next position after copying/linking
2422 in Attachments."
2423 :group 'mew-draft
2424 :type 'boolean)
2425
2426 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2427 ;;;
2428 ;;; Completion
2429 ;;;
2430
2431 (defcustom mew-fields
2432 (list mew-from: mew-to: mew-cc: mew-dcc: mew-fcc: mew-bcc: mew-subj:
2433 mew-reply-to: mew-followup-to: mew-newsgroups: mew-distribution:
2434 mew-resent-from: mew-resent-to: mew-resent-cc:
2435 mew-resent-dcc: mew-resent-fcc: mew-resent-bcc:)
2436 "*Completion field list in Draft mode."
2437 :group 'mew-complete
2438 :type '(repeat string))
2439
2440 (defcustom mew-complete-case-ignore-case nil
2441 "*Non-nil means Mew does not consider case is significant in case
2442 completion."
2443 :group 'mew-complete
2444 :type 'boolean)
2445
2446 (defcustom mew-complete-folder-ignore-case nil
2447 "*Non-nil means Mew does not consider case is significant in folder
2448 completion."
2449 :group 'mew-complete
2450 :type 'boolean)
2451
2452 (defcustom mew-complete-address-ignore-case t
2453 "*Non-nil means Mew does not consider case is significant in address
2454 completion."
2455 :group 'mew-complete
2456 :type 'boolean)
2457
2458 (defcustom mew-circular-complete-domain-ignore-case t
2459 "*Non-nil means Mew does not consider case is significant in
2460 circular domain completion."
2461 :group 'mew-complete
2462 :type 'boolean)
2463
2464 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2465 ;;;
2466 ;;; Field order
2467 ;;;
2468
2469 (defcustom mew-field-order-for-editing
2470 (list mew-to: mew-newsgroups: mew-cc: mew-subj: mew-from:)
2471 "*A field order list for editing."
2472 :group 'mew-draft
2473 :type '(repeat string))
2474
2475 (defcustom mew-field-order-for-reediting
2476 (list mew-to: mew-newsgroups: mew-cc: mew-subj: mew-from:)
2477 "*A field order list for reediting."
2478 :group 'mew-draft
2479 :type '(repeat string))
2480
2481 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2482 ;;;
2483 ;;; Fields to be deleted
2484 ;;;
2485
2486 (defcustom mew-field-delete-common
2487 '("From " ">From" "X-Mew")
2488 "*A field list to be deleted for reediting/resending/forwarding/saving."
2489 :group 'mew-draft
2490 :type '(choice (const nil)
2491 (repeat :tag "Field list" (string :tag "Field"))))
2492
2493 (defvar mew-field-delete nil) ;; backward compatibility
2494
2495 (defcustom mew-field-delete-for-editing
2496 (list mew-received: "Return-Path:" "Delivery-Date:" "Delivered-To:"
2497 mew-message-id: mew-mv: "Content-"
2498 "Precedence:" mew-organization: "X-"
2499 "Lines:" "Status:" "Posted:" "Forwarded:" "Replied:" "X-UIDL:"
2500 "DomainKey-Signature:" "DKIM-Signature:"
2501 "Authentication-Results:" "List-.*:" "Errors-To:")
2502 "*A field list to be deleted in Edit mode."
2503 :group 'mew-draft
2504 :type '(choice (const nil)
2505 (repeat :tag "Field list" (string :tag "Field"))))
2506
2507 (defcustom mew-field-delete-for-reediting
2508 (or mew-field-delete
2509 (list mew-received: "Return-Path:" "Delivery-Date:" "Delivered-To:"
2510 mew-date: mew-message-id: mew-mv: "Content-"
2511 "Precedence:" mew-organization: "X-"
2512 "Lines:" "Status:" "Posted:" "Forwarded:" "Replied:" "X-UIDL:"
2513 "DomainKey-Signature:" "DKIM-Signature:"
2514 "Authentication-Results:" "List-.*:" "Errors-To:" "Sender:"))
2515 "*A field list to be deleted when edit again."
2516 :group 'mew-draft
2517 :type '(choice (const nil)
2518 (repeat :tag "Field list" (string :tag "Field"))))
2519
2520 (defcustom mew-field-delete-for-others
2521 (list mew-received: "Return-Path:" "Delivery-Date:" "Delivered-To:"
2522 mew-to: mew-cc: mew-from: mew-organization:
2523 "Lines:" "Status:" "Posted:" "Forwarded:" "Replied:" "X-UIDL:"
2524 "DomainKey-Signature:" "DKIM-Signature:")
2525 "*A field list to be deleted when send with different To: and Cc:."
2526 :group 'mew-draft
2527 :type '(choice (const nil)
2528 (repeat :tag "Field list" (string :tag "Field"))))
2529
2530 (defcustom mew-field-delete-for-resending
2531 (list mew-received: "Return-Path:" "Delivery-Date:" "Delivered-To:"
2532 "Resent-" "X-Resent-"
2533 "Lines:" "Status:" "Posted:" "Forwarded:" "Replied:" "X-UIDL:")
2534 "*A field list to be deleted when resending."
2535 :group 'mew-draft
2536 :type '(choice (const nil)
2537 (repeat :tag "Field list" (string :tag "Field"))))
2538
2539 (defcustom mew-field-delete-for-forwarding
2540 '("Lines:" "Status:" "Posted:" "Forwarded:" "Replied:" "X-UIDL:")
2541 "*A field list to be deleted when forwarding."
2542 :group 'mew-draft
2543 :type '(choice (const nil)
2544 (repeat :tag "Field list" (string :tag "Field"))))
2545
2546 (defcustom mew-field-delete-for-saving ()
2547 "*A field list to be deleted when saving a message to a file."
2548 :group 'mew-summary
2549 :type '(choice (const nil)
2550 (repeat :tag "Field list" (string :tag "Field"))))
2551
2552 (defcustom mew-field-delete-for-joining
2553 (list mew-mv: mew-subj: mew-message-id: "Encrypted" "Content-")
2554 "*A field list to be deleted when joining."
2555 :group 'mew-summary
2556 :type '(repeat :tag "Field list" (string :tag "Field")))
2557
2558 (defcustom mew-field-for-printing
2559 '("Subject:" "From:" "To:" "Cc:" "Date:")
2560 "*A field list to print"
2561 :group 'mew-summary
2562 :type '(repeat :tag "Field list" (string :tag "Field")))
2563
2564 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2565 ;;;
2566 ;;; Directory stuff
2567 ;;;
2568
2569 (defcustom mew-summary-trace-directory t
2570 "*If non-nil, change to the folder directory when
2571 mew-summary-goto-folder."
2572 :group 'mew-summary
2573 :type 'boolean)
2574
2575 (defcustom mew-save-dir mew-home
2576 "*The default directory to save messages or parts in Summary mode.
2577 See also 'mew-copy-dir'."
2578 :group 'mew-summary
2579 :type 'directory)
2580
2581 (defcustom mew-summary-preserve-dir nil
2582 "*If non-nil, the previous directory is used as the default
2583 directory for save, etc. See also 'mew-draft-preserve-dir'."
2584 :group 'mew-summary
2585 :type 'boolean)
2586
2587 (defcustom mew-copy-dir mew-home
2588 "*The default directory from which attachments are copied in Draft mode.
2589 See also 'mew-save-dir'."
2590 :group 'mew-draft
2591 :type 'directory)
2592
2593 (defcustom mew-draft-preserve-dir nil
2594 "*If non-nil, the previous directory is used as the default
2595 directory for copy, etc. See also 'mew-summary-preserve-dir'."
2596 :group 'mew-draft
2597 :type 'boolean)
2598
2599 (defcustom mew-file-append-p nil
2600 "*If *non-nil*, a message or a part is appended to the existing file
2601 on '\\<mew-summary-mode-map>\\[mew-summary-save]'. Otherwise overwrote."
2602 :group 'mew-summary
2603 :type 'boolean)
2604
2605 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2606 ;;;
2607 ;;; Folders
2608 ;;;
2609
2610 (defcustom mew-regex-folder-candidate "^[^.#0-9]\\|^[0-9].*[^0-9]"
2611 "*Regular expression used in 'mew-dir-list-with-link-count'
2612 and 'mew-dir-list-without-link-count' to list up folder
2613 candidates. The default value \"^[^.#0-9]\\\\|^[0-9].*[^0-9]\" lists up
2614 folders whose name is alphabet only."
2615 :group 'mew-env
2616 :type 'regexp)
2617
2618 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2619 ;;;
2620 ;;; Refile
2621 ;;;
2622
2623 (defconst mew-custom-type-of-guess-alist
2624 '(list (list string (list string string))))
2625
2626 (defcustom mew-refile-guess-alist nil
2627 "*If non-nil, mew guesses destination folder by using this hint.
2628 The format is like this:
2629
2630 (setq mew-refile-guess-alist
2631 '((\"To:\"
2632 (\"wide@wide\" \"+wide/wide\")
2633 (\"adam\" \"+labo/adam\"))
2634 (\"Newsgroups:\"
2635 (\"^nifty\\\\.\\\\([^ ]+\\\\)\" \"+Nifty/\\\\1\"))
2636 (\"From:\"
2637 (\"uucp\" \"+adm/uucp\")
2638 (\".*\" \"+misc\"))
2639 ))
2640 "
2641 :group 'mew-refile
2642 :type mew-custom-type-of-guess-alist)
2643
2644
2645 (defcustom mew-refile-ctrl-multi t
2646 "*If *non-nil*, guess functions guess multi folders."
2647 :group 'mew-refile
2648 :type 'boolean)
2649
2650 (defcustom mew-refile-guess-key-list
2651 (append mew-resent-dest:-list mew-destination:-list)
2652 "*A list of field key used by mew-refile-guess-by-folder."
2653 :group 'mew-refile
2654 :type '(repeat string))
2655
2656 (defvar mew-refile-guess-control
2657 '(mew-refile-guess-by-alist
2658 mew-refile-ctrl-throw
2659 mew-refile-guess-by-newsgroups
2660 mew-refile-guess-by-folder
2661 mew-refile-ctrl-throw
2662 mew-refile-ctrl-auto-boundary
2663 mew-refile-guess-by-thread
2664 mew-refile-ctrl-throw
2665 mew-refile-guess-by-from-folder
2666 mew-refile-ctrl-throw
2667 mew-refile-guess-by-from
2668 mew-refile-ctrl-throw
2669 mew-refile-guess-by-default))
2670
2671 (defcustom mew-refile-auto-refile-skip-any-mark nil
2672 "*If *non-nil*, 'mew-summary-auto-refile' does not touch
2673 any already marked message."
2674 :group 'mew-refile
2675 :type 'boolean)
2676
2677 (defcustom mew-refile-auto-refile-confirm nil
2678 "*If *non-nil*, 'mew-summary-auto-refile' prompts the user for
2679 confirmation before refiling."
2680 :group 'mew-refile
2681 :type 'boolean)
2682
2683 (defcustom mew-refile-guess-strip-domainpart t
2684 "*If *non-nil*, 'mew-refile-guess-by-default' strips domainpart of from"
2685 :group 'mew-refile
2686 :type 'boolean)
2687
2688 (defcustom mew-refile-guess-from-me-is-special nil
2689 "*If *non-nil*, 'mew-refile-guess-by-from-*' think the messages from
2690 yourself as special. They use To: or Cc: instead of From:"
2691 :group 'mew-refile
2692 :type 'boolean)
2693
2694 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2695 ;;;
2696 ;;; Case guess
2697 ;;;
2698
2699 (defcustom mew-case-guess-alist nil
2700 "*If *non-nil*, this value is used to guess cases when
2701 prepared or composed.
2702 The syntax is exactly the same as 'mew-refile-guess-alist'."
2703 :group 'mew-draft
2704 :type mew-custom-type-of-guess-alist)
2705
2706 (defcustom mew-case-guess-when-replied-alist nil
2707 "*If *non-nil*, this value is used to guess cases when replied.
2708 The syntax is exactly the same as 'mew-refile-guess-alist'."
2709 :group 'mew-draft
2710 :type mew-custom-type-of-guess-alist)
2711
2712 (defcustom mew-case-guess-when-prepared t
2713 "*If *non-nil*, case is guessed when a draft is prepared."
2714 :group 'mew-draft
2715 :type 'boolean)
2716
2717 (defcustom mew-case-guess-when-composed nil
2718 "*If *non-nil*, case is guessed when a message is composed."
2719 :group 'mew-draft
2720 :type 'boolean)
2721
2722 (defcustom mew-case-guess-when-replied t
2723 "*If *non-nil*, case is guessed when replying to a message."
2724 :group 'mew-draft
2725 :type 'boolean)
2726
2727 (defcustom mew-case-guess-addition nil
2728 "*If *non-nil*, new guessed cases are added to old cases.
2729 Otherwise, the old cases are overridden."
2730 :group 'mew-draft
2731 :type 'boolean)
2732
2733 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2734 ;;;
2735 ;;; Temporary files
2736 ;;;
2737
2738 (defcustom mew-temp-file-initial
2739 (expand-file-name (user-login-name) (if (fboundp 'temp-directory)
2740 (temp-directory)
2741 (if (boundp 'temporary-file-directory)
2742 temporary-file-directory
2743 "/tmp")))
2744 "*Hint to make a secure directory on the local file system. On
2745 setup phase Mew make a secure directory from this variable and set
2746 mew-temp-file a file name prefix contained the directory name. The
2747 directory must be unreadable from others, otherwise it might become a
2748 big security hole. And this directory must not be gained access
2749 through network to prevent tire-tapping. Mew never uses
2750 'call-process-region' rather does use 'call-process' creating a
2751 temporary file with mew-temp-file by itself. If 'call-process-region'
2752 is used, Emacs creates a temporary file (probably in /tmp). So bad
2753 guys can wiretap the temporary file."
2754 :group 'mew-privacy
2755 :type 'directory)
2756
2757 (defcustom mew-delete-temp-file t
2758 "*If *non-nil*, delete temporary files when external commands terminate."
2759 :group 'mew-summary
2760 :type 'boolean)
2761
2762 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2763 ;;;
2764 ;;; Auto
2765 ;;;
2766
2767 (defcustom mew-auto-get t
2768 "If *non-nil*, Mew gets messages from your mailbox automatically.
2769 '\\[universal-argument] \\[mew]' equals to '\\[mew]' with 'mew-auto-get'
2770 reversed."
2771 :group 'mew-summary
2772 :type 'boolean)
2773
2774 (defcustom mew-auto-flush-queue t
2775 "If *non-nil* and if there are queued messages in +queue,
2776 they are flushed after getting
2777 message (i.e. '\\<mew-summary-mode-map>\\[mew-summary-retrieve]'). This
2778 idea saves money in dial up environment."
2779 :group 'mew-draft
2780 :type 'boolean)
2781
2782 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2783 ;;;
2784 ;;; Pick and Sort
2785 ;;;
2786
2787 (defcustom mew-pick-pattern-list nil
2788 "*A list of pick pattern which can be circular completed with '\\<mew-input-map>\\[mew-circular-complete-switch]'
2789 The first member is displayed as a default value."
2790 :group 'mew-summary
2791 :type '(choice (const nil) (repeat string)))
2792
2793 (defcustom mew-pick-field-list
2794 '("head=" "to=" "cc=" "subject=" "dcc=" "fcc=" "bcc=" "date="
2795 "reply-to=" "followup-to=" "from=" "newsgroups=")
2796 "*A list of key for pick pattern."
2797 :group 'mew-summary
2798 :type '(choice (const nil) (repeat string)))
2799
2800 (defcustom mew-sort-default-key "date"
2801 "*Default sort key when inputting a sort key.
2802 Its format is key:mode where more is found in 'mew-sort-mode'."
2803 :group 'mew-summary
2804 :type 'string)
2805
2806 (defcustom mew-sort-default-key-alist nil
2807 "*List of (folder sort-key) to decide a default sort-key
2808 of a specific folder. An example is follows:
2809 \(setq mew-sort-default-key-alist
2810 '((\"+tmp/beginners\" \"x-sequence\")
2811 (\"+tmp/elips\" \"x-mail-count\")))"
2812 :group 'mew-summary
2813 :type '(list (list string string)))
2814
2815 (defcustom mew-sort-key-alist
2816 '(("date" "date") ("subject") ("from") ("to") ("newsgroups")
2817 ("posted" "date") ("x-sequence" "postnum")
2818 ("x-mail-count" "num") ("x-ml-count" "num"))
2819 "*List of fields for 'mew-summary-sort'.
2820 Each element is (FIELD-NAME) or (FIELD-NAME . MODE).
2821 MODE is one of \"date\" (by chronological order) or
2822 \"num\" (by numerical order) or
2823 \"postnum\" (by numerical order of postfix numeric) or
2824 \"text\" (by alphabetical order) or
2825 \"ml\" (by alphabetical order with ml prefix removed) or
2826 \"mlnum\" (by numerical order of ml number).
2827 \(nil means \"text\")."
2828 :group 'mew-summary
2829 :type 'sexp)
2830
2831 (defvar mew-sort-modes '("date" "num" "postnum" "text" "ml" "mlnum"))
2832
2833 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2834 ;;;
2835 ;;; Range
2836 ;;;
2837
2838 (defvar mew-range-all "0")
2839
2840 (defvar mew-range-str-all "all")
2841 (defvar mew-range-str-update "update")
2842 (defvar mew-range-str-last "last:")
2843 (defvar mew-range-str-sync "sync")
2844
2845 (defcustom mew-input-range-list
2846 (list mew-range-str-update mew-range-str-all mew-range-str-last)
2847 "*A list used by range completion."
2848 :group 'mew-complete
2849 :type '(repeat string))
2850
2851 (defcustom mew-input-range-remote-list
2852 (list mew-range-str-update mew-range-str-all mew-range-str-last mew-range-str-sync)
2853 "*A list used by range completion."
2854 :group 'mew-complete
2855 :type '(repeat string))
2856
2857 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2858 ;;;
2859 ;;; Highlight
2860 ;;;
2861
2862 (defvar mew-summary-cook-function 'mew-summary-cook-region)
2863
2864 (defcustom mew-use-highlight-mark t
2865 "*If non-nil, highlight marked lines in Summary/Virtual mode."
2866 :group 'mew-highlight
2867 :type 'boolean)
2868
2869 (defcustom mew-use-highlight-header t
2870 "*If non-nil, highlight a header in Message/Draft mode."
2871 :group 'mew-highlight
2872 :type 'boolean)
2873
2874 (defcustom mew-use-highlight-body t
2875 "*If non-nil, highlight a body in Message/Draft mode."
2876 :group 'mew-highlight
2877 :type 'boolean)
2878
2879 (defcustom mew-use-highlight-url t
2880 "*If non-nil, highlight URLs in Message/Draft mode."
2881 :group 'mew-highlight
2882 :type 'boolean)
2883
2884 (defcustom mew-use-cursor-mark nil
2885 "*If *non-nil*, show 'mew-cursor-mark' in the beginning of the
2886 cursor line. This is convenient if 'mew-use-highlight-cursor-line' is
2887 not available."
2888 :group 'mew-highlight
2889 :type 'boolean)
2890
2891 (defcustom mew-use-highlight-cursor-line t
2892 "*Put the 'mew-highlight-cursor-line-face' face on the current line
2893 in Summary/Virtual mode."
2894 :group 'mew-highlight
2895 :type 'boolean)
2896
2897 (defcustom mew-use-highlight-mouse-line nil
2898 "*Put the 'mew-highlight-mouse-line-face' face on the mouse location
2899 in Summary/Virtual mode."
2900 :group 'mew-highlight
2901 :type 'boolean)
2902
2903 (defcustom mew-use-highlight-x-face mew-icon-p
2904 "*Iconify X-Face: in Message mode."
2905 :group 'mew-highlight
2906 :type 'boolean)
2907
2908 (defcustom mew-use-highlight-x-face-inversion nil
2909 "*Invert an X-Face: image in Message mode."
2910 :group 'mew-highlight
2911 :type 'boolean)
2912
2913 ;;;
2914 ;;; Styles and colors
2915 ;;;
2916
2917 (defcustom mew-cursor-mark ">"
2918 "*The mark in the beginning of the cursor line if
2919 'mew-use-cursor-mark' is *non-nil*."
2920 :group 'mew-highlight
2921 :type '(choice string (const nil)))
2922
2923 (defcustom mew-highlight-cursor-line-face 'underline
2924 "*Face to highlight the cursor line in Summary/Virtual mode"
2925 :group 'mew-highlight
2926 :type 'face)
2927
2928 (defcustom mew-highlight-mouse-line-face 'highlight
2929 "*Mouse face to highlight URL in Message/Draft mode"
2930 :group 'mew-highlight
2931 :type 'face)
2932
2933 (defcustom mew-regex-url
2934 (concat
2935 "\\b\\("
2936 "\\(\\(file\\|news\\|mailto\\):\\)"
2937 "\\|"
2938 "\\(\\(s?https?\\|ftp\\|gopher\\|telnet\\|wais\\)://\\)"
2939 "\\)"
2940 "[^ \t\n>)\"]*"
2941 "[^] \t\n>.,:)\"]")
2942 "*Regular expression to find URL."
2943 :group 'mew-highlight
2944 :type 'regexp)
2945
2946 (defcustom mew-highlight-url-mouse-face 'highlight
2947 "*Mouse face to highlight URL in Message/Draft mode"
2948 :group 'mew-highlight
2949 :type 'face)
2950
2951 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2952 ;;;
2953 ;;; Addrbook
2954 ;;;
2955
2956 (defcustom mew-use-auto-alias t
2957 "*If non-nil, addresses on the To: and Cc: field in Draft mode
2958 will be automatically leaned as alias."
2959 :group 'mew-addrbook
2960 :type 'boolean)
2961
2962 (defcustom mew-addrbook-comment-regex "^;.*$\\|#.*$"
2963 "*Regular expression for Addrbook."
2964 :group 'mew-addrbook
2965 :type 'regexp)
2966
2967 (defcustom mew-addrbook-append-domain-p t
2968 "If non-nil, addresses, which do not have domain part in a header,
2969 will be appended (mew-mail-domain) when composing."
2970 :group 'mew-addrbook
2971 :type 'boolean)
2972
2973 (defcustom mew-addrbook-override-by-newone t
2974 "If non-nil, the 'user' entry in 'mew-alias-auto-alist'
2975 is override by a new entry of (user different-address).
2976 This means that addresses in To: and Cc: in Draft mode are
2977 always learned with an exception 'user' is defined in Addrbook.
2978 If nil, the old 'user' entry remains."
2979 :group 'mew-addrbook
2980 :type 'boolean)
2981
2982 (defcustom mew-addrbook-for-cite-label nil
2983 "*How to replace the From: value in cite label
2984 with Addrbook. See 'mew-addrbook-switch'."
2985 :group 'mew-addrbook
2986 :type 'symbol)
2987
2988 (defcustom mew-addrbook-for-cite-prefix 'username
2989 "*How to replace the From: value in cite prefix
2990 with Addrbook. See 'mew-addrbook-switch'."
2991 :group 'mew-addrbook
2992 :type 'symbol)
2993
2994 (defcustom mew-addrbook-for-address-expansion 'name
2995 "*How to replace an address in address fields
2996 with Addrbook. See 'mew-addrbook-switch'."
2997 :group 'mew-addrbook
2998 :type 'symbol)
2999
3000 (defcustom mew-addrbook-for-summary 'nickname
3001 "*How to replace a From: address in summary-form with Addrbook.
3002 See 'mew-addrbook-switch' and 'mew-summary-form-extract-rule'."
3003 :group 'mew-addrbook
3004 :type 'symbol)
3005
3006 (defcustom mew-addrbook-strip-domainpart t
3007 "*If *non-nil*, a shortname is created by stripping its domain part
3008 when '\\<mew-summary-mode-map>\\[mew-summary-addrbook-add]' in Summary mode."
3009 :group 'mew-addrbook
3010 :type 'boolean)
3011
3012 (defcustom mew-addrbook-alias-not-learn-list nil
3013 "*A list of a part of address. If an address matches to one out of the
3014 list. the address is not registered to Addrbook."
3015 :group 'mew-addrbook
3016 :type '(choice (const nil) (repeat string)))
3017
3018 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3019 ;;;
3020 ;;; Cache
3021 ;;;
3022
3023 (defcustom mew-cache-size 10
3024 "*Number of buffer for message cache."
3025 :group 'mew-cache
3026 :type 'integer)
3027
3028 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3029 ;;;
3030 ;;; Privacy
3031 ;;;
3032
3033 (defcustom mew-draft-privacy-method 'pgp
3034 "Privacy method to create messages in Draft mode.
3035 You should choose 'pgp or 'smime."
3036 :group 'mew-privacy
3037 :type '(choice (const pgp) (const smime)))
3038
3039 (defcustom mew-protect-privacy-always nil
3040 "*If non-nil, a draft is to be protected according to
3041 'mew-protect-privacy-always-type'."
3042 :group 'mew-privacy
3043 :type 'boolean)
3044
3045 (defcustom mew-protect-privacy-always-type 'pgp-signature
3046 "*A type of privacy protection for all drafts.
3047 Currently, 'pgp-signature, 'pgp-encryption, 'pgp-signature-encryption,
3048 'pgp-encryption-signature, and nil are available. Since signature
3049 does not require receiver's public key, signature service may be
3050 appropriate for this value."
3051 :group 'mew-privacy
3052 :type '(choice (const pgp-signature)
3053 (const pgp-encryption)
3054 (const pgp-signature-encryption)
3055 (const pgp-encryption-signature)
3056 (const smime-signature)
3057 (const smime-encryption)
3058 (const smime-signature-encryption)
3059 (const smime-encryption-signature)
3060 (other :tag "nil" nil)))
3061
3062 (defcustom mew-protect-privacy-encrypted nil
3063 "*If non-nil, a draft replying a encrypted message is to be protected
3064 according to 'mew-protect-privacy-encrypted-type'."
3065 :group 'mew-privacy
3066 :type 'boolean)
3067
3068 (defcustom mew-protect-privacy-encrypted-type 'pgp-encryption
3069 "*A type of privacy protection for drafts replying encrypted
3070 messages. Currently, 'pgp-signature, 'pgp-encryption,
3071 'pgp-signature-encryption, 'pgp-encryption-signature,
3072 and nil are available."
3073 :group 'mew-privacy
3074 :type '(choice (const pgp-signature)
3075 (const pgp-encryption)
3076 (const pgp-signature-encryption)
3077 (const pgp-encryption-signature)
3078 (const smime-signature)
3079 (const smime-encryption)
3080 (const smime-signature-encryption)
3081 (const smime-encryption-signature)
3082 (other :tag "nil" nil)))
3083
3084 (defcustom mew-protect-privacy-with-old-pgp-signature nil
3085 "*If non-nil and 'mew-use-old-pgp' is non-nil,
3086 the old fashioned PGP message are used when composing."
3087 :group 'mew-privacy
3088 :type 'boolean)
3089
3090 (defcustom mew-passwd-timer-unit 10
3091 "*Minutes of timer unit to cancel the cached passwords."
3092 :group 'mew-privacy
3093 :type 'integer)
3094
3095 (defcustom mew-passwd-lifetime 2
3096 "*Number of 'mew-passwd-timer-unit' to cancel the cached passwords."
3097 :group 'mew-privacy
3098 :type 'integer)
3099
3100 (defcustom mew-passwd-reset-timer t
3101 "*If non-nil, put the lifetime of a cached password longer when
3102 the password is used."
3103 :group 'mew-privacy
3104 :type 'boolean)
3105
3106 (defcustom mew-encrypt-to-myself t
3107 "*if non-nil, any message/part to be encrypted is encrypted with
3108 your public key as well as receivers' one."
3109 :group 'mew-privacy
3110 :type 'boolean)
3111
3112 (defcustom mew-pgp-signer nil
3113 "*ID of a PGP key to use for sign"
3114 :group 'mew-privacy
3115 :type 'string)
3116
3117 (defcustom mew-smime-signer nil
3118 "*ID of a S/MIME key to use for sign"
3119 :group 'mew-privacy
3120 :type 'string)
3121
3122 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3123 ;;;
3124 ;;; PGP Public key fetch
3125 ;;;
3126
3127 (defvar mew-x-pgp-key-list
3128 '("x-pgp-key:" "x-pgp-key-url:" "x-pgp-public-key:" "x-pgp-public-key-url:"
3129 "x-pgp5-key:" "x-pgp5-key-url:" "x-pgp5-public-key:"
3130 "x-pgp5-public-key-url:" "x-public-key:"))
3131
3132 (defvar mew-pgp-pks-port 11371)
3133 (defvar mew-pgp-pks-lang "/pks/lookup?op=get&search=")
3134
3135 ;; Tue Dec 16 16:28:11 JST 2003
3136 ;; http://pgp.zdv.uni-mainz.de/keyserver/bigbrother/
3137
3138 (defvar mew-pgp-pks-servers
3139 '(("openpksd.org" t)
3140 ("blackhole.pca.dfn.de" nil)
3141 ("pgp.ael.be" nil)
3142 ("pgp.dtype.org" nil)
3143 ("pgp.mit.edu" nil)
3144 ("pgp.nic.ad.jp" nil)
3145 ("pgp.rediris.es" nil)
3146 ("pgp.uni-mainz.de" nil)
3147 ("pgp.uni-paderborn.de" nil)
3148 ("wwwkeys.1.us.pgp.net" nil)
3149 ("wwwkeys.2.us.pgp.net" nil)
3150 ("wwwkeys.3.us.pgp.net" nil)
3151 ("wwwkeys.ch.pgp.net" nil)
3152 ("wwwkeys.cz.pgp.net" nil)
3153 ("wwwkeys.es.pgp.net" nil)
3154 ("wwwkeys.uk.pgp.net" nil)))
3155
3156 (defun mew-pgp-pks-http-port-p (server alist)
3157 (nth 1 (assoc server alist)))
3158
3159 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3160 ;;;
3161 ;;; SSH
3162 ;;;
3163
3164 (defvar mew-ssh-number-of-password-prompts 3)
3165
3166 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3167 ;;;
3168 ;;; Sub-programs
3169 ;;;
3170
3171 (defvar mew-prog-mewl "mewl")
3172 (defvar mew-prog-mime-encode "mewencode")
3173 (defvar mew-prog-mime-decode "mewencode")
3174 (defvar mew-prog-8bit "mewencode")
3175 (defvar mew-prog-unshar "unshar")
3176 (defvar mew-prog-tar "tar")
3177 (defvar mew-prog-compress "compress")
3178 (defvar mew-prog-gzip "gzip")
3179 (defvar mew-prog-zip "zip")
3180 (defcustom mew-prog-pgp "gpg"
3181 "*PGP name for version check."
3182 :group 'mew-privacy
3183 :type 'string)
3184
3185 (defvar mew-prog-pgpkey "wget")
3186 (defvar mew-prog-pgpkey-args '("-q" "-O" "-"))
3187
3188 (defvar mew-ssh-prog "ssh")
3189 (defvar mew-ssh-prog-args nil)
3190
3191 (defvar mew-prog-uncompface "uncompface")
3192 (defvar mew-prog-icontopbm "icontopbm")
3193 (defvar mew-prog-pbmtoxbm "pbmtoxbm")
3194 (defvar mew-prog-pbminvert "pnminvert")
3195
3196 (defvar mew-prog-grep "grep")
3197 (defvar mew-prog-grep-opts '("-l" "-e"))
3198
3199 (defvar mew-prog-grep-max-msgs 10000)
3200
3201 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3202 ;;;
3203 ;;; X face
3204 ;;;
3205
3206 (defcustom mew-x-face-file "~/.xface"
3207 "*If *non-nil* and the file exists, X-Face: fields is inserted."
3208 :group 'mew-summary
3209 :type '(choice file (const nil)))
3210
3211 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3212 ;;;
3213 ;;; spam and ham
3214 ;;;
3215
3216 (defcustom mew-spam-prog "bogofilter"
3217 "*A command which learns spams."
3218 :group 'mew-summary
3219 :type 'string)
3220
3221 (defcustom mew-spam-prog-args '("-s" "-N" "-v")
3222 "*A list of command arguments which learns spams."
3223 :group 'mew-summary
3224 :type '(choice (const nil) (repeat string)))
3225
3226 (defcustom mew-ham-prog "bogofilter"
3227 "*A command which learns hams."
3228 :group 'mew-summary
3229 :type 'string)
3230
3231 (defcustom mew-ham-prog-args '("-n" "-S" "-v")
3232 "*A list of command arguments which learns hams."
3233 :group 'mew-summary
3234 :type '(choice (const nil) (repeat string)))
3235
3236 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3237 ;;;
3238 ;;; Mode names
3239 ;;;
3240
3241 (defvar mew-mode-name-header "Header")
3242 (defvar mew-mode-name-draft "Draft")
3243 (defvar mew-mode-name-message "Message")
3244 (defvar mew-mode-name-summary "Summary")
3245 (defvar mew-mode-name-virtual "Virtual")
3246
3247 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3248 ;;;
3249 ;;; Types
3250 ;;;
3251
3252
3253 (defvar mew-file-type "MewX")
3254 (defvar mew-file-creator "EMAx")
3255
3256 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3257 ;;;
3258 ;;; For broken MUAs
3259 ;;;
3260
3261 (defcustom mew-decode-broken t
3262 "If non-nil, Mew decode broken messages.
3263
3264 \(1) Decode quoted encoded-words, which violates RFC 2047.
3265
3266 Good example:
3267 From: Kazu Yamamoto (=?ISO-2022-JP?B?GyRCOzNLXE9CSScbKEI=?=)
3268 <[email protected]>
3269 Bad example:
3270 From: Kazu Yamamoto (\"=?ISO-2022-JP?B?GyRCOzNLXE9CSScbKEI=?=\")
3271 <[email protected]>
3272
3273 \(2) Decode raw non-ASCII text, which violates RFC 822.
3274 This is typically found in Subject: field.
3275
3276 Good example:
3277 Subject: =?iso-2022-jp?B?GyRCJEYkOSRIGyhC?=
3278 Bad example:
3279 Subject: Raw non-ASCII text.
3280
3281 \(3) Decode invalid MIME parameters, which violates RFC 2231.
3282 \(i) Raw text.
3283 \(ii) Encorded-word defined in RFC 2047.
3284
3285 Good example:
3286 Content-Disposition: attachment;
3287 filename*=iso-2022-jp''%1B%24B%24F%249%24H%1B%28B
3288
3289 Bad example
3290 Content-Disposition: attachment;
3291 filename=\"=?iso-2022-jp?B?GyRCJEYkOSRIGyhC?=\"
3292
3293 =(4) Decode invalid non-ASCII MIME body, whose charset is US-ASCII or
3294 not present.
3295
3296 Good example:
3297 Content-Type: text/plain; charset=ISO-2022-jp
3298
3299 ISO-2022-JP text
3300
3301 Bad example:
3302 Content-Type: text/plain
3303
3304 ISO-2022-JP text
3305
3306 \(5) Decode invalid non-ASCII text, whose charset is UTF-8 or not present.
3307
3308 Good example:
3309 Content-Type: text/plain; charset=ISO-8859-15
3310
3311 ISO-8859-15 text
3312
3313 Bad example:
3314 Content-Type: text/plain; charset=UTF-8
3315
3316 ISO-8859-15 text
3317 "
3318 :group 'mew-message
3319 :type 'boolean)
3320
3321 (defcustom mew-use-name-parameter t
3322 "*If non-nil, the invalid NAME parameter of Content-Type: is checked
3323 as a file name in addition to the legal FILENAME parameter of
3324 Content-Disposition:."
3325 :group 'mew-message
3326 :type 'boolean)
3327
3328 (defcustom mew-broken-parameter-list '("name" "filename")
3329 "*A list of parameter names whose value contains non-ASCII strings
3330 produced by broken MUAs."
3331 :group 'mew-message
3332 :type '(repeat string))
3333
3334 (defvar mew-decode-ws-fields '("Subject:"))
3335
3336 (defvar mew-no-warning-fields ()) ;; capitalized
3337
3338 (defvar mew-no-warning-params ()) ;; downcased
3339
3340 (defcustom mew-warning-field-level 1
3341 "*If warning level of a field is greater than or equal to this value,
3342 the warning is displayed on X-Mew:.
3343 Level 1: syntax is correct, but not recommenced.
3344 Level 2: syntax error."
3345 :group 'mew-message
3346 :type 'integer)
3347
3348 (defcustom mew-encode-singlepart-hook nil
3349 "*Hook called before making a single part."
3350 :group 'mew-draft
3351 :type 'hook)
3352
3353 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3354 ;;;
3355 ;;; Preventing warning messages when byte-compiling
3356 ;;;
3357
3358 (defvar mew-regex-message-files nil)
3359 (defvar mew-regex-message-files2 nil)
3360 (defvar mew-regex-message-files3 nil)
3361 (defvar mew-regex-message-files4 nil)
3362 (defvar mew-regex-message-files5 nil)
3363
3364 (defvar mew-basic-folders nil)
3365
3366 (provide 'mew-vars)
3367
3368 ;;; Copyright Notice:
3369
3370 ;; Copyright (C) 1996-2015 Mew developing team.
3371 ;; All rights reserved.
3372
3373 ;; Redistribution and use in source and binary forms, with or without
3374 ;; modification, are permitted provided that the following conditions
3375 ;; are met:
3376 ;;
3377 ;; 1. Redistributions of source code must retain the above copyright
3378 ;; notice, this list of conditions and the following disclaimer.
3379 ;; 2. Redistributions in binary form must reproduce the above copyright
3380 ;; notice, this list of conditions and the following disclaimer in the
3381 ;; documentation and/or other materials provided with the distribution.
3382 ;; 3. Neither the name of the team nor the names of its contributors
3383 ;; may be used to endorse or promote products derived from this software
3384 ;; without specific prior written permission.
3385 ;;
3386 ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
3387 ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3388 ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3389 ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE
3390 ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3391 ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3392 ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
3393 ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
3394 ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
3395 ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
3396 ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3397
3398 ;;; mew-vars.el ends here