diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index f143b2dfcb7c21426d4836ad4e168eae94df71c2..d5d8a4002188b48159c32242bd7ec8e6ec522507 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -511,13 +511,13 @@ 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) - (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))) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 1612f48a0193e3a25f1fcaf3b00b89e7179545ac..233d2cfcd22aa78d87950dcae7a13e7ce3149133 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1194,7 +1194,7 @@ return negative results." (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 @@ -1379,7 +1379,7 @@ Optional integers MON and YR are used instead of today's date." ;; 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) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index d5bd26a9277112827b6b2ea3eb92582d002a3362..1cb13e412b6ad208784b977cea09531935d35b17 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1197,7 +1197,7 @@ ensure that all relevant variables are set. " (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 @@ -1969,7 +1969,7 @@ and %s by the ordinal ending of that number (that is, `st', `nd', 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))))