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