From: Glenn Morris Date: Tue, 12 Apr 2011 04:02:38 +0000 (-0700) Subject: cal-hebrew fix for diary-hebrew-rosh-hodesh. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~283^2~19 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c0749a51330a59450298108cec49cef04cdb9377;p=emacs.git cal-hebrew fix for diary-hebrew-rosh-hodesh. * lisp/calendar/cal-hebrew.el (diary-hebrew-rosh-hodesh): Don't try to cons a mark onto an empty element. Recipe showing the problem: ~/diary: &%%(diary-rosh-hodesh) &%%(diary-parasha) emacs -Q --eval "(progn (add-hook 'diary-nongregorian-listing-hook 'diary-hebrew-list-entries) (setq cal-tex-diary t))" -f calendar Move to Jan 2011, press `t m', latex the generated file. [Port to 23.4] --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5bad8814141..b1007b146fc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-04-12 Glenn Morris + + * calendar/cal-hebrew.el (diary-hebrew-rosh-hodesh): + Don't try to cons a mark onto an empty element. + 2011-04-11 Leo Liu * ido.el (ido-buffer-internal): Allow method 'kill for virtual diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index e5373a28756..44c3e62a7c2 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -954,16 +954,17 @@ use when highlighting the day in the calendar." (format "%s (second day)" this-month) this-month)))) (if (= (% d 7) 6) ; Saturday--check for Shabbat Mevarchim - (cons mark - (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day)) + (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day)) + (cons mark (format "Mevarchim Rosh Hodesh %s (%s)" (aref h-month-names (if (= h-month (calendar-hebrew-last-month-of-year h-year)) 0 h-month)) - (aref calendar-day-name-array (- 29 h-day)))) - ((and (< h-day 30) (> h-day 22) (= 30 last-day)) + (aref calendar-day-name-array (- 29 h-day))))) + ((and (< h-day 30) (> h-day 22) (= 30 last-day)) + (cons mark (format "Mevarchim Rosh Hodesh %s (%s-%s)" (aref h-month-names h-month) (if (= h-day 29)