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