* wl-vars.el (wl-summary-line-format-spec-alist): New variable.
[elisp/wanderlust.git] / wl / wl-vars.el
index 34a99bf..a0b9089 100644 (file)
   "*Use SEMI or not.")
 
 (defcustom wl-from (and user-mail-address
-                       (concat (and user-full-name
+                       (concat (and (user-full-name)
                                     (concat (elmo-address-quote-specials
-                                             user-full-name)
+                                             (user-full-name))
                                             " "))
                                "<" user-mail-address ">"))
   "*From string used in draft."
@@ -174,6 +174,61 @@ If you don't have multiple e-mail addresses, you don't have to set this."
                 string)
   :group 'wl)
 
+(defvar wl-summary-line-format-spec-alist
+  '((?Y (wl-summary-line-year))
+    (?M (wl-summary-line-month))
+    (?D (wl-summary-line-day))
+    (?W (wl-summary-line-day-of-week))
+    (?h (wl-summary-line-hour))
+    (?m (wl-summary-line-minute))
+    (?\[ (wl-summary-line-open-bracket))
+    (?\] (wl-summary-line-close-bracket))
+    (?t (wl-summary-line-thread-indent))
+    (?s (wl-summary-line-subject))
+    (?S (wl-summary-line-size))
+    (?c (wl-summary-line-children-number))
+    (?f (wl-summary-line-from))
+    (?F (wl-summary-line-children-and-from)))
+  "An alist of format specifications that can appear in summary lines.
+Each element is a list of following:
+\(SPEC STRING-EXP\)
+SPEC is a character for format specification.
+STRING is an expression to get string to insert.")
+
+(defcustom wl-summary-line-format "%M/%D(%W)%h:%m %t%[%17F %] %s"
+  "*A default format string for summary line of Wanderlust.
+It may include any of the following format specifications
+which are replaced by the given information:
+
+%Y The year of the date field of the message (zero padded).
+%M The month of the date field of the message (zero padded).
+%D The day of the date field of the message (zero padded).
+%W The weekday name of the date field of the message (zero padded).
+%h The hour of the date field of the message (zero padded).
+%m The minute of the date field of the message (zero padded).
+%[ An open bracket.  If the message thread is linked,
+   it is replaced with '<'.
+%] A close bracket.  If the message thread is linked,
+   it is replaced with '>'.
+%c The children number of the closed message thread.
+%f The from: field string of the message.
+%F The children number of the closed message thread and 
+   the from: field string of the message are concatenated.
+%s The subject: field string of the message.
+%S the size of the message (if available)."
+  :group 'wl-summary
+  :type 'string)
+
+(defcustom wl-folder-summary-line-format-alist nil
+  "An alist of folder name and a summary line format.
+If no match, `wl-summary-line-format' is used.
+e.x.
+      '((\"^%\" . \"%M/%D(%W)%h:%m %t%[%14F %](%S) %s\")
+       (\"^@2ch\" . \"%M%/%D/%h:%m %t[%9F ]%s\")))"
+  :type '(repeat (cons (regexp :tag "Folder Regexp")
+                      (string :tag "line format")))
+  :group 'wl-summary)
+
 (defcustom wl-summary-from-function 'wl-summary-default-from
   "*A function for displaying sender (From: field) information."
   :type 'function
@@ -265,6 +320,12 @@ If nil, `wl-from' is used."
   :group 'wl
   :group 'wl-setting)
 
+(defcustom wl-draft-additional-header-alist nil
+  "*Additional headers in the draft."
+  :type '(repeat (cons (symbol :tag "Field Name")
+                      (choice (string :tag "String")
+                              (function :tag "Function")))))
+
 (defcustom wl-draft-add-in-reply-to t
   "*If non-nil, message-id of the cited message is inserted to the
 in-reply-to field of the current draft."
@@ -277,6 +338,17 @@ references field of the current draft."
   :type 'boolean
   :group 'wl)
 
+(defcustom wl-draft-cite-function 'wl-default-draft-cite
+  "*A function for citation."
+  :type 'function
+  :group 'wl-draft)
+
+(defcustom wl-default-draft-cite-decorate-author t
+  "*If non-nil, the author of cited message is arranged by
+`wl-summary-from-func-internal' in `wl-default-draft-cite'."
+  :type 'boolean
+  :group 'wl-draft)
+
 (defcustom wl-smtp-connection-type nil
   "*SMTP connection type.
 If nil, default smtp connection type is used."
@@ -402,11 +474,6 @@ when `wl-prefetch-confirm' is non-nil."
   :group 'wl-pref
   :group 'wl-setting)
 
-(defcustom wl-cache-prefetch-threshold 30000
-  "*Quit forward cache prefetching if message size is larger than this value."
-  :type 'integer
-  :group 'wl-pref)
-
 (defcustom wl-thread-insert-opened nil
   "*Non-nil forces to insert thread as opened in updating."
   :type 'boolean
@@ -761,8 +828,7 @@ Default is for 'followup-to-me'."
   :type '(string :tag "Mark")
   :group 'wl-summary-marks)
 
-(defcustom wl-summary-no-mime-folder-list
-  (list (concat "^" (regexp-quote wl-draft-folder) "$"))
+(defcustom wl-summary-no-mime-folder-list nil
   "*All folders that match this list don't analysis mime."
   :type '(repeat string)
   :group 'wl-summary)
@@ -922,7 +988,7 @@ This can either be a regular expression or list of regular expressions."
   :group 'wl-score)
 
 (defcustom wl-draft-fields
-  '("To:" "Cc:" "Bcc:" "FCC:" "Distribution:" "Organization:"
+  '("To:" "Cc:" "Bcc:" "Fcc:" "Distribution:" "Organization:"
     "Newsgroups:" "Followup-To:" "Mail-Followup-To:" "From:" "Reply-To:")
   "Fields used in draft mode."
   :type '(repeat (string :tag "Field"))
@@ -1390,12 +1456,6 @@ with wl-highlight-folder-many-face."
                (string :tag "Other"))
   :group 'wl-summary)
 
-(defcustom wl-summary-from-width 17
-  "*From width in summary."
-  :type 'integer
-  :group 'wl-summary
-  :group 'wl-pref)
-
 (defcustom wl-summary-subject-length-limit nil
   "*Set subject width in summary when wl-summary-width is nil.
 Nil means unlimited"
@@ -1411,7 +1471,7 @@ Nil means unlimited"
   :group 'wl-pref)
 
 (defcustom wl-generate-mailer-string-function 'wl-generate-user-agent-string
-  "A function to create X-Mailer field string ."
+  "A function for creating User-Agent field string."
   :type 'function
   :group 'wl-draft)
 
@@ -1655,6 +1715,12 @@ It uses wl-summary-move-direction-downward as a direction flag."
   :group 'wl-pref
   :group 'wl-setting)
 
+(defcustom wl-auto-prefetch-first nil
+  "*If non-nil, prefetch selected first message when enter summary."
+  :type 'boolean
+  :group 'wl-pref
+  :group 'wl-setting)
+
 (defcustom wl-auto-select-next nil
   "*If non-nil, offer to go to the next folder from the end of the previous.
 If the value is the symbol `unread', go to the next folder
@@ -1705,6 +1771,11 @@ e.x.
   :type 'number
   :group 'wl-pref)
 
+(defcustom wl-message-buffer-prefetch-threshold 30000
+  "*Quit forward cache prefetching if message size is larger than this value."
+  :type 'integer
+  :group 'wl-pref)
+
 (defcustom wl-summary-always-sticky-folder-list nil
   "All folders that match this list has sticky summary.
 Each elements are regexp of folder name."
@@ -1730,7 +1801,8 @@ Each elements are regexp of folder name."
     ("^-relcom\\." . koi8-r)
     ("^-tw\\." . big5)
     ("^-han\\." . euc-kr)
-    ("@sponichi" . shift_jis))
+    ("@sponichi" . shift_jis)
+    ("@2ch" . shift_jis))
   "Charset alist.  If no match, `wl-mime-charset' is used."
   :type '(repeat (cons (regexp :tag "Folder Regexp") (symbol :tag "Charset")))
   :group 'wl-summary
@@ -1915,8 +1987,8 @@ POLICY is copy or move."
   :group 'wl-summary
   :group 'wl-pref)
 
-(defcustom wl-folder-hierarchy-access-folders '("-" "-alt")
-  "*Access group folders to make hierarchy structure."
+(defcustom wl-folder-hierarchy-access-folders '("^-$" "^-alt$")
+  "*Access group REGEXPs to make hierarchy structure."
   :type '(repeat (string :tag "Folder"))
   :group 'wl-folder)
 
@@ -2295,7 +2367,11 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
 ;; For disconnected operations.
 (defvar wl-plugged-hook nil)
 (defvar wl-unplugged-hook nil)
-(defvar wl-plugged t)
+(defcustom wl-plugged t
+  "*Plugged state at the startup.  Nil means off-line."
+  :type 'boolean
+  :group 'wl
+  :group 'wl-setting)
 
 ;; Internal variables used to modeline identifiers.
 (defvar wl-modeline-plug-status nil)
@@ -2397,8 +2473,6 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
                               'wl-temporary-file-directory)
 
 ;; 2001-12-07
-(elmo-define-obsolete-variable 'wl-from-width
-                              'wl-summary-from-width)
 (elmo-define-obsolete-variable 'wl-subject-length-limit
                               'wl-summary-subject-length-limit)