diff options
| author | Ed Reingold | 2011-03-06 23:48:32 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-03-06 23:48:32 -0800 |
| commit | e63e9234d012ed8ac10e32d3b2a0e1539b5685d0 (patch) | |
| tree | 4a09237dd34858337db3d1791fc36575115cc8d1 | |
| parent | 5b3e6db8d56f100f82cdf3587fdef16425bf403d (diff) | |
| download | emacs-e63e9234d012ed8ac10e32d3b2a0e1539b5685d0.tar.gz emacs-e63e9234d012ed8ac10e32d3b2a0e1539b5685d0.zip | |
cal-hebrew addition from bug#8190.
* lisp/calendar/cal-hebrew.el (diary-hebrew-yahrzeit):
Add optional `after-sunset' argument.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calendar/cal-hebrew.el | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38d9283f748..d8559182c5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-07 Ed Reingold <reingold@emr.cs.iit.edu> | ||
| 2 | |||
| 3 | * calendar/cal-hebrew.el (diary-hebrew-yahrzeit): | ||
| 4 | Add optional `after-sunset' argument. (Bug#8190) | ||
| 5 | |||
| 1 | 2011-03-07 Aaron S. Hawley <aaron.s.hawley@gmail.com> | 6 | 2011-03-07 Aaron S. Hawley <aaron.s.hawley@gmail.com> |
| 2 | 7 | ||
| 3 | * play/morse.el (nato-alphabet, nato-region, denato-region): | 8 | * play/morse.el (nato-alphabet, nato-region, denato-region): |
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index 63e7484e127..e5373a28756 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el | |||
| @@ -879,21 +879,27 @@ use when highlighting the day in the calendar." | |||
| 879 | (declare-function diary-ordinal-suffix "diary-lib" (n)) | 879 | (declare-function diary-ordinal-suffix "diary-lib" (n)) |
| 880 | 880 | ||
| 881 | ;;;###diary-autoload | 881 | ;;;###diary-autoload |
| 882 | (defun diary-hebrew-yahrzeit (death-month death-day death-year &optional mark) | 882 | (defun diary-hebrew-yahrzeit (death-month death-day death-year |
| 883 | &optional mark after-sunset) | ||
| 883 | "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before. | 884 | "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before. |
| 884 | Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary | 885 | Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary |
| 885 | entry is assumed to be the name of the person. Although the date | 886 | entry is assumed to be the name of the person. Although the date |
| 886 | of death is specified by the civil calendar, the proper Hebrew | 887 | of death is specified by the civil calendar, the proper Hebrew |
| 887 | calendar Yahrzeit is determined. | 888 | calendar Yahrzeit is determined. |
| 888 | 889 | ||
| 890 | If the death occurred after local sunset on the given civil date, | ||
| 891 | the following civil date corresponds to the Hebrew date of | ||
| 892 | death--set the optional parameter AFTER-SUNSET non-nil in this case. | ||
| 893 | |||
| 889 | The order of the input parameters changes according to `calendar-date-style' | 894 | The order of the input parameters changes according to `calendar-date-style' |
| 890 | \(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style). | 895 | \(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style). |
| 891 | 896 | ||
| 892 | An optional parameter MARK specifies a face or single-character string to | 897 | An optional parameter MARK specifies a face or single-character string to |
| 893 | use when highlighting the day in the calendar." | 898 | use when highlighting the day in the calendar." |
| 894 | (let* ((h-date (calendar-hebrew-from-absolute | 899 | (let* ((h-date (calendar-hebrew-from-absolute |
| 895 | (calendar-absolute-from-gregorian | 900 | (+ (calendar-absolute-from-gregorian |
| 896 | (diary-make-date death-month death-day death-year)))) | 901 | (diary-make-date death-month death-day death-year)) |
| 902 | (if after-sunset 1 0)))) | ||
| 897 | (h-month (calendar-extract-month h-date)) | 903 | (h-month (calendar-extract-month h-date)) |
| 898 | (h-day (calendar-extract-day h-date)) | 904 | (h-day (calendar-extract-day h-date)) |
| 899 | (h-year (calendar-extract-year h-date)) | 905 | (h-year (calendar-extract-year h-date)) |