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