(interactive "sTime (hh:mm[am/pm]): \nsMessage: \n\
sMinutes before the appointment to start warning: ")
(unless (string-match appt-time-regexp time)
- (error "Unacceptable time-string"))
+ (user-error "Unacceptable time-string"))
(and (stringp warntime)
(setq warntime (unless (string-equal warntime "")
(string-to-number warntime))))
(and warntime
(not (integerp warntime))
- (error "Argument WARNTIME must be an integer, or nil"))
+ (user-error "Argument WARNTIME must be an integer, or nil"))
(or appt-timer (appt-activate))
(let ((time-msg (list (list (appt-convert-time time))
(concat time " " msg) t)))
(let ((year (calendar-extract-year date))
offset-years)
(cond ((zerop year)
- (error "There was no year zero"))
+ (user-error "There was no year zero"))
((> year 0)
(setq offset-years (1- year))
(+ (calendar-day-number date) ; days this year
;; stands, almost all other calendar functions (eg holidays) would
;; at best have unpredictable results for such dates.
(if (< (+ month (* 12 (1- year))) 2)
- (error "Months before January, 1 AD cannot be displayed"))
+ (user-error "Months before January, 1 AD cannot be displayed"))
(setq displayed-month month
displayed-year year)
(erase-buffer)
"
(interactive "P")
(if (string-equal diary-mail-addr "")
- (error "You must set `diary-mail-addr' to use this command")
+ (user-error "You must set `diary-mail-addr' to use this command")
(let ((diary-display-function 'diary-fancy-display))
(diary-list-entries (calendar-current-date) (or ndays diary-mail-days)))
(compose-mail diary-mail-addr
An optional parameter MARK specifies a face or single-character
string to use when highlighting the day in the calendar."
(or (> n 0)
- (error "Day count must be positive"))
+ (user-error "Day count must be positive"))
(let* ((diff (- (calendar-absolute-from-gregorian date)
(calendar-absolute-from-gregorian
(diary-make-date month day year))))