New user option.
* wl-util.el (wl-search-condition-fields): New function; export
from `wl-read-search-condition-internal'.
(wl-read-search-condition-internal): Use it.
* wl-folder.el (wl-folder-complete-filter-condition): Ditto.
+2006-06-19 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * wl-vars.el (wl-additional-search-condition-fields):
+ New user option.
+
+ * wl-util.el (wl-search-condition-fields): New function; export
+ from `wl-read-search-condition-internal'.
+ (wl-read-search-condition-internal): Use it.
+
+ * wl-folder.el (wl-folder-complete-filter-condition): Ditto.
+
2006-06-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-summary.el (wl-summary-define-sort-command): New function.
(t
(let ((candidate
(mapcar (lambda (x) (list (concat (downcase x) ":")))
- (append '("last" "first"
- "from" "subject" "to" "cc" "body"
- "since" "before" "tocc"
- "larger" "smaller")
- elmo-msgdb-extra-fields))))
+ (wl-search-condition-fields))))
(if (not flag)
(try-completion string candidate)
(all-completions string candidate))))))
(symbol-value variable))))))
;;; Search Condition
+(defun wl-search-condition-fields ()
+ (let ((denial-fields
+ (nconc (mapcar 'capitalize elmo-msgdb-extra-fields)
+ (mapcar 'capitalize wl-additional-search-condition-fields)
+ '("Flag" "Since" "Before"
+ "From" "Subject" "To" "Cc" "Body" "ToCc"
+ "Larger" "Smaller"))))
+ (append '("AND" "OR" "Last" "First")
+ denial-fields
+ (mapcar (lambda (f) (concat "!" f))
+ denial-fields))))
+
(defun wl-read-search-condition (default)
"Read search condition string interactively."
(wl-read-search-condition-internal "Search by" default))
(defun wl-read-search-condition-internal (prompt default &optional paren)
(let* ((completion-ignore-case t)
- (denial-fields (nconc (mapcar 'capitalize elmo-msgdb-extra-fields)
- '("Flag" "Since" "Before"
- "From" "Subject" "To" "Cc" "Body" "ToCc"
- "Larger" "Smaller")))
(field (completing-read
(format "%s (%s): " prompt default)
- (mapcar 'list
- (append '("AND" "OR" "Last" "First")
- denial-fields
- (mapcar (lambda (f) (concat "!" f))
- denial-fields)))))
+ (mapcar #'list (wl-search-condition-fields))))
value)
(setq field (if (string= field "")
(setq field default)
:type 'boolean
:group 'wl-summary)
+(defcustom wl-additional-search-condition-fields nil
+ "*A list of field name which is used for candidates of search condition."
+ :type '(repeat (string :tag "Field name"))
+ :group 'wl-pref
+ :group 'wl-setting)
+
;;;; Hooks
(defvar wl-folder-mode-hook nil
"A hook called when wanderlust folder mode is started.
(defcustom wl-score-files-directory (concat elmo-msgdb-directory elmo-path-sep)
"*Name of the directory where score files will be stored.
-(default \"~/.elmo\")."
+\(default \"~/.elmo\")."
:type 'directory
:group 'wl)