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