From: yoichi Date: Mon, 8 Apr 2002 12:01:44 +0000 (+0000) Subject: * elmo-util.el (elmo-read-search-condition-internal): Give default X-Git-Tag: elmo-mark-root~216 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c55809158bb4e70149ae2bc448aed4c93428127c;p=elisp%2Fwanderlust.git * elmo-util.el (elmo-read-search-condition-internal): Give default value for date. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index b516f72..b9a3eb0 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2002-04-08 Yoichi NAKAYAMA + + * elmo-util.el (elmo-read-search-condition-internal): Give default + value for date. + 2002-04-04 Mito * elmo-util.el (elmo-condition-parse-search-value): Accept diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index b404691..11a1813 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -170,12 +170,15 @@ File content is encoded with MIME-CHARSET." (concat field "(2) Search by") default) ")")) ((string-match "Since\\|Before" field) - (concat (downcase field) ":" - (completing-read (format "Value for '%s': " field) - (mapcar (function - (lambda (x) - (list (format "%s" (car x))))) - elmo-date-descriptions)))) + (let ((default (format-time-string "%Y-%m-%d" (current-time)))) + (setq value (completing-read + (format "Value for '%s' [%s]: " field default) + (mapcar (function + (lambda (x) + (list (format "%s" (car x))))) + elmo-date-descriptions))) + (concat (downcase field) ":" + (if (equal value "") default value)))) (t (setq value (read-from-minibuffer (format "Value for '%s': " field))) (unless (string-match (concat "^" elmo-condition-atom-regexp "$")