summaryrefslogtreecommitdiff
path: root/lisp/calendar/cal-julian.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-01-20 23:14:25 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-01-20 23:55:40 -0500
commit0c93d0d072d6030c57bb8ab9e7b90686ed79af15 (patch)
tree3ea8a6eb3c32feb3a9f660652acb9a2c033d25d8 /lisp/calendar/cal-julian.el
parent0f65baa03b54dc95b24b765bc91370354743a449 (diff)
downloademacs-0c93d0d072d6030c57bb8ab9e7b90686ed79af15.tar.gz
Use `calendar-read-sexp` instead of the now obsolete `calendar-read`
* lisp/calendar/diary-lib.el (diary-insert-cyclic-entry): * lisp/calendar/cal-persia.el (calendar-persian-read-date): * lisp/calendar/cal-move.el (calendar-goto-day-of-year): * lisp/calendar/cal-mayan.el (calendar-mayan-read-haab-date) (calendar-mayan-read-tzolkin-date): * lisp/calendar/cal-julian.el (calendar-julian-goto-date) (calendar-astro-goto-day-number): * lisp/calendar/cal-iso.el (calendar-iso-read-date): * lisp/calendar/cal-islam.el (calendar-islamic-read-date): * lisp/calendar/cal-hebrew.el (calendar-hebrew-read-date) (calendar-hebrew-list-yahrzeits): * lisp/calendar/cal-french.el (calendar-french-goto-date): * lisp/calendar/cal-coptic.el (calendar-coptic-read-date): * lisp/calendar/cal-china.el (calendar-chinese-goto-date): * lisp/calendar/cal-bahai.el (calendar-bahai-read-date): * lisp/calendar/holidays.el (list-holidays): Use `calendar-read-sexp`.
Diffstat (limited to 'lisp/calendar/cal-julian.el')
-rw-r--r--lisp/calendar/cal-julian.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el
index 235b4d00900..47880a4e974 100644
--- a/lisp/calendar/cal-julian.el
+++ b/lisp/calendar/cal-julian.el
@@ -95,14 +95,13 @@ Driven by the variable `calendar-date-display-form'."
"Move cursor to Julian DATE; echo Julian date unless NOECHO is non-nil."
(interactive
(let* ((today (calendar-current-date))
- (year (calendar-read
- "Julian calendar year (>0): "
+ (year (calendar-read-sexp
+ "Julian calendar year (>0)"
(lambda (x) (> x 0))
- (number-to-string
- (calendar-extract-year
- (calendar-julian-from-absolute
- (calendar-absolute-from-gregorian
- today))))))
+ (calendar-extract-year
+ (calendar-julian-from-absolute
+ (calendar-absolute-from-gregorian
+ today)))))
(month-array calendar-month-name-array)
(completion-ignore-case t)
(month (cdr (assoc-string
@@ -115,12 +114,13 @@ Driven by the variable `calendar-date-display-form'."
(if (and (zerop (% year 4)) (= month 2))
29
(aref [31 28 31 30 31 30 31 31 30 31 30 31] (1- month))))
- (day (calendar-read
- (format "Julian calendar day (%d-%d): "
- (if (and (= year 1) (= month 1)) 3 1) last)
+ (day (calendar-read-sexp
+ "Julian calendar day (%d-%d)"
(lambda (x)
(and (< (if (and (= year 1) (= month 1)) 2 0) x)
- (<= x last))))))
+ (<= x last)))
+ nil
+ (if (and (= year 1) (= month 1)) 3 1) last)))
(list (list month day year))))
(calendar-goto-date (calendar-gregorian-from-absolute
(calendar-julian-to-absolute date)))
@@ -173,8 +173,8 @@ Defaults to today's date if DATE is not given."
(defun calendar-astro-goto-day-number (daynumber &optional noecho)
"Move cursor to astronomical (Julian) DAYNUMBER.
Echo astronomical (Julian) day number unless NOECHO is non-nil."
- (interactive (list (calendar-read
- "Astronomical (Julian) day number (>1721425): "
+ (interactive (list (calendar-read-sexp
+ "Astronomical (Julian) day number (>1721425)"
(lambda (x) (> x 1721425)))))
(calendar-goto-date
(calendar-gregorian-from-absolute