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