* elmo-util.el (elmo-read-search-condition-internal): Give default
authoryoichi <yoichi>
Mon, 8 Apr 2002 12:01:44 +0000 (12:01 +0000)
committeryoichi <yoichi>
Mon, 8 Apr 2002 12:01:44 +0000 (12:01 +0000)
value for date.

elmo/ChangeLog
elmo/elmo-util.el

index b516f72..b9a3eb0 100644 (file)
@@ -1,3 +1,8 @@
+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
 2002-04-04  Mito  <mito@mxa.nes.nec.co.jp>
 
        * elmo-util.el (elmo-condition-parse-search-value): Accept
index b404691..11a1813 100644 (file)
@@ -170,12 +170,15 @@ File content is encoded with MIME-CHARSET."
               (concat field "(2) Search by") default)
              ")"))
      ((string-match "Since\\|Before" field)
               (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 "$")
      (t
       (setq value (read-from-minibuffer (format "Value for '%s': " field)))
       (unless (string-match (concat "^" elmo-condition-atom-regexp "$")