emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/cal-hebrew.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/cal-hebrew.el,v
Date: Sat, 29 Mar 2008 02:46:21 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/03/29 02:46:20

Index: cal-hebrew.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-hebrew.el,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- cal-hebrew.el       27 Mar 2008 02:48:08 -0000      1.48
+++ cal-hebrew.el       29 Mar 2008 02:46:20 -0000      1.49
@@ -595,20 +595,18 @@
                         'calendar-hebrew-from-absolute
                         'mark-hebrew-calendar-date-pattern))
 
+
+(autoload 'diary-insert-entry-1 "diary-lib")
+
 ;;;###cal-autoload
 (defun insert-hebrew-diary-entry (arg)
   "Insert a diary entry.
 For the Hebrew date corresponding to the date indicated by point.
 Prefix argument ARG makes the entry nonmarking."
   (interactive "P")
-  (let ((calendar-month-name-array calendar-hebrew-month-name-array-leap-year))
-    (make-diary-entry
-     (concat hebrew-diary-entry-symbol
-             (calendar-date-string
-              (calendar-hebrew-from-absolute
-               (calendar-absolute-from-gregorian (calendar-cursor-to-date t)))
-              nil t))
-     arg)))
+  (diary-insert-entry-1 nil arg calendar-hebrew-month-name-array-leap-year
+                        hebrew-diary-entry-symbol
+                        'calendar-hebrew-from-absolute))
 
 ;;;###cal-autoload
 (defun insert-monthly-hebrew-diary-entry (arg)
@@ -616,16 +614,9 @@
 For the day of the Hebrew month corresponding to the date indicated by point.
 Prefix argument ARG makes the entry nonmarking."
   (interactive "P")
-  (let ((calendar-date-display-form (if european-calendar-style
-                                        '(day " * ")
-                                      '("* " day )))
-        (calendar-month-name-array calendar-hebrew-month-name-array-leap-year))
-    (make-diary-entry
-     (concat hebrew-diary-entry-symbol
-             (calendar-date-string
-              (calendar-hebrew-from-absolute
-               (calendar-absolute-from-gregorian (calendar-cursor-to-date 
t)))))
-     arg)))
+  (diary-insert-entry-1 'monthly arg calendar-hebrew-month-name-array-leap-year
+                        hebrew-diary-entry-symbol
+                        'calendar-hebrew-from-absolute))
 
 ;;;###cal-autoload
 (defun insert-yearly-hebrew-diary-entry (arg)
@@ -633,16 +624,9 @@
 For the day of the Hebrew year corresponding to the date indicated by point.
 Prefix argument ARG makes the entry nonmarking."
   (interactive "P")
-  (let ((calendar-date-display-form (if european-calendar-style
-                                         '(day " " monthname)
-                                       '(monthname " " day)))
-         (calendar-month-name-array 
calendar-hebrew-month-name-array-leap-year))
-    (make-diary-entry
-     (concat hebrew-diary-entry-symbol
-             (calendar-date-string
-              (calendar-hebrew-from-absolute
-               (calendar-absolute-from-gregorian (calendar-cursor-to-date 
t)))))
-     arg)))
+  (diary-insert-entry-1 'yearly arg calendar-hebrew-month-name-array-leap-year
+                        hebrew-diary-entry-symbol
+                        'calendar-hebrew-from-absolute))
 
 ;;;###autoload
 (defun list-yahrzeit-dates (death-date start-year end-year)
@@ -745,23 +729,24 @@
 
 (defvar entry)
 
+(autoload 'diary-make-date "diary-lib")
+
 ;;;###diary-autoload
 (defun diary-yahrzeit (death-month death-day death-year &optional mark)
   "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before.
-Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary entry is assumed
-to be the name of the person.  Date of death is on the *civil* calendar;
-although the date of death is specified by the civil calendar, the proper
-Hebrew calendar Yahrzeit is determined.  If `european-calendar-style' is
-non-nil, the order of the parameters is changed to DEATH-DAY, DEATH-MONTH,
-DEATH-YEAR.
+Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary
+entry is assumed to be the name of the person.  Although the date
+of death is specified by the civil calendar, the proper Hebrew
+calendar Yahrzeit is determined.
+
+The order of the input parameters changes according to `calendar-date-style'
+\(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style).
 
 An optional parameter MARK specifies a face or single-character string to
 use when highlighting the day in the calendar."
   (let* ((h-date (calendar-hebrew-from-absolute
                   (calendar-absolute-from-gregorian
-                   (if european-calendar-style
-                       (list death-day death-month death-year)
-                     (list death-month death-day death-year)))))
+                   (diary-make-date death-month death-day death-year))))
          (h-month (extract-calendar-month h-date))
          (h-day (extract-calendar-day h-date))
          (h-year (extract-calendar-year h-date))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]