+2002-04-08 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * elmo-util.el (elmo-read-search-condition-internal): Give default
+ value for date.
+
2002-04-04 Mito <mito@mxa.nes.nec.co.jp>
* elmo-util.el (elmo-condition-parse-search-value): Accept
(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 "$")