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