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