changeset 93635:9e6a9b87ceb1

(calendar-bahai-to-absolute): Rename calendar-absolute-from-bahai. Update callers, keep old name as alias.
author Glenn Morris <rgm@gnu.org>
date Fri, 04 Apr 2008 07:00:54 +0000
parents 72b3466c2c1e
children f5d39ae0db5b
files lisp/calendar/cal-bahai.el
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-bahai.el	Fri Apr 04 04:38:58 2008 +0000
+++ b/lisp/calendar/cal-bahai.el	Fri Apr 04 07:00:54 2008 +0000
@@ -73,9 +73,9 @@
 (defconst calendar-bahai-leap-base
   (+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400))
   "Number of leap years between 1 and 1844 AD, inclusive.
-Used by `calendar-absolute-from-bahai'.")
+Used by `calendar-bahai-to-absolute'.")
 
-(defun calendar-absolute-from-bahai (date)
+(defun calendar-bahai-to-absolute (date)
   "Compute absolute date from Bahá'í date DATE.
 The absolute date is the number of days elapsed since the (imaginary)
 Gregorian date Sunday, December 31, 1 BC."
@@ -96,6 +96,9 @@
          0)
        day)))                           ; days so far this month
 
+(define-obsolete-function-alias 'calendar-absolute-from-bahai
+  'calendar-bahai-to-absolute "23.1")
+
 (defun calendar-bahai-from-absolute (date)
   "Bahá'í date (month day year) corresponding to the absolute DATE."
   (if (< date calendar-bahai-epoch)
@@ -109,11 +112,11 @@
                         1 0)))
            (month                       ; search forward from Baha
             (1+ (calendar-sum m 1
-                  (> date (calendar-absolute-from-bahai (list m 19 year)))
+                  (> date (calendar-bahai-to-absolute (list m 19 year)))
                   1)))
            (day                     ; calculate the day by subtraction
             (- date
-               (1- (calendar-absolute-from-bahai (list month 1 year))))))
+               (1- (calendar-bahai-to-absolute (list month 1 year))))))
       (list month day year))))
 
 ;;;###cal-autoload
@@ -186,7 +189,7 @@
   "Move cursor to Bahá'í date DATE; echo Bahá'í date unless NOECHO is non-nil."
   (interactive (calendar-bahai-read-date))
   (calendar-goto-date (calendar-gregorian-from-absolute
-                       (calendar-absolute-from-bahai date)))
+                       (calendar-bahai-to-absolute date)))
   (or noecho (calendar-bahai-print-date)))
 
 (define-obsolete-function-alias
@@ -223,7 +226,7 @@
       (and (> m 12)                     ; Bahá'í date might be visible
            (calendar-date-is-visible-p
             (setq date (calendar-gregorian-from-absolute
-                        (calendar-absolute-from-bahai (list month day y)))))
+                        (calendar-bahai-to-absolute (list month day y)))))
            (list (list date string))))))
 
 (autoload 'holiday-fixed "holidays")
@@ -281,7 +284,7 @@
 A value of 0 in any position is a wildcard.  Optional argument COLOR is
 passed to `mark-visible-calendar-date' as MARK."
   (calendar-mark-1 month day year 'calendar-bahai-from-absolute
-                   'calendar-absolute-from-bahai color))
+                   'calendar-bahai-to-absolute color))
 
 (define-obsolete-function-alias
   'mark-bahai-calendar-date-pattern 'calendar-bahai-mark-date-pattern "23.1")