From 1a380827e3eba102eb844d30ee4a7a7c0e735976 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 1994 00:28:54 +0000 Subject: [PATCH] (calendar-phases-of-moon): Fix mode line. --- lisp/calendar/lunar.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 1d8e45492ea..dd0501083b6 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -192,8 +192,11 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, (set-buffer (get-buffer-create lunar-phases-buffer)) (setq buffer-read-only nil) (calendar-set-mode-line - (format "Phases of the moon from %s, %d to %s, %d%%-" - (calendar-month-name m1) y1 (calendar-month-name m2) y2)) + (if (= y1 y2) + (format "Phases of the Moon from %s to %s, %d%%-" + (calendar-month-name m1) (calendar-month-name m2) y2) + (format "Phases of the Moon from %s, %d to %s, %d%%-" + (calendar-month-name m1) y1 (calendar-month-name m2) y2))) (erase-buffer) (insert (mapconcat -- 2.39.5