From: Jay Belanger Date: Mon, 2 Nov 2009 02:59:23 +0000 (+0000) Subject: (calc-date-notation): Check to see if the format is whitespace X-Git-Tag: emacs-pretest-23.1.90~596 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6292c59952a47bdf315223db70e31c9e4e11fbdc;p=emacs.git (calc-date-notation): Check to see if the format is whitespace instead of only the empty string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88b6a6ab98d..f8c718a424b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-11-02 Jay Belanger + + * calc/calc-forms.el (calc-date-notation): Allow a "blank string" + to be made up of whitespace. + 2009-11-02 Chong Yidong * minibuffer.el (read-file-name): Don't use file dialogs for diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 99a8b949c42..0845fb151ab 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -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)))