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