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