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