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