From d347df4fae31fe9291ed808777a2483cbf003a9b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 5 Apr 2008 21:28:43 +0000 Subject: [PATCH] (diary-hebrew-sabbath-candles): Simplify. --- lisp/ChangeLog | 1 + lisp/calendar/cal-hebrew.el | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7d0fe7c35a..1c0601493cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -45,6 +45,7 @@ * calendar/cal-hebrew.el (diary-hebrew-sabbath-candles-minutes) (diary-hebrew-sabbath-candles): Move here from solar.el and rename. Doc fix. Keep old name as alias. + (diary-hebrew-sabbath-candles): Simplify. (solar-setup, solar-sunrise-sunset, calendar-latitude) (calendar-longitude, calendar-time-zone): Declare for compiler. * calendar/diary-lib.el (list-sexp-diary-entries): Update doc for diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index f98bb00ff46..4b28c760dde 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -1145,15 +1145,15 @@ use when highlighting the day in the calendar." (or (and calendar-latitude calendar-longitude calendar-time-zone) (solar-setup)) (if (= (% (calendar-absolute-from-gregorian date) 7) 5) ; Friday - (let* ((sunset (cadr (solar-sunrise-sunset date))) - (light (if sunset - (cons (- (car sunset) - (/ diary-hebrew-sabbath-candles-minutes 60.0)) - (cdr sunset))))) + (let ((sunset (cadr (solar-sunrise-sunset date)))) (if sunset - (cons mark - (format "%s Sabbath candle lighting" - (apply 'solar-time-string light))))))) + (cons mark (format + "%s Sabbath candle lighting" + (apply 'solar-time-string + (cons (- (car sunset) + (/ diary-hebrew-sabbath-candles-minutes + 60.0)) + (cdr sunset))))))))) ;;;###diary-autoload (define-obsolete-function-alias 'diary-sabbath-candles -- 2.39.5