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