Function: todo-read-time
todo-read-time is a byte-compiled function defined in todo-mode.el.gz.
Signature
(todo-read-time)
Documentation
Prompt for and return a valid clock time as a string.
Valid time strings are those matching diary-time-regexp.
Typing <return> at the prompt returns the current time, if the
user option todo-always-add-time-string is non-nil, otherwise
the empty string (i.e., no time string).
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/todo-mode.el.gz
(defun todo-read-time ()
"Prompt for and return a valid clock time as a string.
Valid time strings are those matching `diary-time-regexp'.
Typing `<return>' at the prompt returns the current time, if the
user option `todo-always-add-time-string' is non-nil, otherwise
the empty string (i.e., no time string)."
(let ((default (when todo-always-add-time-string
(format-time-string "%H:%M")))
valid answer)
(while (not valid)
(setq answer (read-string (format-prompt "Enter a clock time" default)
nil nil default))
(when (or (string= "" answer)
(string-match diary-time-regexp answer))
(setq valid t)))
answer))