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