* wl-highlight.el (wl-highlight-message): Ignore white spaces
[elisp/wanderlust.git] / wl / wl-vars.el
index 0ddc1d7..8d19ee7 100644 (file)
 
 (defvar wl-cs-cache wl-cs-local)
 
-(defvar wl-use-semi (module-installed-p 'mime-view) ; If nil, use tm.
-  "*Use SEMI or not.")
-
 (defcustom wl-from (and user-mail-address
                        (concat (and (user-full-name)
                                     (concat (elmo-address-quote-specials
@@ -340,49 +337,49 @@ If nil, never search search parent by subject."
      wl-summary-register-target-mark
      nil
      wl-highlight-summary-temp-face
-     "put target mark.")
+     "Put target mark.")
     ("d"
      dispose
      nil
      wl-summary-register-temp-mark
      wl-summary-exec-action-dispose
      wl-highlight-summary-disposed-face
-     "dispose messages according to `wl-dispose-folder-alist'.")
+     "Dispose messages according to `wl-dispose-folder-alist'.")
     ("D"
      delete
      nil
      wl-summary-register-temp-mark
      wl-summary-exec-action-delete
      wl-highlight-summary-deleted-face
-     "delete messages immediately.")
+     "Delete messages immediately.")
     ("o"
      refile
      wl-summary-get-refile-destination
      wl-summary-set-action-refile
      wl-summary-exec-action-refile
      wl-highlight-summary-refiled-face
-     "refile messages to the other folder.")
+     "Refile messages to the other folder.")
     ("O"
      copy
      wl-summary-get-copy-destination
      wl-summary-register-temp-mark
      wl-summary-exec-action-copy
      wl-highlight-summary-copied-face
-     "copy messages to the other folder.")
+     "Copy messages to the other folder.")
     ("i"
      prefetch
      nil
      wl-summary-register-temp-mark
      wl-summary-exec-action-prefetch
      wl-highlight-summary-prefetch-face
-     "prefetch messages.")
+     "Prefetch messages.")
     ("~"
      resend
      wl-summary-get-resend-address
      wl-summary-register-temp-mark
      wl-summary-exec-action-resend
      wl-highlight-summary-resend-face
-     ))
+     "Resend messages."))
   "A variable to define Mark & Action.
 Each element of the list should be a list of
 \(MARK
@@ -390,7 +387,8 @@ Each element of the list should be a list of
   ARGUMENT-FUNCTION
   SET-MARK-FUNCTION
   EXEC-FUNCTION
-  FACE)
+  FACE
+  DOC-STRING)
 
 MARK is a temporal mark string to define.
 SYMBOL is an action name to define.
@@ -412,7 +410,8 @@ FACE is a face for highlighting."
                 (symbol :tag "Set mark function")
                 (symbol :tag "Unset mark function")
                 (symbol :tag "Exec function")
-                (symbol :tag "Face symbol"))
+                (symbol :tag "Face symbol")
+                (string :tag "Document string"))
   :group 'wl-summary)
 
 ;; Important folders
