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