* wl-vars.el (wl-interactive-send): Set default value as t.
[elisp/wanderlust.git] / wl / wl-vars.el
1 ;;; wl-vars.el -- Variable definitions for Wanderlust.
2
3 ;; Copyright (C) 1998,1999,2000,2001 Yuuichi Teranishi <teranisi@gohome.org>
4 ;; Copyright (C) 1998,1999,2000,2001 Masahiro MURATA <muse@ba2.so-net.ne.jp>
5
6 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
7 ;;      Masahiro MURATA <muse@ba2.so-net.ne.jp>
8 ;; Keywords: mail, net news
9
10 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
11
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16 ;;
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;; GNU General Public License for more details.
21 ;;
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
26 ;;
27
28 ;;; Commentary:
29 ;;
30
31 ;;; Code:
32 ;;
33
34 (require 'elmo-vars)
35
36 (if (module-installed-p 'custom)
37     (require 'custom))
38
39 ;;; Customizable Variables
40
41 (defgroup wl nil
42   "Wanderlust, a news and mail reading software."
43   :tag "Wanderlust"
44   :link (` (custom-manual
45             (, (if (and (boundp 'current-language-environment)
46                         (string-equal "Japanese"
47                                       (symbol-value 'current-language-environment)))
48                    "(wl-ja)Top"
49                  "(wl)Top"))))
50   :group 'news
51   :group 'mail)
52
53 (defgroup wl-pref nil
54   "Wanderlust, Preferences."
55   :prefix "wl-"
56   :group 'wl)
57
58 (defgroup wl-folder nil
59   "Wanderlust, folder buffer."
60   :prefix "wl-"
61   :group 'wl)
62
63 (defgroup wl-summary nil
64   "Wanderlust, summary buffer."
65   :prefix "wl-"
66   :group 'wl)
67
68 (defgroup wl-summary-marks nil
69   "Wanderlust, marks used in summary buffers."
70   :prefix "wl-summary-"
71   :group 'wl-summary)
72
73 (defgroup wl-expire nil
74   "Wanderlust, Expiring and archiving."
75   :prefix "wl-"
76   :group 'wl)
77
78 (defgroup wl-score nil
79   "Wanderlust, Score file handling."
80   :prefix "wl-"
81   :group 'wl)
82
83 (defgroup wl-highlight nil
84   "Wanderlust, Highlights."
85   :prefix "wl-"
86   :group 'wl)
87
88 (defgroup wl-draft nil
89   "Wanderlust, draft mode."
90   :prefix "wl-"
91   :group 'wl)
92
93 ;;; Emacsen
94 (defconst wl-on-xemacs (featurep 'xemacs))
95
96 (defconst wl-on-emacs21 (and (not wl-on-xemacs)
97                              (>= emacs-major-version 21)))
98
99 (defconst wl-on-nemacs (fboundp 'nemacs-version))
100
101 (defconst wl-on-mule (featurep 'mule))
102
103 (defconst wl-on-mule3
104   (and wl-on-mule (or wl-on-xemacs
105                       (> emacs-major-version 19))))
106
107 (eval-when-compile
108   (defun-maybe locate-data-directory (a)))
109
110 (defvar wl-cs-noconv
111   (cond (wl-on-mule3 'binary)
112         (wl-on-mule  '*noconv*)
113         (wl-on-nemacs 0)
114         (t           nil)))
115
116 (defvar wl-cs-autoconv
117   (cond (wl-on-mule3 'undecided)
118         (wl-on-mule  '*autoconv*)
119         (wl-on-nemacs 2) ; junet...
120         (t           nil)))
121
122 (defvar wl-cs-local
123   (cond (wl-on-mule3  'junet)
124         (wl-on-mule   '*junet*)
125         (wl-on-nemacs 2)
126         (t           nil)))
127
128 (defvar wl-cs-cache wl-cs-local)
129
130 (defvar wl-use-semi (module-installed-p 'mime-view) ; If nil, use tm.
131   "*Use SEMI or not.")
132
133 (defcustom wl-from (and user-mail-address
134                         (concat (and user-full-name
135                                      (concat (elmo-address-quote-specials
136                                               user-full-name)
137                                              " "))
138                                 "<" user-mail-address ">"))
139   "*From string used in draft."
140   :type  'string
141   :group 'wl)
142
143 (defcustom wl-user-mail-address-list nil
144   "*A list of user's mail addresses.
145 This list is used to judge whether an address is user's or not.
146 You should set this variable if you use multiple e-mail addresses.
147 If you don't have multiple e-mail addresses, you don't have to set this."
148   :type '(repeat string)
149   :group 'wl)
150
151 (defcustom wl-organization (getenv "ORGANIZATION")
152   "Organization name."
153   :type '(choice (const :tag "none" nil)
154                  string)
155   :group 'wl)
156
157 (defcustom wl-tmp-dir "~/tmp/"
158   "*Default temporary directory to save message, part."
159   :type 'directory
160   :group 'wl)
161
162 (defcustom wl-icon-dir (if (fboundp 'locate-data-directory)
163                            (locate-data-directory "wl")
164                          (let ((icons (expand-file-name "wl/icons/"
165                                                         data-directory)))
166                            (if (file-directory-p icons)
167                                icons)))
168   "*Icon directory (XEmacs or Emacs 21)."
169   :type '(choice (const :tag "none" nil)
170                  string)
171   :group 'wl)
172
173 (defcustom wl-summary-from-func 'wl-summary-default-from
174   "*A function for displaying sender (From: field) information."
175   :type 'function
176   :group 'wl-summary)
177
178 (defcustom wl-summary-subject-func 'wl-summary-default-subject
179   "*A function for displaying subject."
180   :type 'function
181   :group 'wl-summary)
182
183 (defcustom wl-summary-subject-filter-func 'wl-summary-default-subject-filter
184   "*A filter function for comparing subjects."
185   :type 'function
186   :group 'wl-summary)
187
188 (defcustom wl-summary-search-parent-by-subject-regexp "^[ \t]*\\(\\[[^:]+[,: ][0-9]+\\]\\)?[ \t]*re[\\^[:> ]"
189   "*If message does not have in-reply-to field nor references field and
190  subject matches this regexp, search parent message by subject matching."
191   :type 'string
192   :group 'wl-summary)
193
194 (defcustom wl-summary-update-confirm-threshold 500
195   "*Confirm updating summary if message number is larger than this value."
196   :type 'integer
197   :group 'wl-summary)
198
199 ;; Important folders
200 (defcustom wl-default-folder "%inbox"
201   "*Default folder used in `wl-summary-goto-folder'."
202   :type 'string
203   :group 'wl)
204 (defcustom wl-draft-folder "+draft"
205   "*Draft folder"
206   :type 'string
207   :group 'wl)
208 (defcustom wl-trash-folder "+trash"
209   "*Trash folder"
210   :type 'string
211   :group 'wl)
212 (defcustom wl-queue-folder "+queue"
213   "*Queue folder"
214   :type 'string
215   :group 'wl)
216
217 (defcustom wl-default-spec "%"
218   "*Default spec"
219   :type 'string
220   :group 'wl)
221
222 (defcustom wl-insert-mail-followup-to nil
223   "*Insert Mail-Followup-To: field if non-nil."
224   :type 'boolean
225   :group 'wl-draft)
226
227 (defcustom wl-insert-mail-reply-to nil
228   "*Insert Mail-Reply-To: field if non-nil."
229   :type 'boolean
230   :group 'wl-draft)
231
232 (defcustom wl-insert-message-id t
233   "*Insert Message-ID: field if non-nil."
234   :type 'boolean
235   :group 'wl-draft)
236
237 (defcustom wl-auto-insert-x-face t
238   "*Insert X-Face: field automatically."
239   :type 'boolean
240   :group 'wl-draft)
241
242 (defcustom wl-x-face-file "~/.xface"
243   "*X-Face field is inserted using its contents.
244 If file exists and `wl-auto-insert-x-face' is non-nil."
245   :type 'file
246   :group 'wl-draft)
247
248 (defcustom wl-subscribed-mailing-list nil
249   "*Subscribed mailing list.
250 You had better set this variable if you set 'wl-insert-mail-followup-to' as t."
251   :type '(repeat string)
252   :group 'wl-pref)
253
254 (defcustom wl-demo t
255   "*Display demo at start time."
256   :type 'boolean
257   :group 'wl-pref)
258
259 (defcustom wl-envelope-from nil
260   "*Envelope From used in SMTP.
261 If nil, `wl-from' is used."
262   :type '(choice (const :tag "Same as 'From' field." nil)
263                  string)
264   :group 'wl)
265
266 (defcustom wl-draft-add-references t
267   "*If non-nil, message-id of the cited message is inserted to the
268 references field of the current draft."
269   :type 'boolean
270   :group 'wl)
271
272 (defcustom wl-smtp-connection-type nil
273   "*SMTP connection type.
274 If nil, default smtp connection type is used."
275   :type '(choice (const :tag "default" nil)
276                  (const :tag "Use STARTTLS" starttls)
277                  symbol)
278   :group 'wl)
279
280 (defcustom wl-smtp-posting-user nil
281   "*SMTP authentication user."
282   :type '(choice (const :tag "none" nil)
283                  string)
284   :group 'wl)
285
286 (defcustom wl-smtp-posting-server nil
287   "*SMTP server name to send mail (wl-draft-send-mail-with-smtp)."
288   :type '(choice (const :tag "none" nil)
289                  string)
290   :group 'wl)
291
292 (defcustom wl-smtp-posting-port nil
293   "*SMTP port number in `wl-smtp-posting-server'.
294 If nil, default SMTP port number(25) is used."
295   :type '(choice (const :tag "Default (25)" nil)
296                  integer)
297   :group 'wl)
298
299 (defcustom wl-smtp-authenticate-type nil
300   "*SMTP Authentication type.
301 If nil, don't authenticate."
302   :type '(choice (const :tag "none" nil)
303                  (const :tag "PLAIN" "plain")
304                  (const :tag "CRAM-MD5" "cram-md5")
305                  (const :tag "LOGIN" "login")
306                  (string :tag "Other"))
307   :group 'wl)
308
309 (defcustom wl-pop-before-smtp-user nil
310   "*POP3 user name to send mail using POP-before-SMTP.
311 If nil, `elmo-default-pop3-user' is used.
312 To use POP-before-SMTP,
313 (setq wl-draft-send-mail-func 'wl-draft-send-mail-with-pop-before-smtp)"
314   :type '(choice (const :tag "none" nil)
315                  string)
316   :group 'wl)
317
318 (defcustom wl-pop-before-smtp-server nil
319   "*POP3 server for POP-before-SMTP.
320 If nil, `elmo-default-pop3-server' is used."
321   :type '(choice (const :tag "none" nil)
322                  string)
323   :group 'wl)
324
325 (defcustom wl-pop-before-smtp-port nil
326   "*POP3 port for POP-before-SMTP.
327 If nil, `elmo-default-pop3-port' is used."
328   :type '(choice (const :tag "none" nil)
329                  integer string)
330   :group 'wl)
331
332 (defcustom wl-pop-before-smtp-stream-type nil
333   "*Stream type for POP-before-SMTP.
334 If nil, `elmo-default-pop3-stream-type' is used."
335   :type 'boolean
336   :group 'wl)
337
338 (defcustom wl-pop-before-smtp-authenticate-type nil
339   "*Default Authentication type for POP-before-SMTP.
340 If nil, `elmo-default-pop3-authenticate-type' is used."
341   :type '(choice (const :tag "none" nil)
342                  (const :tag "APOP" "apop")
343                  (const :tag "POP3" "user"))
344   :group 'wl)
345
346 (defcustom wl-nntp-posting-server nil
347   "*NNTP server name to post news.
348 If nil, `elmo-default-nntp-server' is used."
349   :type '(choice (const :tag "none" nil)
350                  string)
351   :group 'wl)
352 (defcustom wl-nntp-posting-user nil
353   "*NNTP user name to post news for authinfo.
354 If nil, `elmo-default-nntp-user' is used.
355 If nil, don't authenticate."
356   :type '(choice (const :tag "none" nil)
357                  string)
358   :group 'wl)
359 (defcustom wl-nntp-posting-port nil
360   "*NNTP port to post news.
361 If nil, `elmo-default-nntp-port' is used."
362   :type '(choice (const :tag "none" nil)
363                  integer string)
364   :group 'wl)
365 (defcustom wl-nntp-posting-stream-type nil
366   "*Stream type for posting Netnews.
367 If nil, `elmo-default-nntp-stream-type' is used."
368   :type 'boolean
369   :group 'wl)
370
371 (defcustom wl-fetch-confirm-threshold 30000
372   "*Confirm fetching if message size is larger than this value."
373   :type 'integer
374   :group 'wl-pref)
375
376 (defcustom wl-prefetch-confirm t
377   "*Confirm prefetching if message size is larger than `wl-prefetch-threshold'."
378   :type 'boolean
379   :group 'wl-pref)
380
381 (defcustom wl-prefetch-threshold 30000
382   "*Maximum size of message prefetched without confirmation.
383 If nil, all messages prefetched regardless of its size.
384 If message size is larger than this value, confirm prefetching
385 when `wl-prefetch-confirm' is non-nil."
386   :type '(choice (integer :tag "Threshold (bytes)")
387                  (const :tag "No limitation" nil))
388   :group 'wl-pref)
389
390 (defcustom wl-cache-prefetch-threshold 30000
391   "*Quit forward cache prefetching if message size is larger than this value."
392   :type 'integer
393   :group 'wl-pref)
394
395 (defcustom wl-thread-insert-opened nil
396   "*Non-nil forces to insert thread as opened in updating."
397   :type 'boolean
398   :group 'wl-summary)
399
400 (defcustom wl-thread-open-reading-thread t
401   "*Non-nil forces to open reading thread."
402   :type 'boolean
403   :group 'wl-summary)
404
405 ;;;; Hooks
406 (defvar wl-folder-mode-hook nil
407   "A hook called when wanderlust folder mode is started.
408 This hook may contain the functions `wl-folder-init-icons' and
409 `wl-setup-folder' for reasons of system internal to accord facilities
410 for the Emacs variants.")
411 (defvar wl-summary-toggle-disp-on-hook nil
412   "A hook called when message is toggled.")
413 (defvar wl-summary-toggle-disp-off-hook nil
414   "A hook called when message is disappeared.")
415 (defvar wl-summary-toggle-disp-folder-on-hook nil
416   "A hook called when folder is toggled.")
417 (defvar wl-summary-toggle-disp-folder-off-hook nil
418   "A hook called when folder is disappeared.")
419 (defvar wl-summary-toggle-disp-folder-message-resumed-hook nil
420   "A hook called when message window is resumed when folder is toggled.")
421 (defvar wl-summary-mode-hook nil
422   "A hook called when summary mode is started.
423 This hook may contain the function `wl-setup-summary' for reasons of
424 system internal to accord facilities for the Emacs variants.")
425
426 (defvar wl-summary-prepared-pre-hook nil
427   "A hook called before the summary buffer has been generated.")
428 (defvar wl-summary-prepared-hook nil
429   "A hook called after the summary buffer has been generated.")
430 (defvar wl-summary-sync-updated-hook nil
431   "A hook called when update summary buffer.")
432 (defvar wl-summary-unread-message-hook nil
433   "A hook called when unread message is displayed.")
434 (defvar wl-summary-edit-addresses-hook nil
435   "A hook called when address book is edited.")
436 (defvar wl-summary-buffer-message-saved-hook nil
437   "A hook called when msgdb is saved.")
438 (defvar wl-summary-buffer-mark-saved-hook nil
439   "A hook called when mark is saved.")
440 (defvar wl-summary-divide-thread-when-subject-changed nil
441   "Divide thread when subject is changed.")
442 (defvar wl-init-hook nil
443   "A hook called when initialization is finished.  This hook may contain
444 the functions `wl-plugged-init-icons' and `wl-biff-init-icons' for
445 reasons of system internal to accord facilities for the Emacs variants.")
446 (defvar wl-hook nil
447   "A hook called when Wanderlust is invoked.")
448 (defvar wl-reply-hook nil
449   "A hook called when replied.")
450 (defvar wl-mail-setup-hook nil
451   "A hook called when Draft is prepared.")
452 (defvar wl-draft-reedit-hook nil
453   "A hook called when Draft is re-edited.")
454 (defvar wl-draft-send-hook '(wl-draft-config-exec)
455   "A hook called on the draft editing buffer before sending process starts.")
456 (defvar wl-mail-send-pre-hook nil
457   "A hook called just before the mail sending process starts.")
458 (defvar wl-news-send-pre-hook nil
459   "A hook called just before the news sending process starts.")
460 (defvar wl-message-buffer-created-hook nil
461   "A hook called when Message buffer is prepared.")
462 (defvar wl-message-redisplay-hook nil
463   "A hook called when Message is displayed.")
464 (defvar wl-message-exit-hook nil
465   "A hook called when quit message.")
466 (defvar wl-summary-exit-hook nil
467   "A hook called when exit summary mode.")
468 (defvar wl-highlight-headers-hook nil
469   "A hook called when header is highlighted.")
470 (defvar wl-highlight-message-hook nil
471   "A hook called when message is highlighted.")
472 (defvar wl-save-hook nil
473   "A hook called when save summary and folder status.")
474 (defvar wl-exit-hook nil
475   "A hook called when exit wanderlust.")
476 (defvar wl-folder-suspend-hook nil
477   "A hook called when suspend wanderlust.")
478 (defvar wl-biff-notify-hook nil
479   "A hook called when a biff-notification is invoked.")
480 (defvar wl-biff-unnotify-hook nil
481   "A hook called when a biff-notification is removed.")
482 (defvar wl-auto-check-folder-pre-hook nil
483   "A hook called before auto check folders.")
484 (defvar wl-auto-check-folder-hook nil
485   "A hook called when auto check folders.")
486 (defvar wl-folder-check-entity-pre-hook nil
487   "A hook called before check entity.")
488 (defvar wl-folder-check-entity-hook nil
489   "A hook called when check entity.")
490 (defvar wl-draft-config-exec-hook nil
491   "A hook called when execute header-config on draft.")
492 (defvar wl-summary-expire-pre-hook nil
493   "A hook called before expire.")
494 (defvar wl-summary-expire-hook nil
495   "A hook called when expired.")
496 (defvar wl-summary-archive-pre-hook nil
497   "A hook called before archive.")
498 (defvar wl-summary-archive-hook nil
499   "A hook called when archived.")
500 (defvar wl-summary-line-inserted-hook nil
501   "A hook called when summary line is inserted.")
502 (defvar wl-summary-insert-headers-hook nil
503   "A hook called when insert header for search header.")
504 (defvar wl-thread-update-children-number-hook nil
505   "A hook called when children number is updated.")
506 (defvar wl-folder-update-access-group-hook nil
507   "A hook called when update access group folder.")
508 (defvar wl-draft-cited-hook nil
509   "A hook called after a message is cited.")
510 (defvar wl-draft-insert-x-face-field-hook nil
511   "A hook called after a x-face field is inserted.")
512 (defvar wl-template-mode-hook nil
513   "A hook called when template mode is started.")
514 (defvar wl-score-mode-hook nil
515   "A hook called when score mode is started.")
516 (defvar wl-make-plugged-hook nil
517   "A hook called when make plugged alist.")
518
519 (defvar wl-plugged-exit-hook nil
520   "A hook called when exit plugged mode.")
521
522 ;;;; functions for draft
523 (defcustom wl-draft-send-func 'wl-draft-normal-send-func
524   "A function to send message."
525   :type 'function
526   :group 'wl-draft)
527
528 (defcustom wl-draft-send-news-func 'wl-draft-elmo-nntp-send
529   "A function to send news."
530   :type 'function
531   :group 'wl-draft)
532
533 (defcustom wl-draft-send-mail-func 'wl-draft-send-mail-with-smtp
534   "A function to send mail.
535 Prepared candidates are 'wl-draft-send-mail-with-smtp,
536 'wl-draft-send-mail-with-qmail and 'wl-draft-send-mail-with-pop-before-smtp."
537   :type '(radio (function-item wl-draft-send-mail-with-smtp)
538                 (function-item wl-draft-send-mail-with-qmail)
539                 (function-item wl-draft-send-mail-with-pop-before-smtp)
540                 (function :tag "Other"))
541   :group 'wl-draft)
542
543 (defcustom wl-draft-reply-with-argument-list
544   '(("Reply-To" . (("Reply-To") nil nil))
545     ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
546     ("From" . (("From") nil nil)))
547   "Alist of cons cell of
548 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
549 'field-name' is a string.
550 'fields for ***' is a list of strings.
551 If car of each cons cell exists in original message,
552 cdr of each cons cell is used for draft message.
553 Default is for 'reply-to-author'."
554   :type '(repeat (cons (choice (string :tag "Field Name")
555                                (repeat (string :tag "Field Name")))
556                        (list (repeat :tag "Fields For To" string)
557                              (repeat :tag "Fields For Cc" string)
558                              (repeat :tag "Fields For Newsgroups" string))))
559   :group 'wl-draft)
560
561 (defcustom wl-draft-reply-without-argument-list
562   '(("Followup-To" . (nil nil ("Followup-To")))
563     ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
564     ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups")))
565     ("From" . (("From") ("To" "Cc") ("Newsgroups"))))
566   "Alist of cons cell of
567 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
568 'field-name' is a string.
569 'fields for ***' is a list of strings.
570 If car of each cons cell exists in original message,
571 cdr of each cons cell is used for draft message.
572 Default is for 'reply-to-all'."
573   :type '(repeat (cons (choice (string :tag "Field Name")
574                                (repeat (string :tag "Field Name")))
575                        (list (repeat :tag "Fields For To" string)
576                              (repeat :tag "Fields For Cc" string)
577                              (repeat :tag "Fields For Newsgroups" string))))
578   :group 'wl-draft)
579
580 (defcustom wl-draft-reply-myself-with-argument-list
581   '(("Followup-To" . (("To") ("Cc") ("Followup-To")))
582     ("Newsgroups" . (("To") ("Cc") ("Newsgroups")))
583     ("From" . (("To") ("Cc") nil)))
584   "Alist of cons cell of
585 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
586 'field-name' is a string.
587 'fields for ***' is a list of strings.
588 If car of each cons cell exists in original message,
589 cdr of each cons cell is used for draft message.
590 Default is for 'reply-to-me'."
591   :type '(repeat (cons (choice (string :tag "Field Name")
592                                (repeat (string :tag "Field Name")))
593                        (list (repeat :tag "Fields For To" string)
594                              (repeat :tag "Fields For Cc" string)
595                              (repeat :tag "Fields For Newsgroups" string))))
596   :group 'wl-draft)
597
598 (defcustom wl-draft-reply-myself-without-argument-list
599   '(("Followup-To" . (("To") ("Cc") ("Followup-To")))
600     ("Newsgroups" . (("To") ("Cc") ("Newsgroups")))
601     ("From" . (("To") ("Cc") nil)))
602   "Alist of cons cell of
603 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
604 'field-name' is a string.
605 'fields for ***' is a list of strings.
606 If car of each cons cell exists in original message,
607 cdr of each cons cell is used for draft message.
608 Default is for 'followup-to-me'."
609   :type '(repeat (cons (choice (string :tag "Field Name")
610                                (repeat (string :tag "Field Name")))
611                        (list (repeat :tag "Fields For To" string)
612                              (repeat :tag "Fields For Cc" string)
613                              (repeat :tag "Fields For Newsgroups" string))))
614   :group 'wl-draft)
615
616 (defcustom wl-draft-always-delete-myself nil
617   "*Always delete myself from reciepient if non-nil."
618   :type 'boolean
619   :group 'wl-draft)
620
621 (defcustom wl-draft-delete-myself-from-bcc-fcc nil
622   "*Do not insert bcc or fcc if To and Cc fields is a member of
623 `wl-subscribed-mailing-list'"
624   :type 'boolean
625   :group 'wl-draft)
626
627 (defcustom wl-draft-resume-folder-window t
628   "*Resume folder window in `wl-draft-hide'."
629   :type 'boolean
630   :group 'wl-draft)
631
632 (defcustom wl-draft-use-frame nil
633   "*Raise new frame when composing draft."
634   :type 'boolean
635   :group 'wl-draft)
636
637 (defcustom wl-draft-qmail-send-plugged nil
638   "*Send mail when plugged is on, in the `wl-draft-send-mail-with-qmail'."
639   :type 'boolean
640   :group 'wl-draft)
641
642 (defcustom wl-draft-remove-group-list-contents t
643   "*If non-nil, remove group list contents in `wl-draft-send-mail-with-smtp'."
644   :type 'boolean
645   :group 'wl-draft)
646
647 ;;;;
648 (defcustom wl-init-file "~/.wl"
649   "*User customization setting file."
650   :type 'file
651   :group 'wl)
652
653 (defcustom wl-folders-file "~/.folders"
654   "*Folders file."
655   :type 'file
656   :group 'wl)
657
658 (defcustom wl-address-file "~/.addresses"
659   "*Addresses file."
660   :type 'file
661   :group 'wl)
662
663 (defcustom wl-alias-file "~/.im/Aliases"
664   "*Alias file for completion."
665   :type 'file
666   :group 'wl)
667
668 (defcustom wl-ldap-server "localhost"
669   "*LDAP server."
670   :type '(string :tag "Server")
671   :group 'wl)
672
673 (defcustom wl-ldap-port nil
674   "*LDAP port."
675   :type '(choice (const :tag "Default port" nil)
676                  integer)
677   :group 'wl)
678
679 (defcustom wl-ldap-base "c=US"
680   "*LDAP base."
681   :type '(string :tag "Base")
682   :group 'wl)
683
684 (defcustom wl-ldap-objectclass "person"
685   "*LDAP objectclass."
686   :type 'string
687   :group 'wl)
688
689 (defcustom wl-use-ldap nil
690   "*If non-nil, use LDAP for address completion."
691   :type 'boolean
692   :group 'wl)
693
694 (defcustom wl-folder-info-save t
695   "If non-nil, save elmo-folder-info-alist."
696   :type 'boolean
697   :group 'wl-folder)
698
699 (defcustom wl-summary-unread-mark "!"
700   "Mark for unread message."
701   :type '(string :tag "Mark")
702   :group 'wl-summary-marks)
703 (defcustom wl-summary-important-mark "$"
704   "Mark for important message."
705   :type '(string :tag "Mark")
706   :group 'wl-summary-marks)
707 (defcustom wl-summary-new-mark "N"
708   "Mark for new message."
709   :type '(string :tag "Mark")
710   :group 'wl-summary-marks)
711 (defcustom wl-summary-unread-uncached-mark "U"
712   "Mark for unread and uncached message."
713   :type '(string :tag "Mark")
714   :group 'wl-summary-marks)
715 (defcustom wl-summary-unread-cached-mark "!"
716   "Mark for unread but already cached message."
717   :type '(string :tag "Mark")
718   :group 'wl-summary-marks)
719 (defcustom wl-summary-read-uncached-mark "u"
720   "Mark for read but uncached message."
721   :type '(string :tag "Mark")
722   :group 'wl-summary-marks)
723 (defcustom wl-summary-score-over-mark "+"
724   "Score mark used for messages with high scores."
725   :type '(string :tag "Mark")
726   :group 'wl-summary-marks)
727 (defcustom wl-summary-score-below-mark "-"
728   "Score mark used for messages with low scores."
729   :type '(string :tag "Mark")
730   :group 'wl-summary-marks)
731
732 (defcustom wl-summary-no-mime-folder-list
733   (list (concat "^" (regexp-quote wl-draft-folder) "$"))
734   "*All folders that match this list don't analysis mime."
735   :type '(repeat string)
736   :group 'wl-summary)
737
738 (defcustom wl-summary-fix-timezone nil
739   "*Time zone of the date string in summary mode. 
740 If nil, it is adjust to the default time zone information
741 \(system's default time zone or environment variable TZ\)."
742   :type '(choice (const :tag "Default time zone" nil)
743                  string)
744   :group 'wl-summary)
745
746 (defcustom wl-summary-default-score 0
747   "*Default message score level.
748 All scores generated by the score files will be added to this score.
749 If this variable is nil, scoring will be disabled."
750   :type '(choice (const :tag "disable" nil)
751                  integer)
752   :group 'wl-score)
753
754 (defcustom wl-summary-important-above nil
755   "*Mark all messages with a score above this variable as important.
756 This variable is local to the summary buffers."
757   :type '(choice (const :tag "off" nil)
758                  integer)
759   :group 'wl-score)
760
761 (defcustom wl-summary-target-above nil
762   "*Mark all messages with a score above this variable as target.
763 This variable is local to the summary buffers."
764   :type '(choice (const :tag "off" nil)
765                  integer)
766   :group 'wl-score)
767
768 (defcustom wl-summary-mark-below 0
769   "*Mark all messages with a score below this variable as read.
770 This variable is local to each summary buffer and usually set by the
771 score file."
772   :type 'integer
773   :group 'wl-score)
774
775 (defcustom wl-summary-expunge-below nil
776   "All messages that have a score less than this variable will be expunged.
777 This variable is local to the summary buffers."
778   :type '(choice (const :tag "off" nil)
779                  integer)
780   :group 'wl-score)
781
782 (defcustom wl-summary-score-marks
783   (list wl-summary-new-mark)
784   "Persistent marks to scoring."
785   :type '(repeat (string :tag "Mark"))
786   :group 'wl-score)
787
788 (defcustom wl-use-scoring (not wl-on-nemacs)
789   "*If non-nil, enable scoring."
790   :type 'boolean
791   :group 'wl-pref)
792
793 (defcustom wl-summary-rescore-partial-threshold 200
794   "*Summary is not scored entirely if there are messages more than this value.
795 In sync-all or rescan."
796   :type 'integer
797   :group 'wl-score)
798
799 (defcustom wl-score-files-dir (concat elmo-msgdb-dir elmo-path-sep)
800   "*Name of the directory where score files will be stored.
801 (default \"~/.elmo\")."
802   :type 'directory
803   :group 'wl)
804
805 (defcustom wl-score-interactive-default-score 1000
806   "*Scoring commands will raise/lower the score with this number as the default."
807   :type 'integer
808   :group 'wl-score)
809
810 (defcustom wl-score-expiry-days 7
811   "*Number of days before unused score file entries are expired.
812 If this variable is nil, no score file entries will be expired."
813   :type '(choice (const :tag "never" nil)
814                  number)
815   :group 'wl-score)
816
817 (defcustom wl-score-update-entry-dates t
818   "*In non-nil, update matching score entry dates.
819 If this variable is nil, then score entries that provide matches
820 will be expired along with non-matching score entries."
821   :type 'boolean
822   :group 'wl-score)
823
824 (defcustom wl-score-folder-alist nil
825   "*Alist of folder regexp and score file."
826   :type '(repeat (list (regexp :tag "Folder Regexp")
827                        (repeat :inline t
828                                (choice file
829                                        (symbol :tag "Variable")))))
830   :group 'wl-score)
831
832 (defcustom wl-score-folder-alist-matchone t
833   "*If non-nil, getting only one element of `wl-score-folder-alist'."
834   :type 'boolean
835   :group 'wl-score)
836
837 (defcustom wl-score-default-file "all.SCORE"
838   "*Default score file name."
839   :type 'file
840   :group 'wl-score)
841
842 (defcustom wl-score-simplify-fuzzy-regexp
843   '("^[ \t]*\\[[^:]+[,: ][0-9]+\\][ \t]*")
844   "*Strings to be removed when doing fuzzy matches.
845 This can either be a regular expression or list of regular expressions."
846   :type '(repeat regexp)
847   :group 'wl-score)
848
849 (defcustom wl-score-header-default-entry
850   '(("number" -1000 perm =)
851     ("subject" -1000 nil nil)
852     ("from" -1000 perm s)
853     ("message-id" -1000 temp e)
854     ("references" -1000 perm e)
855     ("to" -1000 perm s)
856     ("cc" -1000 perm s)
857     ("date" -1000 temp nil)
858     ("xref" -1000 perm s)
859     ("extra" -1000 perm s)
860     ("chars" -1000 perm >)
861     ("lines" -1000 perm >)
862     ("followup" -1000 perm s)
863     ("thread" -1000 temp s))
864   "*Default entry when insert score entry."
865   :type '(repeat (list (string :tag "Header")
866                        (choice (integer :tag "Score")
867                                (const :tag "Ask" nil))
868                        (choice (const :tag "Permanent" perm)
869                                (const :tag "Temporary" temp)
870                                (const :tag "Ask" nil))
871                        (choice (const :tag "Regexp string" r)
872                                (const :tag "Substring" s)
873                                (const :tag "fuzzy string" f)
874                                (const :tag "Exact string" e)
875                                (const :tag "REGEXP STRING" R)
876                                (const :tag "SUBSTRING" S)
877                                (const :tag "FUZZY STRING" F)
878                                (const :tag "EXACT STRING" E)
879                                (const :tag "less than" <)
880                                (const :tag "less equal" <=)
881                                (const :tag "greater than" >)
882                                (const :tag "greater equal" >=)
883                                (const :tag "equal" =)
884                                (const :tag "Ask" nil))))
885   :group 'wl-score)
886
887 (defcustom wl-score-mode-mime-charset 'x-ctext
888   "*MIME Charset for score file."
889   :type 'symbol
890   :group 'wl-score)
891
892 (defcustom wl-draft-fields
893   '("To:" "Cc:" "Bcc:" "FCC:" "Distribution:" "Organization:"
894     "Newsgroups:" "Followup-To:" "Mail-Followup-To:" "From:" "Reply-To:")
895   "Fields used in draft mode."
896   :type '(repeat (string :tag "Field"))
897   :group 'wl-draft)
898
899 (defcustom wl-draft-config-alist nil
900   "Alist of configuration field on draft.
901 ex.
902 '((\"^To: .*wl@lists.airs.net\"
903    (\"From\" . wl-from2)
904    (\"Organization\" . wl-organization2))
905   (\"^To: .*hogehoge@\"
906    (\"From\" . \"Anonymous <hogehoge@aaa.ne.jp>\")
907    wl-my-draft-config-func-hoge))"
908   :type '(repeat (list (sexp :tag "Match")
909                        (repeat
910                         :inline t
911                         (choice (cons (sexp :tag "Field(Variable)")
912                                       (sexp :tag "Value"))
913                                 (sexp :tag "Function")))))
914   :group 'wl-draft)
915
916 (defcustom wl-draft-config-matchone nil
917   "*If non-nil, applied only one element of `wl-draft-config-alist'."
918   :type 'boolean
919   :group 'wl-draft)
920
921 (defcustom wl-template-alist nil
922   "Alist of template."
923   :type '(repeat (list (string :tag "Name")
924                        (repeat
925                         :inline t
926                         (choice (cons (sexp :tag "Field(Variable)")
927                                       (sexp :tag "Value"))
928                                 (sexp :tag "Function")))))
929   :group 'wl-draft)
930
931 (defcustom wl-template-visible-select t
932   "*If non-nil, select template with visible."
933   :type 'boolean
934   :group 'wl-draft)
935
936 (defcustom wl-template-confirm nil
937   "*If non-nil, require your confirmation when selected template."
938   :type 'boolean
939   :group 'wl-draft)
940
941 (defcustom wl-template-buffer-lines 7
942   "*Lines of template buffer."
943   :type 'integer
944   :group 'wl-draft)
945
946 ;; queued sending.
947 (defcustom wl-draft-enable-queuing t
948   "*Non-nil enables queued sending."
949   :type 'boolean
950   :group 'wl-draft
951   :group 'wl-pref)
952
953 (defcustom wl-draft-use-cache nil
954   "*If non-nil, sending message is cached."
955   :type 'boolean
956   :group 'wl-draft
957   :group 'wl-pref)
958
959 (defcustom wl-auto-flush-queue t
960   "*If non-nil, sending queue is flushed when network status is toggled."
961   :type 'boolean
962   :group 'wl-draft
963   :group 'wl-pref)
964
965 (defcustom wl-draft-reply-buffer-style 'split
966   "'split or 'full."
967   :type '(radio (const split)
968                 (const full))
969   :group 'wl-draft)
970
971 (defcustom wl-draft-queue-save-variables
972   '(wl-envelope-from wl-from
973     wl-smtp-posting-server wl-smtp-posting-user wl-smtp-posting-port
974     wl-smtp-authenticate-type wl-smtp-connection-type
975     wl-pop-before-smtp-server wl-pop-before-smtp-user wl-pop-before-smtp-port
976     wl-pop-before-smtp-stream-type wl-pop-before-smtp-authenticate-type
977     wl-nntp-posting-server wl-nntp-posting-server
978     wl-nntp-posting-user wl-nntp-posting-port wl-nntp-posting-stream-type)
979   "*Saving variables in queue info."
980   :type '(repeat (sexp :tag "Variable"))
981   :group 'wl-draft)
982
983 (defcustom wl-draft-sendlog t
984   "*Keep send state in log if non-nil."
985   :type 'boolean
986   :group 'wl-draft)
987
988 (defcustom wl-draft-sendlog-max-size 20000
989   "*Max file size of sendlog."
990   :type 'integer
991   :group 'wl-draft)
992
993 (defcustom wl-summary-default-number-column 5
994   "Number of columns in summary buffer."
995   :type 'integer
996   :group 'wl-summary)
997
998 (defcustom wl-summary-number-column-alist '(("\\*.*" . 6))
999   "Alist of folder and its number column.
1000 If no matches, 'wl-summary-default-number-column' is used.
1001 ex.
1002 '((\"^%inbox@qmail-maildir\" . 9)
1003   (\"^-.*@news-server\" . 6))"
1004   :type '(repeat (cons (regexp :tag "Folder Regexp") integer))
1005   :group 'wl-summary)
1006
1007 (defcustom wl-summary-highlight t
1008   "Non-nil forces Summary buffer to be highlighted."
1009   :type 'boolean
1010   :group 'wl-summary
1011   :group 'wl-highlight)
1012
1013 (defcustom wl-summary-lazy-highlight (and (boundp 'window-scroll-functions)
1014                                           (not wl-on-xemacs))
1015   "Non-nil forces lazy summary highlighting using `window-scroll-functions'."
1016   :type 'boolean
1017   :group 'wl-summary
1018   :group 'wl-highlight)
1019
1020 (defcustom wl-summary-highlight-partial-threshold 1000
1021   "Summary is not highlighted entirely if there are lines more than this value.
1022 Available if only `wl-summary-lazy-highlight' is nil."
1023   :type 'integer
1024   :group 'wl-summary
1025   :group 'wl-highlight)
1026
1027 (defcustom wl-summary-partial-highlight-above-lines 30
1028   "If Summary has lines more than `wl-summary-highlight-partial-threshold',
1029 Summary lines are highlighted partialy above current position.
1030 Available if only `wl-summary-lazy-highlight' is nil."
1031   :type 'integer
1032   :group 'wl-summary
1033   :group 'wl-highlight)
1034
1035 (defcustom wl-summary-cache-use t
1036   "Non-nil forces wl-summary to use cache file."
1037   :type 'boolean
1038   :group 'wl-summary)
1039
1040 (defcustom wl-summary-auto-sync-marks t
1041   "Non-nil forces to synchronize unread/important marks."
1042   :type 'boolean
1043   :group 'wl-summary)
1044
1045 (defcustom wl-summary-cache-file ".wl-summary-cache"
1046   "*Cache file for summary mode contents."
1047   :type 'file
1048   :group 'wl-summary)
1049 (defcustom wl-summary-view-file ".wl-summary-view"
1050   "*Current summary view."
1051   :type 'file
1052   :group 'wl-summary)
1053 (defcustom wl-thread-top-file ".wl-thread-top"
1054   "*Current thread top entity... obsolete."
1055   :type 'file
1056   :group 'wl-summary)
1057 (defcustom wl-thread-entity-file ".wl-thread-entity"
1058   "*Thread entities."
1059   :type 'file
1060   :group 'wl-summary)
1061 (defcustom wl-thread-entity-list-file ".wl-thread-entity-list"
1062   "*Thread top entity list."
1063   :type 'file
1064   :group 'wl-summary)
1065
1066 (defcustom wl-print-buffer-func 'lpr-buffer
1067   "A function to print current buffer."
1068   :type 'function
1069   :group 'wl-pref)
1070
1071 (defcustom wl-ps-print-buffer-func
1072   (if window-system 'ps-print-buffer-with-faces 'ps-print-buffer)
1073   "A function to print current buffer with ps-print."
1074   :type 'function
1075   :group 'wl-pref)
1076
1077 ;;;; Preferences
1078 (defcustom wl-use-petname t
1079   "*Display petname in summary and default citation title."
1080   :type 'boolean
1081   :group 'wl-pref)
1082
1083 (defcustom wl-use-folder-petname
1084   '(modeline)
1085   "*List of situation using folder petname.
1086 Allowed situations are:
1087   modeline    : displayed on modeline.
1088   ask-folder  : displayed on minibuffer when ask folder.
1089   read-folder : can used for completion at `wl-summary-read-folder'."
1090   :type '(set (const modeline)
1091               (const ask-folder)
1092               (const read-folder))
1093   :group 'wl-summary
1094   :group 'wl-pref)
1095
1096 (defcustom wl-folder-petname-alist nil
1097   "A list of (realname . petname)."
1098   :type '(repeat (cons (string :tag "Realname") (string :tag "Petname")))
1099   :group 'wl-folder)
1100
1101 (defcustom wl-summary-weekday-name-lang "ja"
1102   "*Language to display week day."
1103   :type '(choice (const "ja")
1104                  (const "en")
1105                  (const "fr")
1106                  (const "de")
1107                  (string :tag "Other"))
1108   :group 'wl-summary
1109   :group 'wl-pref)
1110
1111 (defcustom wl-local-domain nil
1112   "*Domain part of this client (without hostname).
1113 Set this if (system-name) does not return FQDN."
1114   :type '(choice (const :tag "Use System Name" nil)
1115                  string)
1116   :group 'wl-pref)
1117
1118 (defcustom wl-message-id-domain nil
1119   "*Specific domain part of Message-ID."
1120   :type '(choice (const :tag "Use System Name" nil)
1121                  string)
1122   :group 'wl-pref)
1123
1124 (defcustom wl-break-pages t
1125   "*Break Pages at ^L."
1126   :type 'boolean
1127   :group 'wl-pref)
1128
1129 (defcustom wl-message-scroll-amount 5
1130   "*Scroll amount by SPC key."
1131   :type 'integer
1132   :group 'wl-pref)
1133
1134 (defcustom wl-message-window-size '(1 . 4)
1135   "*Size of summary and message window.  cons cell of (Summary : Message)."
1136   :type '(cons integer integer)
1137   :group 'wl-pref)
1138
1139 (defcustom wl-message-sort-field-list '("Return-Path" "Received" "^To" "^Cc"
1140                                         "Newsgroups" "Subject" "^From")
1141   "*Sort order of header fields.  Each elements are regexp of field name.
1142 (Not valid on tm.)"
1143   :type '(repeat (string :tag "Field Regexp"))
1144   :group 'wl-pref)
1145
1146 (defcustom wl-message-ignored-field-list nil
1147   "All fields that match this list will be hidden in message buffer.
1148 Each elements are regexp of field-name."
1149   :type '(repeat (string :tag "Field Regexp"))
1150   :group 'wl-pref)
1151
1152 (defcustom wl-message-visible-field-list nil
1153   "All fields that match this list will be displayed in message buffer.
1154 Each elements are regexp of field-name."
1155   :type '(repeat (string :tag "Field Regexp"))
1156   :group 'wl-pref)
1157
1158 (defcustom wl-folder-window-width 20
1159   "*Width of folder window."
1160   :type 'integer
1161   :group 'wl-folder
1162   :group 'wl-pref)
1163
1164 (defcustom wl-summary-recenter t
1165   "*Recenter on redisplay."
1166   :type 'boolean
1167   :group 'wl-summary
1168   :group 'wl-pref)
1169
1170 (defcustom wl-folder-use-frame nil
1171   "*Use dedicated frame for folder mode if non-nil."
1172   :type 'boolean
1173   :group 'wl-pref)
1174
1175 (defcustom wl-summary-use-frame nil
1176   "*Use dedicated frame for each folder summary if non-nil."
1177   :type 'boolean
1178   :group 'wl-pref)
1179
1180 (defcustom wl-stay-folder-window nil
1181   "*Stay folder window when folder is selected if non-nil."
1182   :type 'boolean
1183   :group 'wl-pref)
1184
1185 (defcustom wl-reply-subject-prefix "Re: "
1186   "*Prefix of the subject of the replied message."
1187   :type 'string
1188   :group 'wl-draft
1189   :group 'wl-pref)
1190
1191 (defcustom wl-draft-reply-use-address-with-full-name t
1192   "*Use address with full-name in the draft of replied message."
1193   :type 'boolean
1194   :group 'wl-pref
1195   :group 'wl-draft)
1196
1197 (defcustom wl-subject-prefix-regexp "^[ \t]*\\([Rr][Ee][:>][ \t]*\\)*[ \t]*"
1198   "*Regexp matching \"Re: \" in the subject line."
1199   :type 'regexp
1200   :group 'wl-draft
1201   :group 'wl-pref)
1202
1203 (defcustom wl-folder-many-unsync-threshold 70
1204   "*Folders which contains messages more than this number are highlighted
1205 with wl-highlight-folder-many-face."
1206   :type 'integer
1207   :group 'wl-folder
1208   :group 'wl-pref)
1209
1210 (defcustom wl-fcc nil
1211   "*Folder Carbon Copy."
1212   :type '(choice (const :tag "disable" nil)
1213                  string function)
1214   :group 'wl-draft
1215   :group 'wl-pref)
1216
1217 (defcustom wl-bcc nil
1218   "*Blind Carbon Copy."
1219   :type '(choice (const :tag "disable" nil)
1220                  string)
1221   :group 'wl-draft
1222   :group 'wl-pref)
1223
1224 (defcustom wl-folder-desktop-name "Desktop"
1225   "*An implicit name of the folder top entity."
1226   :type 'string
1227   :group 'wl-folder
1228   :group 'wl-pref)
1229
1230 (defcustom wl-summary-indent-length-limit 46
1231   "*Limit of indent length for thread."
1232   :type 'integer
1233   :group 'wl-summary
1234   :group 'wl-pref)
1235
1236 (defcustom wl-summary-no-from-message "nobody@nowhere?"
1237   "*A string displayed in summary when no from field exists."
1238   :type 'string
1239   :group 'wl-summary)
1240
1241 (defcustom wl-summary-no-subject-message "(WL:No Subject in original.)"
1242   "*A string displayed in summary when no subject field exists."
1243   :type 'string
1244   :group 'wl-summary)
1245
1246 (defcustom wl-summary-cancel-message "I'd like to cancel my message."
1247   "*The body content of a cancel message."
1248   :type 'string
1249   :group 'wl-summary)
1250
1251 (defcustom wl-summary-width 80
1252   "*Set summary line width if non nil."
1253   :type '(choice (const :tag "Don't truncate" nil)
1254                  integer)
1255   :group 'wl-summary
1256   :group 'wl-pref)
1257
1258 (defcustom wl-summary-pick-field-default "Body"
1259   "*Default field for pick."
1260   :type '(radio (const "From")
1261                 (const "Subject")
1262                 (const "To")
1263                 (const "Cc")
1264                 (const "Body")
1265                 (const "Since")
1266                 (const "Before")
1267                 (const "Last")
1268                 (const "First")
1269                 (string :tag "Other"))
1270   :group 'wl-summary)
1271
1272 (defcustom wl-from-width 17
1273   "*From width in summary."
1274   :type 'integer
1275   :group 'wl-summary
1276   :group 'wl-pref)
1277
1278 (defcustom wl-subject-length-limit 35
1279   "*Subject width in summary."
1280   :type 'integer
1281   :group 'wl-summary
1282   :group 'wl-pref)
1283
1284 (defcustom wl-mime-charset (if wl-on-nemacs
1285                                'iso-2022-jp
1286                              'x-ctext)
1287   "*MIME Charset for summary and message."
1288   :type 'symbol
1289   :group 'wl-summary
1290   :group 'wl-pref)
1291
1292 (defcustom wl-generate-mailer-string-func 'wl-generate-user-agent-string
1293   "A function to create X-Mailer field string ."
1294   :type 'function
1295   :group 'wl-draft)
1296
1297 (defcustom wl-highlight-background-mode  (if (boundp 'hilit-background-mode)
1298                                              (or hilit-background-mode 'dark)
1299                                            'dark)
1300   "*Background mode of highlight (for Old Emacsen).  'dark or 'light."
1301   :type '(radio (const dark)
1302                 (const light))
1303   :group 'wl-highlight)
1304
1305 (defcustom wl-highlight-x-face-func nil
1306   "A function to display X-Face."
1307   :type 'function
1308   :group 'wl-highlight)
1309
1310 (defcustom wl-qmail-inject-program "/var/qmail/bin/qmail-inject"
1311   "Location of the qmail-inject program."
1312   :type '(string :tag "Program")
1313   :group 'wl-draft)
1314
1315 (defcustom wl-qmail-inject-args nil
1316   "Arguments passed to qmail-inject programs.
1317 This should be a list of strings, one string for each argument.
1318
1319 For e.g., if you wish to set the envelope sender address so that bounces
1320 go to the right place or to deal with listserv's usage of that address, you
1321 might set this variable to '(\"-f\" \"you@some.where\")."
1322   :type '(repeat (string :tag "Argument"))
1323   :group 'wl-draft)
1324
1325 (defcustom wl-rejected-letter-start
1326   "^[\t ]*-+[\t ]+\\(original\\|\\(\\(the \\)?unsent\\)\\) message\\( follows\\)?[\t ]+-+[\t ]*$"
1327   "Regexp specifying the beginning of the wrapper around a returned letter.
1328 This wrapper is generated by the mail system when rejecting a letter."
1329   :type 'regexp
1330   :group 'wl-draft)
1331
1332 (defcustom wl-ignored-forwarded-headers "\\(received\\|return-path\\|x-uidl\\)"
1333   "*All headers that match this regexp will be deleted when forwarding a message."
1334   :type 'regexp
1335   :group 'wl-draft)
1336
1337 (defcustom wl-ignored-resent-headers "\\(return-receipt\\|[bdf]cc\\)"
1338   "*All headers that match this regexp will be deleted when resending a message."
1339   :type 'regexp
1340   :group 'wl-draft)
1341
1342 (defcustom wl-refile-default-from-folder "+from"
1343   "*Folder name to refile by `wl-refile-guess-by-from'."
1344   :type '(string :tag "Folder")
1345   :group 'wl-pref)
1346
1347 (defcustom wl-summary-auto-refile-skip-marks
1348   (list wl-summary-new-mark
1349         wl-summary-unread-uncached-mark
1350         wl-summary-unread-cached-mark)
1351   "Persistent marks to skip auto-refiling."
1352   :type '(repeat (string :tag "Mark"))
1353   :group 'wl-summary)
1354
1355 (defcustom wl-summary-reserve-mark-list
1356   (list "o" "O" "D")
1357   "If a message is already marked as temporal marks in this list,
1358 the message is not marked by any mark command."
1359   :type '(repeat (string :tag "Temp-Mark"))
1360   :group 'wl-summary)
1361
1362 (defcustom wl-summary-skip-mark-list
1363   (list "D")
1364   "If a message is already marked as temporal marks in this list,
1365 the message is skipped at cursor move."
1366   :type '(repeat (string :tag "Temp-Mark"))
1367   :group 'wl-summary)
1368
1369 (defcustom wl-summary-incorporate-marks
1370   (list wl-summary-new-mark
1371         wl-summary-unread-uncached-mark)
1372   "Persistent marks to prefetch at `wl-summary-incorporate'."
1373   :type '(repeat (string :tag "Mark"))
1374   :group 'wl-summary)
1375
1376 (defcustom wl-refile-rule-alist nil
1377   "Refile rule alist.
1378 e.x.
1379 '(
1380   (\"From\"
1381    (\"teranisi@isl.ntt.co.jp\" . \"+teranisi\"))
1382   (\"x-ml-name\"
1383    (\"^Wanderlust\"    . \"+wl\")
1384    (\"^Elips\" . \"+elips\")))"
1385   :type '(repeat (list (string :tag "Field")
1386                        (repeat :inline t
1387                                (cons (regexp :tag "Value")
1388                                      (string :tag "Folder")))))
1389   :group 'wl-pref)
1390
1391 (defcustom wl-strict-diff-folders nil
1392   "List of regexps matching folders of which Wanderlust seriously counts unsync messages."
1393   :type '(choice (const :tag "Off" nil)
1394                  (repeat (regexp :tag "Folder Regexp")))
1395   :group 'wl-folder)
1396
1397 (defcustom wl-folder-use-server-diff t
1398   "Checked unread message number on IMAP4 server.
1399 Only IMAP4 folders have an effect."
1400   :type 'boolean
1401   :group 'wl-folder)
1402
1403 (defcustom wl-force-fetch-folders nil
1404   "Non-nil forces to fetch subfolders when user opened an 'access' folder."
1405   :type '(choice (const :tag "off" nil)
1406                  (const :menu-tag "on" t)
1407                  (repeat (regexp :tag "Folder Regexp")))
1408   :group 'wl-folder)
1409
1410 (defcustom wl-auto-check-folder-name nil
1411   "*The folder specified by this variable will be automatically checked
1412 at start time."
1413   :type '(choice (string :tag "Folder")
1414                  (repeat (string :tag "Folder"))
1415                  (const none))
1416   :group 'wl-folder)
1417
1418 (defcustom wl-auto-uncheck-folder-list '("\\$.*")
1419   "All folders that match this list won't be checked when group is
1420 automatically checked (or desktop is checked).
1421 This value is preceded by wl-auto-check-folder-list.
1422 Each elements are regexp of folder name."
1423   :type '(repeat (regexp :tag "Folder Regexp"))
1424   :group 'wl-folder)
1425
1426 (defcustom wl-auto-check-folder-list nil
1427   "All folders that match this list are checked when group is
1428 automatically checked (or desktop is checked).
1429 This value precedes wl-auto-uncheck-folder-list.
1430 Each elements are regexp of folder name."
1431   :type '(repeat (regexp :tag "Folder Regexp"))
1432   :group 'wl-folder)
1433
1434 (defcustom wl-show-plug-status-on-modeline t
1435   "If it is non-nil, show plugged status in modeline."
1436   :type 'boolean
1437   :group 'wl-highlight)
1438
1439 (defcustom wl-plug-state-indicator-on  " [ON] "
1440   "String used to show plugged status ON."
1441   :type 'string
1442   :group 'wl-highlight)
1443
1444 (defcustom wl-plug-state-indicator-off " [--] "
1445   "String used to show plugged status OFF."
1446   :type 'string
1447   :group 'wl-highlight)
1448
1449 (defcustom wl-biff-check-folder-list nil
1450   "All folders that match this list are automatically checked
1451 every intervals specified by wl-biff-check-interval."
1452   :type '(repeat (regexp :tag "Folder Regexp"))
1453   :group 'wl-highlight)
1454
1455 (defcustom wl-biff-check-interval 40
1456   "Number of seconds between updates of new mails in the mode line."
1457   :type 'integer
1458   :group 'wl-highlight)
1459
1460 (defcustom wl-biff-state-indicator-on (if (and (featurep 'xemacs)
1461                                                (not (featurep 'mule)))
1462                                           "[Mail]"
1463                                         (decode-coding-string
1464                                          ;; Youbin mark
1465                                          (read "\"[\e$B\\\")\e(B]\"")
1466                                          (if (boundp 'MULE)
1467                                              '*iso-2022-jp*
1468                                            'iso-2022-jp)))
1469   "String used to show biff status ON."
1470   :type 'string
1471   :group 'wl-highlight)
1472
1473 (defcustom wl-biff-state-indicator-off "[\e$B!>\e(B]"
1474   "String used to show biff status OFF."
1475   :type 'string
1476   :group 'wl-highlight)
1477
1478 (defcustom wl-mode-line-display-priority-list '(biff plug title)
1479   "Displaying order of items to be shown in modeline.  The first item will
1480 be placed in the leftmost.  The significant items are `biff' and `plug';
1481 otherwise, e.g. `title', corresponds to the things except for the biff
1482 staus nor the plugged status.  The default order is '(biff plug title)
1483 even if the value of this option is set to nil.  Here are some samples:
1484
1485 ;; Plugged status first:
1486 \(setq wl-mode-line-display-priority-list '(plug))
1487
1488 ;; Biff status, Title of Wanderlust, Plugged status:
1489 \(setq wl-mode-line-display-priority-list '(biff title plug))
1490
1491 "
1492   :type '(repeat (radio (const :format "%v " biff)
1493                         (const :format "%v " plug)
1494                         (sexp :tag "Other" :value title)))
1495   :group 'wl-highlight)
1496
1497 (defcustom wl-interactive-send t
1498   "*If non-nil, require your confirmation when sending draft message."
1499   :type 'boolean
1500   :group 'wl-pref)
1501
1502 (defcustom wl-interactive-exit t
1503   "*If non-nil, require your confirmation when exiting WL."
1504   :type 'boolean
1505   :group 'wl-pref)
1506
1507 (defcustom wl-summary-move-order 'unread
1508   "*The order of priority when move in summary mode.
1509 If this variable is `unread', precede \"U\", \"!\", \"N\" mark.
1510 If this variable is `new', precede \"N\" mark."
1511   :type '(radio (const new)
1512                 (const unread))
1513   :group 'wl-summary)
1514
1515 (defvar wl-summary-move-direction-downward t)
1516
1517 (defcustom wl-summary-move-direction-toggle t
1518   "*If non-nil, search direction for the next message will be determined
1519 depends on previous search direction.
1520 It uses wl-summary-move-direction-downward as a direction flag."
1521   :type 'boolean
1522   :group 'wl-summary)
1523
1524 (defcustom wl-auto-select-first nil
1525   "*If non-nil, display selected first message when enter summary."
1526   :type 'boolean
1527   :group 'wl-pref)
1528
1529 (defcustom wl-auto-select-next nil
1530   "*If non-nil, offer to go to the next folder from the end of the previous.
1531 If the value is the symbol `unread', go to the next folder
1532 that no unread message exists.  If the value is the symbol `skip-no-unread',
1533 skip the folder that no unread message exists.
1534
1535 See also variable `wl-summary-next-no-unread-command'."
1536   :type '(radio (const :tag "off" nil)
1537                 (const :tag "on" t)
1538                 (const unread)
1539                 (const skip-no-unread))
1540   :group 'wl-pref)
1541
1542 (defcustom wl-cache-prefetch-folder-type-list '(imap4 nntp)
1543   "*All folder types that match this list prefetch next message,
1544 and reserved buffer cache."
1545   :type '(set (const localdir)
1546               (const localnews)
1547               (const imap4)
1548               (const nntp)
1549               (const pop3)
1550               (const archive)
1551               (const internal))
1552   :group 'wl-pref)
1553
1554 (defcustom wl-cache-prefetch-folder-list nil
1555   "*All folders that match this list prefetch next message,
1556 and reserved buffer cache.
1557 e.x.
1558 '(\"^[-%]\")"
1559   :type '(repeat (regexp :tag "Folder Regexp"))
1560   :group 'wl-pref)
1561
1562 (defcustom wl-cache-prefetch-get-next-func 'wl-summary-default-get-next-msg
1563   "*A function to get message number when prefetch next message."
1564   :type 'function
1565   :group 'wl-pref)
1566
1567 ;; obsolete
1568 ;(defvar wl-no-cache-folder-list '("^\\$.*")
1569 ;  "All folders that match this list won't be cached when reading messages.
1570 ;Each elements are regexp of folder name.")
1571
1572 (defcustom wl-summary-always-sticky-folder-list nil
1573   "All folders that match this list has sticky summary.
1574 Each elements are regexp of folder name."
1575   :type '(radio (const :tag "none" nil)
1576                 (const :tag "all" t)
1577                 (repeat (regexp :tag "Folder Regexp")))
1578   :group 'wl-pref)
1579
1580 (defcustom wl-no-save-folder-list '("^/.*$")
1581   "All folders that match this list won't save its msgdb.
1582 Each elements are regexp of folder name."
1583   :type '(repeat (regexp :tag "Folder Regexp"))
1584   :group 'wl-pref)
1585
1586 (defcustom wl-save-folder-list nil
1587   "All folders that match this list save its msgdb.
1588 Each elements are regexp of folder name."
1589   :type '(repeat (regexp :tag "Folder Regexp"))
1590   :group 'wl-pref)
1591
1592 (defcustom wl-folder-mime-charset-alist
1593   '(("^-alt\\.chinese" . big5)
1594     ("^-relcom\\." . koi8-r)
1595     ("^-tw\\." . big5)
1596     ("^-han\\." . euc-kr))
1597   "Charset alist.  If no match, `wl-mime-charset' is used."
1598   :type '(repeat (cons (regexp :tag "Folder Regexp") (symbol :tag "Charset")))
1599   :group 'wl-summary
1600   :group 'wl-pref)
1601
1602 (defcustom wl-folder-weekday-name-lang-alist
1603   '(("^-alt\\.chinese" . "en")
1604     ("^-relcom\\." . "en")
1605     ("^-tw\\." . "en")
1606     ("^-han\\." . "en"))
1607   "Weekday name lang alist.
1608 If no match, `wl-summary-weekday-name-lang' is used.
1609 e.x.
1610 '((\"xemacs-beta$\" . \"en\")
1611   (\"^-fj\" . \"ja\"))"
1612   :type '(repeat (cons (regexp :tag "Folder Regexp")
1613                        (choice (const "ja")
1614                                (const "en")
1615                                (const "fr")
1616                                (const "de")
1617                                (string :tag "Other"))))
1618   :group 'wl-pref)
1619
1620 (defcustom wl-folder-thread-indent-set-alist
1621   '(("^-alt\\.chinese" . (2 "+" "+" "|" "-" " "))
1622     ("^-relcom\\." . (2 "+" "+" "|" "-" " "))
1623     ("^-tw\\." . (2 "+" "+" "|" "-" " "))
1624     ("^-han\\." . (2 "+" "+" "|" "-" " ")))
1625   "Thread indent set alist.
1626 If no match, following indent set is used.
1627 (wl-thread-indent-level
1628  wl-thread-have-younger-brother-str
1629  wl-thread-youngest-child-str
1630  wl-thread-vertical-str
1631  wl-thread-horizontal-str
1632  wl-thread-space-str)
1633 e.x.
1634 '((\"xemacs-beta$\" . (2 \"+\" \"+\" \"|\" \"-\" \" \")))"
1635   :type '(repeat (cons (regexp :tag "Folder Regexp")
1636                        (group (integer :tag "Indent")
1637                               (string :tag "Yonger Brother")
1638                               (string :tag "Yonger Child")
1639                               (string :tag "Vertical")
1640                               (string :tag "Horizontal")
1641                               (string :tag "Space"))))
1642   :group 'wl-pref)
1643
1644 (defcustom wl-folder-sync-range-alist
1645   (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^"
1646                       (regexp-quote wl-queue-folder) "$")
1647               "all"))
1648   "*Default sync range alist.  If no matches, `wl-default-sync-range' is used."
1649   :type '(repeat (cons (regexp :tag "Folder Regexp")
1650                        (choice (const "update")
1651                                (const "all")
1652                                (const "rescan")
1653                                (const "first:")
1654                                (const "last:")
1655                                (const "no-sync")
1656                                (const :tag "none" nil))))
1657   :group 'wl-pref)
1658
1659 (defcustom wl-default-sync-range  "update"
1660   "*Default sync range."
1661   :type '(choice (const "update")
1662                  (const "all")
1663                  (const "rescan")
1664                  (const "first:")
1665                  (const "last:")
1666                  (const "no-sync")
1667                  (const :tag "none" nil))
1668   :group 'wl-pref)
1669
1670 (defcustom wl-ask-range t
1671   "*If non-nil, ask for a range for summary synchronization.
1672 If nil, always use default."
1673   :type 'boolean
1674   :group 'wl-pref)
1675
1676 (defcustom wl-folder-move-cur-folder nil
1677   "*Non-nil, move to current folder on folder-mode when goto folder."
1678   :type 'boolean
1679   :group 'wl-folder)
1680
1681 (defcustom wl-folder-check-async (not wl-on-nemacs)
1682   "*Check the folder asynchronous."
1683   :type 'boolean
1684   :group 'wl-folder)
1685
1686 (defcustom wl-folder-notify-deleted nil
1687   "*Non-nil, display negative number on folder-mode when message is deleted
1688 in folder. If the value is 'sync, msgdb would be synchronized."
1689   :type '(choice (const :tag "off" nil)
1690                  (const :tag "on" t)
1691                  (const sync))
1692   :group 'wl-folder)
1693
1694 (defcustom wl-summary-exit-next-move t
1695   "*Non-nil, move to next-unsync or next-entity when exit summary."
1696   :type 'boolean
1697   :group 'wl-summary)
1698
1699 (defcustom wl-summary-next-no-unread-command
1700   '(wl-summary-read wl-summary-down wl-summary-up)
1701   "*Command list available when the value of `wl-auto-select-next' is 'unread
1702 or 'skip-no-unread."
1703   :type '(repeat function)
1704   :group 'wl-summary)
1705
1706 (defcustom wl-summary-search-via-nntp 'confirm
1707   "*Non-nil, search message via nntp after `wl-summary-jump-to-msg-by-message-id'.  If the value is 'confirm, confirm before search."
1708   :type 'boolean
1709   :group 'wl-summary)
1710
1711 (defcustom wl-summary-keep-cursor-command
1712   '(wl-summary-goto-folder wl-summary-goto-last-visited-folder)
1713   "*Command list to keep cursor position when folder is changed to
1714 already existing summary."
1715   :type '(repeat function)
1716   :group 'wl-summary)
1717
1718 (defcustom wl-summary-showto-folder-regexp nil
1719   "Regexp specifying the folder that shows the To (or Newsgroups) field as
1720 Sender information in summary mode."
1721   :type '(choice (const :tag "none" nil)
1722                  regexp)
1723   :group 'wl-summary)
1724
1725 (defcustom wl-folder-removed-mark "#<removed>"
1726   "Mark for removed folder."
1727   :type 'string
1728   :group 'wl-folder)
1729
1730 (defcustom wl-folder-unsubscribe-mark "#"
1731   "Mark for unsubscribe folder."
1732   :type 'string
1733   :group 'wl-folder)
1734
1735 (defcustom wl-delete-folder-alist '(("^-" . remove))
1736   "*Alist of folder and delete policy.
1737 Each element is (folder-regexp . policy).
1738
1739 The policy is one of the followings:
1740 'remove or
1741 'null     : remove message.
1742 string    : refile to the specified folder.
1743 'trash or
1744 otherwise : refile to the `wl-trash-folder'.
1745 ex.
1746 '((\"^%\" . \"%#mh/trash\")
1747   (\"^-\" . remove)
1748   (\"^\\\\+\" . trash))"
1749   :type '(repeat (cons (regexp :tag "Folder Regexp")
1750                        (choice :tag "Policy"
1751                                (const remove)
1752                                (const :tag "remove(null)" null)
1753                                (const trash)
1754                                (const :tag "trash(other)" trash)
1755                                (string :tag "Folder"))))
1756   :group 'wl-folder)
1757
1758 (defcustom wl-refile-policy-alist '(("^[-=']" . copy)
1759                                     (".*" . move))
1760   "*List of refile policy.  Each element is (FOLDER-REGEXP . POLICY).
1761 POLICY is copy or move."
1762   :type '(repeat (cons (regexp :tag "Folder Regexp")
1763                        (choice (const copy)
1764                                (const move))))
1765   :group 'wl-summary
1766   :group 'wl-pref)
1767
1768 (defcustom wl-folder-hierarchy-access-folders '("-" "-alt")
1769   "*Access group folders to make hierarchy structure."
1770   :type '(repeat (string :tag "Folder"))
1771   :group 'wl-folder)
1772
1773 (defcustom wl-folder-init-load-access-folders nil
1774   "*Access group folders to load folder list on `wl-folder-init'.
1775 If this variable is non-nil,
1776 `wl-folder-init-no-load-access-folders' will be ignored."
1777   :type '(repeat (regexp :tag "Folder Regexp"))
1778   :group 'wl-folder)
1779
1780 (defcustom wl-folder-init-no-load-access-folders nil
1781   "*Access group folders to not load folder list on `wl-folder-init'.
1782 If `wl-folder-init-load-access-folders' is non-nil,
1783 this variable will be ignored."
1784   :type '(repeat (regexp :tag "Folder Regexp"))
1785   :group 'wl-folder)
1786
1787 (defcustom wl-folder-access-subscribe-alist nil
1788   "*Subscribe folders to fetching folder entries.
1789 Each element is (group-regexp (subscribe folder-regexp ...)).
1790 If subscribe is non-nil, subscribe when match folder-regexp.
1791 If subscribe is nil, unsubscribe when match folder-regexp.
1792
1793 ex.
1794 '((\"^-fj$\"   . (t   \"^-fj\\\\.\\\\(editor\\\\|mail\\\\|net\\\\|news\\\\)\"))
1795   (\"^-comp$\" . (t   \"^-comp\\\\.unix\" \"^-comp\\\\.sys\"))
1796   (\"^-$\"     . (nil \"^-alt\" \"^-rec\")))"
1797   :type '(repeat (cons (regexp :tag "Folder Regexp")
1798                        (list (boolean :tag "Subscribed")
1799                              (repeat :inline t
1800                                      (regexp :tag "Folder Regexp")))))
1801   :group 'wl-folder)
1802
1803 ;;; For Folder Manager
1804
1805 (defcustom wl-interactive-save-folders t
1806   "*Non-nil require your confirmation when save folders."
1807   :type 'boolean
1808   :group 'wl-folder)
1809
1810 (defcustom wl-fldmgr-make-backup t
1811   "*Non-nil make backup file when save folders."
1812   :type 'boolean
1813   :group 'wl-folder)
1814
1815 (defcustom wl-fldmgr-folders-indent "\t"
1816   "*Indent string for folders file."
1817   :type 'string
1818   :group 'wl-folder)
1819
1820 (defcustom wl-fldmgr-sort-func 'wl-fldmgr-sort-standard
1821   "*A function to sort folder."
1822   :type 'function
1823   :group 'wl-folder)
1824
1825 (defcustom wl-fldmgr-sort-group-first t
1826   "*Non-nil Group folder is first when sort."
1827   :type 'function
1828   :group 'wl-folder)
1829
1830 (defcustom wl-fldmgr-add-complete-with-current-folder-list nil
1831   "*If non-nil, completion for adding folder refers current folder list."
1832   :type 'boolean
1833   :group 'wl-folder)
1834
1835 (defcustom wl-fldmgr-make-filter-default "Body"
1836   "*Default filter key while making filter on Folder."
1837   :type '(radio (const "From")
1838                 (const "Subject")
1839                 (const "To")
1840                 (const "Cc")
1841                 (const "Body")
1842                 (const "Since")
1843                 (const "Before")
1844                 (const "Last")
1845                 (const "First")
1846                 (string :tag "Other"))
1847   :group 'wl-folder)
1848
1849 ;;; For Expire and Archive
1850
1851 (defcustom wl-expire-alist nil
1852   "Alist to decide a policy for expire.
1853 Each element is (folder-regexp (number or date) policy).
1854
1855 The policy is one of the followings:
1856 'remove  : remove messsage.
1857 'trash   : refile `wl-trash-folder'.
1858 string   : refile string folder.
1859 function : call function.
1860
1861 ex.
1862 '((\"^\\\\+ml/wl$\"             (number 500 510) wl-expire-archive-number1 t)
1863   (\"^\\\\+ml/\"                (number 300 305) wl-expire-archive-number2)
1864   (\"^\\\\+outbox$\"            (number 300) \"$outbox;lha\")
1865   (\"^\\\\(\\\\+tmp\\\\|\\\\+trash\\\\)$\"      (date 7) remove)
1866   (\"^\\\\+misc$\"              (date 14) trash))"
1867   :type '(repeat (choice (list :tag "No-match"
1868                                (regexp :tag "Folder Regexp")
1869                                (const nil))
1870                          (list :tag "Match"
1871                                (regexp :tag "Folder Regexp")
1872                                (list (radio :value number
1873                                             (const number)
1874                                             (const date))
1875                                      (list :inline t
1876                                            integer
1877                                            (repeat :inline t integer)))
1878                                (choice :tag "Policy"
1879                                        :value remove
1880                                        (const remove)
1881                                        (const trash)
1882                                        (string :tag "folder")
1883                                        function)
1884                                (repeat :inline t
1885                                        :tag "Arg for function"
1886                                        sexp))))
1887   :group 'wl-expire)
1888
1889 (defcustom wl-archive-alist '((".*" wl-archive-number1))
1890   "Alist to decide a policy for archive.
1891 Each element is (folder-regexp policy(function)).
1892
1893 ex.
1894 '((\"\\\\+work$\" wl-archive-date)
1895   (\"\\\\+ml/\"   wl-archive-number1)
1896   (\".*\"       wl-archive-number2))"
1897   :type '(repeat (list (regexp :tag "Folder Regexp")
1898                        function
1899                        (repeat :inline t
1900                                (sexp :tag "Argument"))))
1901   :group 'wl-expire)
1902
1903 (defcustom wl-summary-expire-reserve-marks
1904   (list wl-summary-important-mark
1905         wl-summary-new-mark
1906         wl-summary-unread-mark
1907         wl-summary-unread-uncached-mark
1908         wl-summary-unread-cached-mark)
1909   "Permanent marks of reserved message when expire.
1910 Don't reserve temporary mark message.
1911
1912 ex.
1913 'all  : reserved all permanent marks.
1914 'none : not reserve permanent marks.
1915 list  : reserved specified permanent marks."
1916   :type '(repeat (string :tag "Mark"))
1917   :group 'wl-expire)
1918
1919 (defcustom wl-expire-number-with-reserve-marks nil
1920   "If non-nil, include reserve message when expire by number."
1921   :type 'boolean
1922   :group 'wl-expire)
1923
1924 (defcustom wl-expire-add-seen-list t
1925   "*If non-nil, add seen message list when refile message at expire."
1926   :type 'boolean
1927   :group 'wl-expire)
1928
1929 (defcustom wl-expire-use-log nil
1930   "*If non-nil, write a log when expired."
1931   :type 'boolean
1932   :group 'wl-expire)
1933
1934 (defcustom wl-expire-folder-update-msgdb t
1935   "*Non-nil update summary msgdb when expire on folder mode."
1936   :type 'boolean
1937   :group 'wl-expire)
1938
1939 ;; for wl-expire-archive-{number1|number2}
1940 (defcustom wl-expire-archive-files 100
1941   "*The number of one archive folder."
1942   :type 'integer
1943   :group 'wl-expire)
1944
1945 ;; for wl-expire-archive-{number1|number2|date}
1946 (defcustom wl-expire-archive-get-folder-func
1947   'wl-expire-archive-get-folder
1948   "*A function to get archive folder name."
1949   :type 'function
1950   :group 'wl-expire)
1951
1952 (defcustom wl-expire-delete-oldmsg-confirm t
1953   "*If non-nil, require your confirmation when delete old message."
1954   :type 'boolean
1955   :group 'wl-expire)
1956
1957 ;; for wl-expire-archive-get-folder
1958 (defcustom wl-expire-archive-folder-type 'zip
1959   "*Archiver type of archive folder."
1960   :type '(radio (const zip)
1961                 (const lha)
1962                 (const zoo)
1963                 (const rar)
1964                 (const tar)
1965                 (const tgz)
1966                 (symbol :tag "Other"))
1967   :group 'wl-expire)
1968
1969 (defcustom wl-expire-archive-folder-name-fmt "%s-%%05d;%s" ;; $folder-00100;zip
1970   "*A format string for archive folder name."
1971   :type 'string
1972   :group 'wl-expire)
1973
1974 (defcustom wl-expire-archive-folder-num-regexp "-\\([0-9]+\\);"
1975   "*A regexp string for archive folder name."
1976   :type 'string
1977   :group 'wl-expire)
1978
1979 (defcustom wl-expire-archive-date-folder-name-fmt "%s-%%04d%%02d;%s"
1980                                                 ;; $folder-199812;zip
1981   "*A format string for archive date folder name."
1982   :type 'string
1983   :group 'wl-expire)
1984
1985 (defcustom wl-expire-archive-date-folder-num-regexp "-\\([0-9]+\\);"
1986   "*A regexp string for archive date folder name."
1987   :type 'string
1988   :group 'wl-expire)
1989
1990 (defcustom wl-expire-archive-folder-prefix nil
1991   "*Prefix for archive folder."
1992   :type '(radio (const :tag "nothing" nil)
1993                 (const :tag "full" t)
1994                 (const short))
1995   :group 'wl-expire)
1996
1997 ;;;; Highlights.
1998
1999 ;; highilght about summary
2000 (defcustom wl-highlight-max-summary-lines 10000
2001   "*If the summary is larger than this lines, don't highlight it."
2002   :type 'integer
2003   :group 'wl-highlight)
2004
2005 ;; highilght about draft and message
2006 (defcustom wl-highlight-body-too t
2007   "*In addition to header, highlight the body too.  if non nil."
2008   :type 'boolean
2009   :group 'wl-highlight)
2010
2011 (defcustom wl-highlight-message-header-alist
2012   '(("Subject[ \t]*:" . wl-highlight-message-important-header-contents)
2013     ("From[ \t]*:\\|To[ \t]*:" . wl-highlight-message-important-header-contents2)
2014     ("X-[^ \t]*:\\|User-Agent[ \t]*:" . wl-highlight-message-unimportant-header-contents))
2015   ""
2016   :type '(repeat (cons regexp face))
2017   :group 'wl-highlight)
2018
2019 (defcustom wl-highlight-message-header-button-alist
2020   (` (("^\\(References\\|Message-Id\\|In-Reply-To\\):" "<[^>]+>"
2021        0 wl-message-button-refer-article  0)
2022       ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)"
2023        1 wl-message-button-refer-article 3)))
2024   "Alist of headers and regexps to match buttons in message headers."
2025   :type '(repeat
2026           (list (regexp :tag "Header")
2027                 regexp
2028                 (integer :tag "Button")
2029                 (function :tag "Callback")
2030                 (repeat :tag "Data"
2031                         :inline t
2032                         (integer :tag "Regexp group"))))
2033   :group 'wl-highlight)
2034
2035 (defcustom wl-highlight-citation-prefix-regexp
2036   "^[>|:} ]*[>|:}]\\([^ \n>]*>\\)?\\|^[^ <\n>]*>"
2037   "All lines that match this regexp will be highlighted with
2038  `wl-highlight-message-cited-text-*' face."
2039   :type 'regexp
2040   :group 'wl-highlight)
2041
2042 (defcustom wl-highlight-highlight-citation-too nil
2043   "*Whether the whole citation line should go in the
2044 `wl-highlight-citation-face' face.
2045 If nil, the text matched by `wl-highlight-citation-prefix-regexp' is in the
2046 default face, and the remainder of the line is in the
2047 wl-highlight-message-cited-text face."
2048   :type 'boolean
2049   :group 'wl-highlight)
2050
2051 (defcustom wl-highlight-force-citation-header-regexp
2052   "^>>>.*$\\|^[ \t]*<[^>]*>[ \t]*$"
2053   "*The pattern to match the prolog of a cited block.
2054 Text in the body of a message which matches this will be displayed in
2055 the `wl-highlight-message-headers' face."
2056   :type 'regexp
2057   :group 'wl-highlight)
2058
2059 (defcustom wl-highlight-citation-header-regexp
2060   (concat "In article.*$\\|In message.*$\\|In the message.*$\\|"
2061           "^At[^\n]+\n[^\n]+wrote:\n\\|"
2062           "^.*\\(writes\\|wrote\\|said\\):\n")
2063   "*The pattern to match the prolog of a cited block.
2064 Text in the body of a message which matches this will be displayed in
2065 the `wl-highlight-message-headers' face."
2066   :type 'regexp
2067   :group 'wl-highlight)
2068
2069 (defcustom wl-highlight-max-header-size nil
2070   "*If the message header is larger than this many chars, don't highlight it.
2071 If this is nil, all headers will be highlighted."
2072   :type 'integer
2073   :group 'wl-highlight)
2074
2075 (defcustom wl-highlight-max-message-size 10000
2076   "*If the message body is larger than this many chars, don't highlight it.
2077 This is to prevent us from wasting time trying to fontify things like
2078 uuencoded files and large digests.  If this is nil, all messages will
2079 be highlighted."
2080   :type 'integer
2081   :group 'wl-highlight)
2082
2083 ;; highilght about signature (of draft and message)
2084 (defcustom wl-highlight-signature-separator
2085   '("\n--+\n" "\n\n--+.*\n*\\'")
2086   "List of regexps matching signature separator.
2087 It will be verified from head to tail looking for a separator.
2088 Verification will be done from the end of the buffer.
2089 No need to specify \"^-- $\" in this list,
2090 because it is verified by default.
2091 This variable can also be a regex."
2092   :type '(repeat regexp)
2093   :group 'wl-highlight)
2094
2095 (defcustom wl-max-signature-size 400
2096   "*If the signature is larger than this chars, don't treat it as a signature."
2097   :type 'integer
2098   :group 'wl-highlight)
2099
2100 ;; highilght about mouse
2101 (defcustom wl-use-highlight-mouse-line (and window-system
2102                                             (>= emacs-major-version 19))
2103   "*Highlight mouse line, if non nil."
2104   :type 'boolean
2105   :group 'wl-highlight)
2106
2107 ;; highilght about folder
2108 (defcustom wl-highlight-folder-with-icon
2109   (or (and (featurep 'xemacs)
2110            (featurep 'xpm))
2111       wl-on-emacs21)
2112   "*Highlight folder with icon(XEmacs or Emacs 21)."
2113   :type 'boolean
2114   :group 'wl-highlight)
2115 (defcustom wl-highlight-folder-by-numbers t
2116   "Highlight folder lines by numbers.
2117 If it is a number, only numbers will be highlighted."
2118   :type '(choice (const :tag "whole line" t)
2119                  (const :tag "only numbers" 1)
2120                  (const :tag "don't highlight" nil))
2121   :group 'wl-highlight)
2122
2123 (defcustom wl-highlight-signature-search-func 'wl-highlight-signature-search
2124   "Function to search signature area in the message body."
2125   :type 'function
2126   :group 'wl-highlight)
2127
2128 (defcustom wl-use-dnd (and wl-on-xemacs
2129                            (featurep 'dragdrop))
2130   "If Non-nil, support dragdrop feature in XEmacs."
2131   :type 'boolean
2132   :group 'wl-pref)
2133
2134 (defcustom wl-reset-plugged-alist t
2135   "*If non-nil, reset `elmo-plugged-alist' when startup."
2136   :type 'boolean
2137   :group 'wl-pref)
2138
2139 (defcustom wl-demo-display-logo (if (or (featurep 'xemacs)
2140                                         (module-installed-p 'image)
2141                                         (module-installed-p 'bitmap))
2142                                     t)
2143   "If it is T, show graphic logo in the startup screen.  You can set it to
2144 a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
2145   :type '(radio (const :tag "Off" nil)
2146                 (const :tag "On (any format)" t)
2147                 (const xpm)
2148                 (const xbm)
2149                 (const :tag "bitmap (using BITMAP-MULE)" bitmap))
2150   :group 'wl-pref)
2151
2152 ;;; Internal variables
2153 (defvar wl-init nil)
2154
2155 ;; For disconnected operations.
2156 (defvar wl-plugged-hook nil)
2157 (defvar wl-unplugged-hook nil)
2158 (defvar wl-plugged t)
2159
2160 ;; Internal variables used to modeline identifiers.
2161 (defvar wl-modeline-plug-status nil)
2162 (defvar wl-modeline-plug-state-on wl-plug-state-indicator-on)
2163 (defvar wl-modeline-plug-state-off wl-plug-state-indicator-off)
2164 (defvar wl-modeline-biff-status nil)
2165 (defvar wl-modeline-biff-state-on wl-biff-state-indicator-on)
2166 (defvar wl-modeline-biff-state-off wl-biff-state-indicator-off)
2167
2168 ;; Advanced thread view.
2169 (defvar wl-thread-indent-level 1
2170   "*Indent level for thread.")
2171 (defvar wl-thread-have-younger-brother-str "\e$B(2\e(B"
2172   "*A string for thread branch line.  It should contain one character.")
2173 (defvar wl-thread-youngest-child-str       "\e$B(1\e(B"
2174   "*A string for thread branch line.  It should contain one character.")
2175 (defvar wl-thread-vertical-str             "\e$B(-\e(B"
2176   "*A string for thread branch line.  It should contain one character.")
2177 (defvar wl-thread-horizontal-str           "\e$B(,\e(B"
2178   "*A string for thread branch line.  It should contain one character.")
2179 (defvar wl-thread-space-str                "\e$B!!\e(B"
2180   "*A string for thread branch line.  It should contain one character.")
2181
2182 (defvar wl-highlight-thread-indent-string-regexp "[^[<]*"
2183   "* A regexp string for thread indent...for highlight.")
2184
2185 ;; folder icons. filename relative to wl-icon-dir
2186 (defvar wl-opened-group-folder-icon "opened.xpm"
2187   "*Icon file for opened group folder.")
2188 (defvar wl-closed-group-folder-icon "closed.xpm"
2189   "*Icon file for closed group folder.")
2190 (defvar wl-nntp-folder-icon "news.xpm"
2191   "*Icon file for nntp folder.")
2192 (defvar wl-imap-folder-icon "imap.xpm"
2193   "*Icon file for imap folder.")
2194 (defvar wl-pop-folder-icon  "pop.xpm"
2195   "*Icon file for pop folder.")
2196 (defvar wl-localdir-folder-icon "local.xpm"
2197   "*Icon file for localdir folder.")
2198 (defvar wl-localnews-folder-icon "localnews.xpm"
2199   "*Icon file for localnews folder.")
2200 (defvar wl-internal-folder-icon "internal.xpm"
2201   "*Icon file for internal folder.")
2202 (defvar wl-multi-folder-icon "multi.xpm"
2203   "*Icon file for multi folder.")
2204 (defvar wl-filter-folder-icon "filter.xpm"
2205   "*Icon file for filter folder.")
2206 (defvar wl-archive-folder-icon "archive.xpm"
2207   "*Icon file for archive folder.")
2208 (defvar wl-pipe-folder-icon "pipe.xpm"
2209   "*Icon file for pipe folder.")
2210 (defvar wl-maildir-folder-icon "maildir.xpm"
2211   "*Icon file for maildir folder.")
2212 (defvar wl-empty-trash-folder-icon "trash-e.xpm"
2213   "*Icon file for emptied trash folder.")
2214 (defvar wl-trash-folder-icon "trash.xpm"
2215   "*Icon file for trash folder.")
2216 (defvar wl-draft-folder-icon "draft.xpm"
2217   "*Icon file for draft folder.")
2218 (defvar wl-queue-folder-icon "queue.xpm"
2219   "*Icon file for queue folder.")
2220 (defvar wl-plugged-icon "plugged.xpm"
2221   "*Icon file for plugged state.")
2222 (defvar wl-unplugged-icon "unplugged.xpm"
2223   "*Icon file for unplugged state.")
2224 (defvar wl-biff-mail-icon "letter.xpm"
2225   "*Icon file for mail existed state.")
2226 (defvar wl-biff-nomail-icon "no-letter.xpm"
2227   "*Icon file for no mail existed state.")
2228 (defvar wl-prog-uudecode "uudecode"
2229   "*uudecode program name.")
2230 (defvar wl-prog-uudecode-arg nil
2231   "*Arguments for uudecode program.")
2232 (defvar wl-prog-uudecode-no-stdout-option t
2233   "*If non-nil, uudecode program don't have option for output to stdout.")
2234
2235 ;; Obsolete variables. for compatibility.
2236 (defvar wl-address-filename wl-address-file)
2237 (make-obsolete-variable 'wl-address-filename 'wl-address-file)
2238 (defvar wl-score-default-file-name wl-score-default-file)
2239 (make-obsolete-variable 'wl-score-default-file-name 'wl-score-default-file)
2240 (defvar wl-draft-prepared-config-alist nil)
2241 (make-obsolete-variable 'wl-draft-prepared-config-alist 'wl-draft-config-alist)
2242 (defvar wl-score-files-directory wl-score-files-dir)
2243 (make-obsolete-variable 'wl-score-files-directory 'wl-score-files-dir)
2244 (defvar wl-summary-temp-above wl-summary-target-above)
2245 (make-obsolete-variable 'wl-summary-temp-above 'wl-summary-target-above)
2246
2247 ;; plug
2248 (defvar wl-plugged-plug-on "ON")
2249 (defvar wl-plugged-plug-off "--")
2250 (defvar wl-plugged-auto-off "**")
2251 (defvar wl-plugged-server-indent 2)
2252 (defvar wl-plugged-port-indent 4)
2253 (defvar wl-plugged-queue-status-column 25)
2254
2255 (require 'product)
2256 (product-provide (provide 'wl-vars) (require 'wl-version))
2257
2258 ;;; wl-vars.el ends here