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