@@ -435,7 +434,7 @@ FACE is a face for highlighting."
   :group 'wl)
 
 (defcustom wl-default-spec "%"
-  "*Default spec"
+  "*Default prefix for folder name initially added in minibuffer"
   :type 'string
   :group 'wl)
 
@@ -482,6 +481,23 @@ You had better set this variable if you set 'wl-insert-mail-followup-to' as t."
   :type 'boolean
   :group 'wl-pref)
 
+(defcustom wl-demo-icon-name-alist
+  '(((string-match "^... Dec \\([ 01][0-9]\\|2[0-5]\\)" (current-time-string))
+     .
+     (concat "wl-" (wl-version-status) "-xmas-logo"))
+    (t
+     .
+     (concat "wl-" (wl-version-status) "-logo")))
+  "An alist to determine the basename of the logo file."
+  :type '(repeat (cons (symbol :tag "condition")
+                      (symbol :tag "file name")))
+  :group 'wl-pref)
+
+(defcustom wl-demo-image-filter-alist nil
+  "An alist of image type and filter function."
+  :type '(repeat (cons symbol function))
+  :group 'wl-pref)
+
 (defcustom wl-envelope-from nil
   "*Envelope From used in SMTP.
 If nil, `wl-from' is used."
@@ -524,6 +540,7 @@ references field of the current draft."
 If nil, default smtp connection type is used."
   :type '(choice (const :tag "default" nil)
                 (const :tag "Use STARTTLS" starttls)
+                (const :tag "SMTP over SSL" ssl)
                 symbol)
   :group 'wl)
 
@@ -867,7 +884,7 @@ cdr of each cons cell is used for draft message."
   :group 'wl-draft)
 
 (defcustom wl-draft-always-delete-myself nil
-  "*Always delete myself from reciepient if non-nil."
+  "*Always delete myself from recipient if non-nil."
   :type 'boolean
   :group 'wl-draft)
 
@@ -955,6 +972,71 @@ cdr of each cons cell is used for draft message."
   :type 'boolean
   :group 'wl-folder)
 
+(defcustom wl-summary-persistent-mark-priority-list '(flag
+                                                     new
+                                                     answered
+                                                     unread)
+  "List of flags reflected with the priority to persistent marks and faces."
+  :type '(repeat (radio (const :format "%v " new)
+                       (const :format "%v " flag)
+                       (const :format "%v " answered)
+                       (const :format "%v " unread)))
+  :group 'wl-summary)
+
+(defcustom wl-summary-flag-alist
+  '((important "orange"))
+  "An alist to define the flags for the summary mode.
+Each element is a form like:
+\(SYMBOL-OF-FLAG COLOR\)
+Example:
+\((important \"orange\"\)
+ \(todo \"red\"\)
+ \(business \"green\"\)
+ \(private \"blue\"\)\)"
+  :type '(repeat (list (symbol :tag "flag")
+                      (string :tag "color")))
+  :group 'wl-summary)
+
+(defcustom wl-summary-new-uncached-mark "N"
+  "Mark for new and uncached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-new-cached-mark "?"
+  "Mark for new but already cached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-unread-uncached-mark "U"
+  "Mark for unread and uncached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-unread-cached-mark "!"
+  "Mark for unread but already cached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-read-uncached-mark "u"
+  "Mark for read but uncached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-answered-cached-mark "&"
+  "Mark for answered and cached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-answered-uncached-mark "A"
+  "Mark for answered but cached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-flag-mark "$"
+  "Mark for the messages which have tags."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
 (defcustom wl-summary-score-over-mark "+"
   "Score mark used for messages with high scores."
   :type '(string :tag "Mark")
@@ -1015,7 +1097,7 @@ This variable is local to the summary buffers."
   :group 'wl-score)
 
 (defcustom wl-summary-score-marks
-  (list elmo-msgdb-new-mark)
+  (list wl-summary-new-uncached-mark wl-summary-new-cached-mark)
   "Persistent marks to scoring."
   :type '(repeat (string :tag "Mark"))
   :group 'wl-score)
@@ -1140,7 +1222,8 @@ This can either be a regular expression or list of regular expressions."
 (defcustom wl-draft-mime-bcc-body nil
   "Body string for MIME-encapsulated Bcc.
 If nil, a string `This is a blind carbon copy.' is used."
-  :type '(string :tag "Body")
+  :type '(choice (const :tag "default" nil)
+                (string :tag "Body"))
   :group 'wl-draft)
 
 (defcustom wl-draft-disable-bcc-for-mime-bcc t
@@ -1195,7 +1278,10 @@ See also variable `wl-draft-parent-folder'."
   :group 'wl-draft)
 
 (defcustom wl-template-alist nil
-  "Alist of template."
+  "Alist of template.
+First element of each list is a string specifies the name of the template.
+Remaining elements indicate actions. The format of actions is same as that
+of `wl-draft-config-alist'."
   :type '(repeat (list (string :tag "Name")
                       (repeat
                        :inline t
@@ -1321,7 +1407,8 @@ You can also set it to a list of setting.
 
 (defcustom wl-draft-sendlog-max-size 20000
   "*Max file size of sendlog."
-  :type 'integer
+  :type '(choice (const :tag "Unlimited" nil)
+                integer)
   :group 'wl-draft)
 
 (defcustom wl-summary-default-number-column 5
@@ -1365,6 +1452,11 @@ Available if only `wl-summary-lazy-highlight' is nil."
   :group 'wl-summary
   :group 'wl-highlight)
 
+(defcustom wl-summary-lazy-update-mark (boundp 'window-scroll-functions)
+  "Non-nil forces lazy update mark using `window-scroll-functions'."
+  :type 'boolean
+  :group 'wl-summary)
+
 (defcustom wl-summary-cache-use t
   "Non-nil forces wl-summary to use cache file."
   :type 'boolean
@@ -1474,10 +1566,31 @@ which appear just before @."
   :type 'boolean
   :group 'wl-pref)
 
+(defcustom wl-message-use-header-narrowing t
+  "Use header narrowing when non-nil."
+  :type 'boolean
+  :group 'wl-pref)
+
+(defcustom wl-message-header-narrowing-fields '("to" "cc")
+  "A list of field name to enable header narrowing."
+  :type '(repeat string)
+  :group 'wl-pref)
+
+(defcustom wl-message-header-narrowing-lines 4
+  "Line number to enable the header narrowing."
+  :type 'integer
+  :group 'wl-pref)
+
+(defcustom wl-message-header-narrowing-string "..."
+  "A string used for header narrowing truncation."
+  :type 'string
+  :group 'wl-pref)
+
 (defvar wl-message-mode-line-format-spec-alist
   '((?f (if (memq 'modeline wl-use-folder-petname)
            (wl-folder-get-petname wl-message-buffer-cur-folder)
          wl-message-buffer-cur-folder))
+    (?F wl-message-buffer-flag-indicator)
     (?n wl-message-buffer-cur-number))
   "An alist of format specifications for message buffer's mode-lines.
 Each element is a list of following:
@@ -1485,13 +1598,14 @@ Each element is a list of following:
 SPEC is a character for format specification.
 STRING-EXP is an expression to get string to insert.")
 
-(defcustom wl-message-mode-line-format "Wanderlust: << %f / %n >>"
+(defcustom wl-message-mode-line-format "Wanderlust: << %f / %n %F>>"
   "*A format string for message buffer's mode-line of Wanderlust.
 It may include any of the following format specifications
 which are replaced by the given information:
 
 %f The folder name.
-%n The number of the message."
+%n The number of the message.
+%F The global flag indicator."
   :group 'wl-pref
   :type 'string)
 
@@ -1526,14 +1640,16 @@ which are replaced by the given information:
 
 (defcustom wl-message-ignored-field-list nil
   "All fields that match this list will be hidden in message buffer.
-Each elements are regexp of field-name."
+Each elements are regexp of field-name.
+You can specify exceptions by `wl-message-visible-field-list'."
   :type '(repeat (string :tag "Field Regexp"))
   :group 'wl-pref
   :group 'wl-setting)
 
 (defcustom wl-message-visible-field-list nil
   "All fields that match this list will be displayed in message buffer.
-Each elements are regexp of field-name."
+Each elements are regexp of field-name.
+This variable overwhelm `wl-message-ignored-field-list' settings."
   :type '(repeat (string :tag "Field Regexp"))
   :group 'wl-pref
   :group 'wl-setting)
@@ -1629,7 +1745,7 @@ with wl-highlight-folder-many-face."
   :group 'wl-pref)
 
 (defcustom wl-fcc nil
-  "*Folder Carbon Copy."
+  "*Folder Carbon Copy target initially added at creating draft buffer."
   :type '(choice (const :tag "disable" nil)
                 string function)
   :group 'wl-draft
@@ -1642,7 +1758,7 @@ with wl-highlight-folder-many-face."
   :group 'wl-pref)
 
 (defcustom wl-bcc nil
-  "*Blind Carbon Copy."
+  "*Blind Carbon Copy target initially added at creating draft buffer."
   :type '(choice (const :tag "disable" nil)
                 string)
   :group 'wl-draft
@@ -1690,6 +1806,12 @@ with wl-highlight-folder-many-face."
   :group 'wl-summary
   :group 'wl-pref)
 
+(defcustom wl-summary-print-argument-within-window nil
+  "*If non-nil, always print argument right side of window."
+  :type 'boolean
+  :group 'wl-summary
+  :group 'wl-pref)
+
 (defcustom wl-summary-pick-field-default "Body"
   "*Default field for pick."
   :type '(radio (const "From")
@@ -1760,15 +1882,49 @@ This wrapper is generated by the mail system when rejecting a letter."
   :type 'regexp
   :group 'wl-draft)
 
+(defcustom wl-draft-preview-attributes t
+  "Non-nil forces to preview the attributes in the `wl-draft-preview-message'.
+Attributes specified in the `wl-draft-preview-attributes-list' are displayed."
+  :type 'boolean
+  :group 'wl-draft)
+
+(defcustom wl-draft-preview-attributes-list '(recipients
+                                             envelope-from
+                                             smtp-posting-server
+                                             smtp-posting-port)
+  "*Attribute symbols to display in the draft preview.
+Candidates are following:
+`recipients'
+`envelope-from'
+`smtp-posting-server'
+`smtp-posting-port'
+`nntp-posting-server'
+`nntp-posting-port'
+Also variables which begin with `wl-' can be specified
+\(`wl-' have to be removed\)"
+  :type '(repeat symbol)
+  :group 'wl-draft)
+
+(defcustom wl-draft-preview-attributes-buffer-lines 5
+  "*Buffer height for the draft attribute preview."
+  :type 'integer
+  :group 'wl-draft)
+
+(defcustom wl-draft-preview-attributes-buffer-name "*Preview Attributes*"
+  "*Buffer name for the draft attribute preview."
+  :type 'string
+  :group 'wl-draft)
+
 (defcustom wl-refile-default-from-folder "+from"
   "*Folder name to refile by `wl-refile-guess-by-from'."
   :type '(string :tag "Folder")
   :group 'wl-pref)
 
 (defcustom wl-summary-auto-refile-skip-marks
-  (list elmo-msgdb-new-mark
-       elmo-msgdb-unread-uncached-mark
-       elmo-msgdb-unread-cached-mark)
+  (list wl-summary-new-uncached-mark
+       wl-summary-new-cached-mark
+       wl-summary-unread-uncached-mark
+       wl-summary-unread-cached-mark)
   "Persistent marks to skip auto-refiling."
   :type '(repeat (string :tag "Mark"))
   :group 'wl-summary)
@@ -1788,8 +1944,8 @@ the message is skipped at cursor move."
   :group 'wl-summary)
 
 (defcustom wl-summary-incorporate-marks
-  (list elmo-msgdb-new-mark
-       elmo-msgdb-unread-uncached-mark)
+  (list wl-summary-new-uncached-mark
+       wl-summary-unread-uncached-mark)
   "Persistent marks to prefetch at `wl-summary-incorporate'."
   :type '(repeat (string :tag "Mark"))
   :group 'wl-summary)
@@ -2096,16 +2252,14 @@ e.x.
   :group 'wl-pref)
 
 (defcustom wl-folder-sync-range-alist
-  (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^"
-                     (regexp-quote wl-queue-folder) "$")
-             "all"))
+  (list (cons 'wl-require-update-all-folder-p "all")
+       (cons "^'flag" "all"))
   "*Default sync range alist.  If no matches, `wl-default-sync-range' is used."
-  :type '(repeat (cons (regexp :tag "Folder Regexp")
+  :type '(repeat (cons (choice (regexp :tag "Folder Regexp")
+                              (symbol :tag "A function"))
                       (choice (const "update")
                               (const "all")
                               (const "rescan")
-                              (const "first:")
-                              (const "last:")
                               (const "no-sync")
                               (const :tag "none" nil))))
   :group 'wl-pref)
@@ -2115,8 +2269,6 @@ e.x.
   :type '(choice (const "update")
                 (const "all")
                 (const "rescan")
-                (const "first:")
-                (const "last:")
                 (const "no-sync")
                 (const :tag "none" nil))
   :group 'wl-pref)
@@ -2194,6 +2346,11 @@ Sender information in summary mode."
                 regexp)
   :group 'wl-summary)
 
+(defcustom wl-summary-save-file-suffix ".eml"
+  "Suffix for the saved file name."
+  :type 'string
+  :group 'wl-summary)
+
 (defcustom wl-folder-removed-mark "#<removed>"
   "Mark for removed folder."
   :type 'string
@@ -2228,18 +2385,8 @@ ex.
                               (string :tag "Folder"))))
   :group 'wl-folder)
 
-(defcustom wl-refile-policy-alist '(("^[-=']" . copy)
-                                   (".*" . move))
-  "*List of refile policy.  Each element is (FOLDER-REGEXP . POLICY).
-POLICY is copy or move."
-  :type '(repeat (cons (regexp :tag "Folder Regexp")
-                      (choice (const copy)
-                              (const move))))
-  :group 'wl-summary
-  :group 'wl-pref)
-
 (defcustom wl-folder-hierarchy-access-folders '("^-[^\\.]*\\(:\\|@\\|$\\)"
-                                               "^@$")
+                                               "^@$" "^'$")
   "*Access group REGEXPs to make hierarchy structure."
   :type '(repeat (string :tag "Regexp"))
   :group 'wl-folder)
@@ -2381,10 +2528,11 @@ ex.
   :group 'wl-expire)
 
 (defcustom wl-summary-expire-reserve-marks
-  (list elmo-msgdb-important-mark
-       elmo-msgdb-new-mark
-       elmo-msgdb-unread-uncached-mark
-       elmo-msgdb-unread-cached-mark)
+  (list wl-summary-flag-mark
+       wl-summary-new-uncached-mark
+       wl-summary-new-cached-mark
+       wl-summary-unread-uncached-mark
+       wl-summary-unread-cached-mark)
   "Permanent marks of reserved message when expire.
 Don't reserve temporary mark message.
 
@@ -2563,7 +2711,12 @@ This variable can also be a regex."
 ;; highilght about mouse
 (defcustom wl-use-highlight-mouse-line (and window-system
                                            (>= emacs-major-version 19))
-  "*Highlight mouse line, if non nil."
+  "*Highlight mouse line, if non-nil."
+  :type 'boolean
+  :group 'wl-highlight)
+
+(defcustom wl-use-flag-folder-help-echo nil
+  "*Display help-echo in the flag folder if non-nil."
   :type 'boolean
   :group 'wl-highlight)
 
@@ -2680,6 +2833,8 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
   "*Icon file for namazu folder.")
 (defvar wl-shimbun-folder-icon "shimbun.xpm"
   "*Icon file for shimbun folder.")
+(defvar wl-file-folder-icon "file.xpm"
+  "*Icon file for file folder.")
 (defvar wl-maildir-folder-icon "maildir.xpm"
   "*Icon file for maildir folder.")
 (defvar wl-empty-trash-folder-icon "trash-e.xpm"
@@ -2715,6 +2870,10 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
 
 ;;;; Obsolete variables.
 
+;; 2003-11-05
+(elmo-define-obsolete-variable 'wl-summary-new-mark
+                              'wl-summary-new-uncached-mark)
+
 ;; 2003-07-15 delete -> dispose
 (elmo-define-obsolete-variable 'wl-delete-folder-alist
                               'wl-dispose-folder-alist)