summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-03-25 03:42:01 +0000
committerGlenn Morris <rgm@gnu.org>2008-03-25 03:42:01 +0000
commit0075b4a27882cf183756eeeabf0a4afbc67ca07d (patch)
treee8adfe88a6b408a301b3101d98c15feda5f07916 /lisp
parent7b710be149269f34c28e0528ed0eec1c4fe2a1af (diff)
downloademacs-0075b4a27882cf183756eeeabf0a4afbc67ca07d.tar.gz
emacs-0075b4a27882cf183756eeeabf0a4afbc67ca07d.tar.bz2
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.
Diffstat (limited to 'lisp')
-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."
(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.