]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-hebrew.el
(auto-mode-alist): Add snmp-mode patterns.
[gnu-emacs] / lisp / calendar / cal-hebrew.el
index 15609a2b77a610a1e8f5877dbd8ba85c4fd7abc0..16868f7e70398a173671c1ebec85abb22df92869 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cal-hebrew.el --- calendar functions for the Hebrew calendar.
 
-;; Copyright (C) 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997 Free Software Foundation, Inc.
 
 ;; Author: Nachum Dershowitz <nachum@cs.uiuc.edu>
 ;;      Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
 
 ;; This collection of functions implements the features of calendar.el and
 ;; diary.el that deal with the Hebrew calendar.
 
+;; Technical details of all the calendrical calculations can be found in
+;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
+;; Cambridge University Press (1997).
+
 ;; Comments, corrections, and improvements should be sent to
 ;;  Edward M. Reingold               Department of Computer Science
 ;;  (217) 333-6733                   University of Illinois at Urbana-Champaign
@@ -440,7 +445,10 @@ nil if it is not visible in the current calendar window."
                    "Passover (seventh day)")
              (list (calendar-gregorian-from-absolute (+ abs-p 7))
                    "Passover (eighth day)")
-             (list (calendar-gregorian-from-absolute (+ abs-p 12))
+             (list (calendar-gregorian-from-absolute
+                    (if (zerop (% (+ abs-p 12) 7))
+                        (+ abs-p 13)
+                      (+ abs-p 12)))
                    "Yom HaShoah")
              (list (calendar-gregorian-from-absolute
                     (if (zerop (% abs-p 7))
@@ -452,7 +460,7 @@ nil if it is not visible in the current calendar window."
              (list (calendar-gregorian-from-absolute (+ abs-p 33))
                    "Lag BaOmer")
              (list (calendar-gregorian-from-absolute (+ abs-p 43))
-                   "Yom Yerushalim")
+                   "Yom Yerushalaim")
              (list (calendar-gregorian-from-absolute (+ abs-p 49))
                    "Erev Shavuot")
              (list (calendar-gregorian-from-absolute (+ abs-p 51))
@@ -564,7 +572,10 @@ not be marked in the calendar.  This function is provided for use with the
                        (backward-char 1)
                        (subst-char-in-region date-start (point) ?\^M ?\n t)
                        (add-to-diary-list
-                         gdate (buffer-substring entry-start (point)))))))
+                        gdate
+                        (buffer-substring-no-properties entry-start (point))
+                        (buffer-substring-no-properties
+                         (1+ date-start) (1- entry-start)))))))
                (setq d (cdr d))))
            (setq gdate
                  (calendar-gregorian-from-absolute