diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-01-20 23:14:25 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-01-20 23:55:40 -0500 |
commit | 0c93d0d072d6030c57bb8ab9e7b90686ed79af15 (patch) | |
tree | 3ea8a6eb3c32feb3a9f660652acb9a2c033d25d8 /lisp/calendar/cal-coptic.el | |
parent | 0f65baa03b54dc95b24b765bc91370354743a449 (diff) | |
download | emacs-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-coptic.el')
-rw-r--r-- | lisp/calendar/cal-coptic.el | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index 3461f3259b9..2a0e7d81e0c 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el @@ -136,13 +136,13 @@ Defaults to today's date if DATE is not given." "Interactively read the arguments for a Coptic date command. Reads a year, month, and day." (let* ((today (calendar-current-date)) - (year (calendar-read - (format "%s calendar year (>0): " calendar-coptic-name) + (year (calendar-read-sexp + "%s calendar year (>0)" (lambda (x) (> x 0)) - (number-to-string - (calendar-extract-year - (calendar-coptic-from-absolute - (calendar-absolute-from-gregorian today)))))) + (calendar-extract-year + (calendar-coptic-from-absolute + (calendar-absolute-from-gregorian today))) + calendar-coptic-name)) (completion-ignore-case t) (month (cdr (assoc-string (completing-read @@ -151,11 +151,14 @@ Reads a year, month, and day." (append calendar-coptic-month-name-array nil)) nil t) (calendar-make-alist calendar-coptic-month-name-array - 1) t))) + 1) + t))) (last (calendar-coptic-last-day-of-month month year)) - (day (calendar-read - (format "%s calendar day (1-%d): " calendar-coptic-name last) - (lambda (x) (and (< 0 x) (<= x last)))))) + (day (calendar-read-sexp + "%s calendar day (1-%d)" + (lambda (x) (and (< 0 x) (<= x last))) + nil + calendar-coptic-name last))) (list (list month day year)))) ;;;###cal-autoload |