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