]> code.delx.au - gnu-emacs/commitdiff
cal-hebrew fix for diary-hebrew-rosh-hodesh.
authorGlenn Morris <rgm@gnu.org>
Tue, 12 Apr 2011 04:02:38 +0000 (21:02 -0700)
committerGlenn Morris <rgm@gnu.org>
Tue, 12 Apr 2011 04:02:38 +0000 (21:02 -0700)
* 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]

lisp/ChangeLog
lisp/calendar/cal-hebrew.el

index 5bad88141411e55aecf71afc149efa5b83facef7..b1007b146fcb205cbc3a6f4e59338f078fc989de 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-12  Glenn Morris  <rgm@gnu.org>
+
+       * calendar/cal-hebrew.el (diary-hebrew-rosh-hodesh):
+       Don't try to cons a mark onto an empty element.
+
 2011-04-11  Leo Liu  <sdl.web@gmail.com>
 
        * ido.el (ido-buffer-internal): Allow method 'kill for virtual
index e5373a28756c695c48e7941cc1be0651aaae54ac..44c3e62a7c2cf75e0336b193468bf7621fe0e9d9 100644 (file)
@@ -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)