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