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