Commit d347df4f authored by Glenn Morris's avatar Glenn Morris
Browse files

(diary-hebrew-sabbath-candles): Simplify.

parent a9df811d
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
* calendar/cal-hebrew.el (diary-hebrew-sabbath-candles-minutes) * calendar/cal-hebrew.el (diary-hebrew-sabbath-candles-minutes)
(diary-hebrew-sabbath-candles): Move here from solar.el and rename. (diary-hebrew-sabbath-candles): Move here from solar.el and rename.
Doc fix. Keep old name as alias. Doc fix. Keep old name as alias.
(diary-hebrew-sabbath-candles): Simplify.
(solar-setup, solar-sunrise-sunset, calendar-latitude) (solar-setup, solar-sunrise-sunset, calendar-latitude)
(calendar-longitude, calendar-time-zone): Declare for compiler. (calendar-longitude, calendar-time-zone): Declare for compiler.
* calendar/diary-lib.el (list-sexp-diary-entries): Update doc for * calendar/diary-lib.el (list-sexp-diary-entries): Update doc for
......
...@@ -1145,15 +1145,15 @@ use when highlighting the day in the calendar." ...@@ -1145,15 +1145,15 @@ use when highlighting the day in the calendar."
(or (and calendar-latitude calendar-longitude calendar-time-zone) (or (and calendar-latitude calendar-longitude calendar-time-zone)
(solar-setup)) (solar-setup))
(if (= (% (calendar-absolute-from-gregorian date) 7) 5) ; Friday (if (= (% (calendar-absolute-from-gregorian date) 7) 5) ; Friday
(let* ((sunset (cadr (solar-sunrise-sunset date))) (let ((sunset (cadr (solar-sunrise-sunset date))))
(light (if sunset
(cons (- (car sunset)
(/ diary-hebrew-sabbath-candles-minutes 60.0))
(cdr sunset)))))
(if sunset (if sunset
(cons mark (cons mark (format
(format "%s Sabbath candle lighting" "%s Sabbath candle lighting"
(apply 'solar-time-string light))))))) (apply 'solar-time-string
(cons (- (car sunset)
(/ diary-hebrew-sabbath-candles-minutes
60.0))
(cdr sunset)))))))))
;;;###diary-autoload ;;;###diary-autoload
(define-obsolete-function-alias 'diary-sabbath-candles (define-obsolete-function-alias 'diary-sabbath-candles
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment