diff options
| author | Glenn Morris | 2008-04-04 07:00:54 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-04-04 07:00:54 +0000 |
| commit | f22c8bf72c6322d37e4f8e6159630f01b3ab7d29 (patch) | |
| tree | ca19300b36badb30e37dd3dcdde22d5f4e3429ca | |
| parent | 1c76c939fb205edd5e473cab6f6e747c9137773b (diff) | |
| download | emacs-f22c8bf72c6322d37e4f8e6159630f01b3ab7d29.tar.gz emacs-f22c8bf72c6322d37e4f8e6159630f01b3ab7d29.zip | |
(calendar-bahai-to-absolute): Rename calendar-absolute-from-bahai.
Update callers, keep old name as alias.
| -rw-r--r-- | lisp/calendar/cal-bahai.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index bdc4b5b8142..01653d14a09 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el | |||
| @@ -73,9 +73,9 @@ | |||
| 73 | (defconst calendar-bahai-leap-base | 73 | (defconst calendar-bahai-leap-base |
| 74 | (+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400)) | 74 | (+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400)) |
| 75 | "Number of leap years between 1 and 1844 AD, inclusive. | 75 | "Number of leap years between 1 and 1844 AD, inclusive. |
| 76 | Used by `calendar-absolute-from-bahai'.") | 76 | Used by `calendar-bahai-to-absolute'.") |
| 77 | 77 | ||
| 78 | (defun calendar-absolute-from-bahai (date) | 78 | (defun calendar-bahai-to-absolute (date) |
| 79 | "Compute absolute date from Bahá'í date DATE. | 79 | "Compute absolute date from Bahá'í date DATE. |
| 80 | The absolute date is the number of days elapsed since the (imaginary) | 80 | The absolute date is the number of days elapsed since the (imaginary) |
| 81 | Gregorian date Sunday, December 31, 1 BC." | 81 | Gregorian date Sunday, December 31, 1 BC." |
| @@ -96,6 +96,9 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 96 | 0) | 96 | 0) |
| 97 | day))) ; days so far this month | 97 | day))) ; days so far this month |
| 98 | 98 | ||
| 99 | (define-obsolete-function-alias 'calendar-absolute-from-bahai | ||
| 100 | 'calendar-bahai-to-absolute "23.1") | ||
| 101 | |||
| 99 | (defun calendar-bahai-from-absolute (date) | 102 | (defun calendar-bahai-from-absolute (date) |
| 100 | "Bahá'í date (month day year) corresponding to the absolute DATE." | 103 | "Bahá'í date (month day year) corresponding to the absolute DATE." |
| 101 | (if (< date calendar-bahai-epoch) | 104 | (if (< date calendar-bahai-epoch) |
| @@ -109,11 +112,11 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 109 | 1 0))) | 112 | 1 0))) |
| 110 | (month ; search forward from Baha | 113 | (month ; search forward from Baha |
| 111 | (1+ (calendar-sum m 1 | 114 | (1+ (calendar-sum m 1 |
| 112 | (> date (calendar-absolute-from-bahai (list m 19 year))) | 115 | (> date (calendar-bahai-to-absolute (list m 19 year))) |
| 113 | 1))) | 116 | 1))) |
| 114 | (day ; calculate the day by subtraction | 117 | (day ; calculate the day by subtraction |
| 115 | (- date | 118 | (- date |
| 116 | (1- (calendar-absolute-from-bahai (list month 1 year)))))) | 119 | (1- (calendar-bahai-to-absolute (list month 1 year)))))) |
| 117 | (list month day year)))) | 120 | (list month day year)))) |
| 118 | 121 | ||
| 119 | ;;;###cal-autoload | 122 | ;;;###cal-autoload |
| @@ -186,7 +189,7 @@ Reads a year, month and day." | |||
| 186 | "Move cursor to Bahá'í date DATE; echo Bahá'í date unless NOECHO is non-nil." | 189 | "Move cursor to Bahá'í date DATE; echo Bahá'í date unless NOECHO is non-nil." |
| 187 | (interactive (calendar-bahai-read-date)) | 190 | (interactive (calendar-bahai-read-date)) |
| 188 | (calendar-goto-date (calendar-gregorian-from-absolute | 191 | (calendar-goto-date (calendar-gregorian-from-absolute |
| 189 | (calendar-absolute-from-bahai date))) | 192 | (calendar-bahai-to-absolute date))) |
| 190 | (or noecho (calendar-bahai-print-date))) | 193 | (or noecho (calendar-bahai-print-date))) |
| 191 | 194 | ||
| 192 | (define-obsolete-function-alias | 195 | (define-obsolete-function-alias |
| @@ -223,7 +226,7 @@ nil if it is not visible in the current calendar window." | |||
| 223 | (and (> m 12) ; Bahá'í date might be visible | 226 | (and (> m 12) ; Bahá'í date might be visible |
| 224 | (calendar-date-is-visible-p | 227 | (calendar-date-is-visible-p |
| 225 | (setq date (calendar-gregorian-from-absolute | 228 | (setq date (calendar-gregorian-from-absolute |
| 226 | (calendar-absolute-from-bahai (list month day y))))) | 229 | (calendar-bahai-to-absolute (list month day y))))) |
| 227 | (list (list date string)))))) | 230 | (list (list date string)))))) |
| 228 | 231 | ||
| 229 | (autoload 'holiday-fixed "holidays") | 232 | (autoload 'holiday-fixed "holidays") |
| @@ -281,7 +284,7 @@ will not be marked in the calendar. This function is provided for use with | |||
| 281 | A value of 0 in any position is a wildcard. Optional argument COLOR is | 284 | A value of 0 in any position is a wildcard. Optional argument COLOR is |
| 282 | passed to `mark-visible-calendar-date' as MARK." | 285 | passed to `mark-visible-calendar-date' as MARK." |
| 283 | (calendar-mark-1 month day year 'calendar-bahai-from-absolute | 286 | (calendar-mark-1 month day year 'calendar-bahai-from-absolute |
| 284 | 'calendar-absolute-from-bahai color)) | 287 | 'calendar-bahai-to-absolute color)) |
| 285 | 288 | ||
| 286 | (define-obsolete-function-alias | 289 | (define-obsolete-function-alias |
| 287 | 'mark-bahai-calendar-date-pattern 'calendar-bahai-mark-date-pattern "23.1") | 290 | 'mark-bahai-calendar-date-pattern 'calendar-bahai-mark-date-pattern "23.1") |