diff options
Diffstat (limited to 'lisp/calendar/cal-bahai.el')
-rw-r--r-- | lisp/calendar/cal-bahai.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 22e4cdbcd52..c2e4205c0bc 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -1,4 +1,4 @@ -;;; cal-bahai.el --- calendar functions for the Bahá’í calendar. +;;; cal-bahai.el --- calendar functions for the Bahá’í calendar. -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2021 Free Software Foundation, Inc. @@ -124,9 +124,10 @@ Defaults to today's date if DATE is not given." (y (calendar-extract-year bahai-date))) (if (< y 1) "" ; pre-Bahai - (let* ((m (calendar-extract-month bahai-date)) - (d (calendar-extract-day bahai-date)) - (monthname (if (and (= m 19) + (let ((m (calendar-extract-month bahai-date)) + (d (calendar-extract-day bahai-date))) + (calendar-dlet* + ((monthname (if (and (= m 19) (<= d 0)) "Ayyám-i-Há" (aref calendar-bahai-month-name-array (1- m)))) @@ -137,8 +138,8 @@ Defaults to today's date if DATE is not given." (year (number-to-string y)) (month (number-to-string m)) dayname) - ;; Can't call calendar-date-string because of monthname oddity. - (mapconcat 'eval calendar-date-display-form ""))))) + ;; Can't call calendar-date-string because of monthname oddity. + (mapconcat #'eval calendar-date-display-form "")))))) ;;;###cal-autoload (defun calendar-bahai-print-date () @@ -153,13 +154,12 @@ Defaults to today's date if DATE is not given." "Interactively read the arguments for a Bahá’í date command. Reads a year, month and day." (let* ((today (calendar-current-date)) - (year (calendar-read - "Bahá’í calendar year (not 0): " + (year (calendar-read-sexp + "Bahá’í calendar year (not 0)" (lambda (x) (not (zerop x))) - (number-to-string - (calendar-extract-year - (calendar-bahai-from-absolute - (calendar-absolute-from-gregorian today)))))) + (calendar-extract-year + (calendar-bahai-from-absolute + (calendar-absolute-from-gregorian today))))) (completion-ignore-case t) (month (cdr (assoc (completing-read @@ -169,8 +169,8 @@ Reads a year, month and day." nil t) (calendar-make-alist calendar-bahai-month-name-array 1)))) - (day (calendar-read "Bahá’í calendar day (1-19): " - (lambda (x) (and (< 0 x) (<= x 19)))))) + (day (calendar-read-sexp "Bahá’í calendar day (1-19)" + (lambda (x) (and (< 0 x) (<= x 19)))))) (list (list month day year)))) ;;;###cal-autoload |