From 6292c59952a47bdf315223db70e31c9e4e11fbdc Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 2 Nov 2009 02:59:23 +0000 Subject: [PATCH] (calc-date-notation): Check to see if the format is whitespace instead of only the empty string. --- lisp/ChangeLog | 5 +++++ lisp/calc/calc-forms.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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))) -- 2.39.5