Optional argument WARNTIME is an integer (or string) giving the number
of minutes before the appointment at which to start warning.
The default is `appt-message-warning-time'."
- (interactive "sTime (hh:mm[am/pm]): \nsMessage: \n\
-sMinutes before the appointment to start warning: ")
- (unless (string-match appt-time-regexp time)
+ (interactive (list (let ((time (read-string "Time (hh:mm[am/pm]): ")))
+ (unless (string-match-p appt-time-regexp time)
+ (user-error "Unacceptable time-string"))
+ time)
+ (read-string "Message: ")
+ (read-string "Minutes before the appointment to start warning: ")))
+ (unless (string-match-p appt-time-regexp time)
(user-error "Unacceptable time-string"))
(and (stringp warntime)
(setq warntime (unless (string-equal warntime "")