diff options
| author | Glenn Morris | 2008-03-14 03:12:09 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-14 03:12:09 +0000 |
| commit | 52e0f59e95b745d314d6debb902dd796dfd2a4b7 (patch) | |
| tree | 1882375c6be45b419d3a0635381720654eea3b35 | |
| parent | ad2903ec12dfe5e5dc2e261a841696ffd5d0447a (diff) | |
| download | emacs-52e0f59e95b745d314d6debb902dd796dfd2a4b7.tar.gz emacs-52e0f59e95b745d314d6debb902dd796dfd2a4b7.zip | |
Re-indent.
(calendar-goto-persian-date): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/calendar/cal-persia.el | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74ac07ed1a6..3deb22ead03 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | (ethiopic-calendar-month-name-array, ethiopic-name): Add doc strings. | 22 | (ethiopic-calendar-month-name-array, ethiopic-name): Add doc strings. |
| 23 | (coptic-prompt-for-date): Move definition before use. | 23 | (coptic-prompt-for-date): Move definition before use. |
| 24 | 24 | ||
| 25 | * calendar/cal-persia.el (calendar-goto-persian-date): Doc fix. | ||
| 26 | |||
| 25 | * calendar/diary-lib.el (mark-diary-entries): Move some constant | 27 | * calendar/diary-lib.el (mark-diary-entries): Move some constant |
| 26 | variables outside the diary-date-forms loop. | 28 | variables outside the diary-date-forms loop. |
| 27 | 29 | ||
diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el index 9861dc22910..9a81a7c29a8 100644 --- a/lisp/calendar/cal-persia.el +++ b/lisp/calendar/cal-persia.el | |||
| @@ -98,7 +98,7 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 98 | (floor d1 280506)) | 98 | (floor d1 280506)) |
| 99 | (d2 ; prior days not in n2820 or n768 | 99 | (d2 ; prior days not in n2820 or n768 |
| 100 | (mod d1 280506)) | 100 | (mod d1 280506)) |
| 101 | (n1 ; years not in n2820 or n768 | 101 | (n1 ; years not in n2820 or n768 |
| 102 | ;; Want: | 102 | ;; Want: |
| 103 | ;; (floor (+ (* 2820 d2) (* 2820 366)) 1029983)) | 103 | ;; (floor (+ (* 2820 d2) (* 2820 366)) 1029983)) |
| 104 | ;; but that causes overflow, so use the following. | 104 | ;; but that causes overflow, so use the following. |
| @@ -141,8 +141,8 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 141 | (defun calendar-persian-date-string (&optional date) | 141 | (defun calendar-persian-date-string (&optional date) |
| 142 | "String of Persian date of Gregorian DATE, default today." | 142 | "String of Persian date of Gregorian DATE, default today." |
| 143 | (let* ((persian-date (calendar-persian-from-absolute | 143 | (let* ((persian-date (calendar-persian-from-absolute |
| 144 | (calendar-absolute-from-gregorian | 144 | (calendar-absolute-from-gregorian |
| 145 | (or date (calendar-current-date))))) | 145 | (or date (calendar-current-date))))) |
| 146 | (y (extract-calendar-year persian-date)) | 146 | (y (extract-calendar-year persian-date)) |
| 147 | (m (extract-calendar-month persian-date))) | 147 | (m (extract-calendar-month persian-date))) |
| 148 | (let ((monthname (aref persian-calendar-month-name-array (1- m))) | 148 | (let ((monthname (aref persian-calendar-month-name-array (1- m))) |
| @@ -162,7 +162,7 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 162 | ;;;###cal-autoload | 162 | ;;;###cal-autoload |
| 163 | (defun calendar-goto-persian-date (date &optional noecho) | 163 | (defun calendar-goto-persian-date (date &optional noecho) |
| 164 | "Move cursor to Persian date DATE. | 164 | "Move cursor to Persian date DATE. |
| 165 | Echo Persian date unless NOECHO is t." | 165 | Echo Persian date unless NOECHO is non-nil." |
| 166 | (interactive (persian-prompt-for-date)) | 166 | (interactive (persian-prompt-for-date)) |
| 167 | (calendar-goto-date (calendar-gregorian-from-absolute | 167 | (calendar-goto-date (calendar-gregorian-from-absolute |
| 168 | (calendar-absolute-from-persian date))) | 168 | (calendar-absolute-from-persian date))) |
| @@ -180,11 +180,11 @@ Echo Persian date unless NOECHO is t." | |||
| 180 | (calendar-current-date))))))) | 180 | (calendar-current-date))))))) |
| 181 | (completion-ignore-case t) | 181 | (completion-ignore-case t) |
| 182 | (month (cdr (assoc | 182 | (month (cdr (assoc |
| 183 | (completing-read | 183 | (completing-read |
| 184 | "Persian calendar month name: " | 184 | "Persian calendar month name: " |
| 185 | (mapcar 'list | 185 | (mapcar 'list |
| 186 | (append persian-calendar-month-name-array nil)) | 186 | (append persian-calendar-month-name-array nil)) |
| 187 | nil t) | 187 | nil t) |
| 188 | (calendar-make-alist persian-calendar-month-name-array | 188 | (calendar-make-alist persian-calendar-month-name-array |
| 189 | 1)))) | 189 | 1)))) |
| 190 | (last (persian-calendar-last-day-of-month month year)) | 190 | (last (persian-calendar-last-day-of-month month year)) |