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