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