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