]> git.eshelyaron.com Git - emacs.git/commitdiff
(diary-cyclic): Check for +ve N.
authorGlenn Morris <rgm@gnu.org>
Thu, 2 Apr 2009 06:33:18 +0000 (06:33 +0000)
committerGlenn Morris <rgm@gnu.org>
Thu, 2 Apr 2009 06:33:18 +0000 (06:33 +0000)
lisp/calendar/diary-lib.el

index 57f18f69137ac557108580df28ae747267de186d..0081170d8ac7a51954343b9eb0664e36553c3dc6 100644 (file)
@@ -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))))