changeset 9713:d62e29b1d7a2

Give lunar phases buffer a symbolic name; use new form of calendar-read-date.
author Edward M. Reingold <reingold@emr.cs.iit.edu>
date Wed, 26 Oct 1994 15:32:51 +0000
parents 275845a98fa8
children c14b023ca6fe
files lisp/calendar/lunar.el
diffstat 1 files changed, 6 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/lunar.el	Wed Oct 26 15:31:27 1994 +0000
+++ b/lisp/calendar/lunar.el	Wed Oct 26 15:32:51 1994 +0000
@@ -185,8 +185,7 @@
   (let ((m1 displayed-month)
         (y1 displayed-year)
         (m2 displayed-month)
-        (y2 displayed-year)
-        (lunar-phases-buffer "*Phases of Moon*"))
+        (y2 displayed-year))
     (increment-calendar-month m1 y1 -1)
     (increment-calendar-month m2 y2 1)
     (set-buffer (get-buffer-create lunar-phases-buffer))
@@ -225,25 +224,11 @@
   (interactive "P")
   (save-excursion
     (let* ((completion-ignore-case t)
-           (date (calendar-current-date))
-           (displayed-month
-            (if arg
-                (cdr (assoc
-                      (capitalize
-                       (completing-read
-                        "Month name: "
-                        (mapcar 'list (append calendar-month-name-array nil))
-                        nil t))
-                      (calendar-make-alist calendar-month-name-array)))
-              (extract-calendar-month date)))
-           (displayed-year
-            (if arg
-                (calendar-read
-                 "Year (>0): "
-                 '(lambda (x) (> x 0))
-                 (int-to-string
-                  (extract-calendar-year (calendar-current-date))))
-              (extract-calendar-year date))))
+           (date (if arg
+                     (calendar-read-date t)
+                   (calendar-current-date)))
+           (displayed-month (extract-calendar-month date))
+           (displayed-year (extract-calendar-year date)))
       (calendar-phases-of-moon))))
 
 (defun diary-phases-of-moon ()