mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 02:51:31 -08:00
(calendar-persian-read-date): New name for persian-prompt-for-date.
Update callers, make old name an obsolete alias. Doc fix. Move definition before use.
This commit is contained in:
parent
7b710be149
commit
0075b4a278
1 changed files with 15 additions and 11 deletions
|
|
@ -159,17 +159,9 @@ Gregorian date Sunday, December 31, 1 BC."
|
|||
(message "Persian date: %s"
|
||||
(calendar-persian-date-string (calendar-cursor-to-date t))))
|
||||
|
||||
;;;###cal-autoload
|
||||
(defun calendar-goto-persian-date (date &optional noecho)
|
||||
"Move cursor to Persian date DATE.
|
||||
Echo Persian date unless NOECHO is non-nil."
|
||||
(interactive (persian-prompt-for-date))
|
||||
(calendar-goto-date (calendar-gregorian-from-absolute
|
||||
(calendar-absolute-from-persian date)))
|
||||
(or noecho (calendar-print-persian-date)))
|
||||
|
||||
(defun persian-prompt-for-date ()
|
||||
"Ask for a Persian date."
|
||||
(defun calendar-persian-read-date ()
|
||||
"Interactively read the arguments for a Persian date command.
|
||||
Reads a year, month, and day."
|
||||
(let* ((year (calendar-read
|
||||
"Persian calendar year (not 0): "
|
||||
(lambda (x) (not (zerop x)))
|
||||
|
|
@ -193,6 +185,18 @@ Echo Persian date unless NOECHO is non-nil."
|
|||
(lambda (x) (and (< 0 x) (<= x last))))))
|
||||
(list (list month day year))))
|
||||
|
||||
(define-obsolete-function-alias
|
||||
'persian-prompt-for-date 'calendar-persian-read-date "23.1")
|
||||
|
||||
;;;###cal-autoload
|
||||
(defun calendar-goto-persian-date (date &optional noecho)
|
||||
"Move cursor to Persian date DATE.
|
||||
Echo Persian date unless NOECHO is non-nil."
|
||||
(interactive (calendar-persian-read-date))
|
||||
(calendar-goto-date (calendar-gregorian-from-absolute
|
||||
(calendar-absolute-from-persian date)))
|
||||
(or noecho (calendar-print-persian-date)))
|
||||
|
||||
(defvar date)
|
||||
|
||||
;; To be called from list-sexp-diary-entries, where DATE is bound.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue