]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc-date-notation): Check to see if the format is whitespace
authorJay Belanger <jay.p.belanger@gmail.com>
Mon, 2 Nov 2009 02:59:23 +0000 (02:59 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Mon, 2 Nov 2009 02:59:23 +0000 (02:59 +0000)
instead of only the empty string.

lisp/ChangeLog
lisp/calc/calc-forms.el

index 88b6a6ab98db7facf23be550b9106d91e1d64a1c..f8c718a424b78320d1c8b3c56d67529de5fa69bb 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-02  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-forms.el (calc-date-notation): Allow a "blank string"
+       to be made up of whitespace.
+
 2009-11-02  Chong Yidong  <cyd@stupidchicken.com>
 
        * minibuffer.el (read-file-name): Don't use file dialogs for
index 99a8b949c42a0235bd4d4fa46d9d2effdd578431..0845fb151abaa91354f5d3163f2bc7e392893ed5 100644 (file)
@@ -81,7 +81,7 @@
 (defun calc-date-notation (fmt arg)
   (interactive "sDate format (e.g., M/D/YY h:mm:ss): \nP")
   (calc-wrapper
-   (if (equal fmt "")
+   (if (string-match-p "\\`\\s-*\\'" fmt)
        (setq fmt "1"))
    (if (string-match "\\` *[0-9] *\\'" fmt)
        (setq fmt (nth (string-to-number fmt) calc-standard-date-formats)))