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