aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-25 03:42:01 +0000
committerGlenn Morris2008-03-25 03:42:01 +0000
commit0075b4a27882cf183756eeeabf0a4afbc67ca07d (patch)
treee8adfe88a6b408a301b3101d98c15feda5f07916
parent7b710be149269f34c28e0528ed0eec1c4fe2a1af (diff)
downloademacs-0075b4a27882cf183756eeeabf0a4afbc67ca07d.tar.gz
emacs-0075b4a27882cf183756eeeabf0a4afbc67ca07d.zip
(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.
-rw-r--r--lisp/calendar/cal-persia.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el
index 9a81a7c29a8..5b4e6ff6007 100644
--- a/lisp/calendar/cal-persia.el
+++ b/lisp/calendar/cal-persia.el
@@ -159,17 +159,9 @@ Gregorian date Sunday, December 31, 1 BC."
159 (message "Persian date: %s" 159 (message "Persian date: %s"
160 (calendar-persian-date-string (calendar-cursor-to-date t)))) 160 (calendar-persian-date-string (calendar-cursor-to-date t))))
161 161
162;;;###cal-autoload 162(defun calendar-persian-read-date ()
163(defun calendar-goto-persian-date (date &optional noecho) 163 "Interactively read the arguments for a Persian date command.
164 "Move cursor to Persian date DATE. 164Reads a year, month, and day."
165Echo Persian date unless NOECHO is non-nil."
166 (interactive (persian-prompt-for-date))
167 (calendar-goto-date (calendar-gregorian-from-absolute
168 (calendar-absolute-from-persian date)))
169 (or noecho (calendar-print-persian-date)))
170
171(defun persian-prompt-for-date ()
172 "Ask for a Persian date."
173 (let* ((year (calendar-read 165 (let* ((year (calendar-read
174 "Persian calendar year (not 0): " 166 "Persian calendar year (not 0): "
175 (lambda (x) (not (zerop x))) 167 (lambda (x) (not (zerop x)))
@@ -193,6 +185,18 @@ Echo Persian date unless NOECHO is non-nil."
193 (lambda (x) (and (< 0 x) (<= x last)))))) 185 (lambda (x) (and (< 0 x) (<= x last))))))
194 (list (list month day year)))) 186 (list (list month day year))))
195 187
188(define-obsolete-function-alias
189 'persian-prompt-for-date 'calendar-persian-read-date "23.1")
190
191;;;###cal-autoload
192(defun calendar-goto-persian-date (date &optional noecho)
193 "Move cursor to Persian date DATE.
194Echo Persian date unless NOECHO is non-nil."
195 (interactive (calendar-persian-read-date))
196 (calendar-goto-date (calendar-gregorian-from-absolute
197 (calendar-absolute-from-persian date)))
198 (or noecho (calendar-print-persian-date)))
199
196(defvar date) 200(defvar date)
197 201
198;; To be called from list-sexp-diary-entries, where DATE is bound. 202;; To be called from list-sexp-diary-entries, where DATE is bound.