bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#61460: 30.0.50; Calendar shows eclipse for quarter moon


From: Ulrich Mueller
Subject: bug#61460: 30.0.50; Calendar shows eclipse for quarter moon
Date: Wed, 22 Feb 2023 12:32:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

>>>>> On Wed, 22 Feb 2023, Michael Heerdegen wrote:

> Ulrich Mueller <ulm@gentoo.org> writes:
>> It is probably a matter of personal taste, but I dislike the nested
>> concats. This seems simpler (not tested, though):
>> 
>> -        (cons mark (concat (lunar-phase-name (nth 2 phase)) " "
>> -                           (cadr phase))))))
>> +        (cons mark
>> +              (let ((eclipse (nth 3 phase)))
>> +                (concat (lunar-phase-name (nth 2 phase)) " "
>> +                        (cadr phase)
>> +                        (if (string-empty-p eclipse) "" " ")
>> +                        eclipse))))))

> Fine by me (my preference would be Andreas' suggestion).

Use something like ‘(unless (string-empty-p eclipse) " ")’? WFM.

> We also need to fix the space handling in calendar-lunar-phases aka M in
> calendar - when no eclipse occurs, the descriptions end with a
> trailing space.

While at it, maybe replace ‘(car (last x))’ by ‘(nth 3 x)’?





reply via email to

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