diff options
author | Glenn Morris <rgm@gnu.org> | 2012-08-20 14:13:03 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-08-20 14:13:03 -0400 |
commit | 327576483cd198b11b39bb88a42d0495f5724684 (patch) | |
tree | 0efbd15706e786ab4e0fcf0b3fb1595412156877 /lisp/calendar/holidays.el | |
parent | 0a05a035f680b0fcd50b5e5201e056ead479511d (diff) | |
download | emacs-327576483cd198b11b39bb88a42d0495f5724684.tar.gz |
Use display-warning in a few places in calendar
* lisp/calendar/diary-lib.el (diary-include-files, diary-sexp-entry):
* lisp/calendar/holidays.el (calendar-holiday-list):
Report errors with display-warning rather than beep'n'sleep.
Diffstat (limited to 'lisp/calendar/holidays.el')
-rw-r--r-- | lisp/calendar/holidays.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 0bb3c231840..043d402f612 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -458,17 +458,20 @@ with descriptive strings such as (defun calendar-holiday-list () "Form the list of holidays that occur on dates in the calendar window. The holidays are those in the list `calendar-holidays'." - (let (res h) + (let (res h err) (sort (dolist (p calendar-holidays res) (if (setq h (if calendar-debug-sexp (let ((debug-on-error t)) (eval p)) - (condition-case nil + (condition-case err (eval p) - (error (beep) - (message "Bad holiday list item: %s" p) - (sleep-for 2))))) + (error + (display-warning + :error + (format "Bad holiday list item: %s\nError: %s\n" + p err)) + nil)))) (setq res (append h res)))) 'calendar-date-compare))) |