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