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