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