From 6f8eab73b40369408c6e7e009615b8e709ad03b3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 2 Apr 2009 06:33:18 +0000 Subject: [PATCH] (diary-cyclic): Check for +ve N. --- lisp/calendar/diary-lib.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 57f18f69137..0081170d8ac 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1912,6 +1912,8 @@ 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")) (let* ((diff (- (calendar-absolute-from-gregorian date) (calendar-absolute-from-gregorian (diary-make-date month day year)))) -- 2.39.5