diff options
| author | Glenn Morris | 2008-03-09 03:42:58 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-09 03:42:58 +0000 |
| commit | 6546bf55685c01fd4bf25ba51b548bf8661df163 (patch) | |
| tree | 74700023894989cb9ace944195536293609a6a74 /lisp | |
| parent | 7e8a162967c325af3e67df53eb75de450881a901 (diff) | |
| download | emacs-6546bf55685c01fd4bf25ba51b548bf8661df163.tar.gz emacs-6546bf55685c01fd4bf25ba51b548bf8661df163.zip | |
(diary-islamic-date): Move to end.
(date, number): Declare where needed.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/calendar/cal-islam.el | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index c151cbb9d17..13bc0c8e339 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el | |||
| @@ -36,10 +36,8 @@ | |||
| 36 | 36 | ||
| 37 | ;;; Code: | 37 | ;;; Code: |
| 38 | 38 | ||
| 39 | (defvar date) | ||
| 40 | (defvar displayed-month) | 39 | (defvar displayed-month) |
| 41 | (defvar displayed-year) | 40 | (defvar displayed-year) |
| 42 | (defvar number) | ||
| 43 | (defvar original-date) | 41 | (defvar original-date) |
| 44 | 42 | ||
| 45 | (require 'cal-julian) | 43 | (require 'cal-julian) |
| @@ -171,13 +169,6 @@ Driven by the variable `calendar-date-display-form'." | |||
| 171 | (calendar-absolute-from-islamic date))) | 169 | (calendar-absolute-from-islamic date))) |
| 172 | (or noecho (calendar-print-islamic-date))) | 170 | (or noecho (calendar-print-islamic-date))) |
| 173 | 171 | ||
| 174 | (defun diary-islamic-date () | ||
| 175 | "Islamic calendar equivalent of date diary entry." | ||
| 176 | (let ((i (calendar-islamic-date-string date))) | ||
| 177 | (if (string-equal i "") | ||
| 178 | "Date is pre-Islamic" | ||
| 179 | (format "Islamic date (until sunset): %s" i)))) | ||
| 180 | |||
| 181 | (defun holiday-islamic (month day string) | 172 | (defun holiday-islamic (month day string) |
| 182 | "Holiday on MONTH, DAY (Islamic) called STRING. | 173 | "Holiday on MONTH, DAY (Islamic) called STRING. |
| 183 | If MONTH, DAY (Islamic) is visible, the value returned is corresponding | 174 | If MONTH, DAY (Islamic) is visible, the value returned is corresponding |
| @@ -202,6 +193,8 @@ nil if it is not visible in the current calendar window." | |||
| 202 | (declare-function add-to-diary-list "diary-lib" | 193 | (declare-function add-to-diary-list "diary-lib" |
| 203 | (date string specifier &optional marker globcolor literal)) | 194 | (date string specifier &optional marker globcolor literal)) |
| 204 | 195 | ||
| 196 | (defvar number) ; from diary-list-entries | ||
| 197 | |||
| 205 | (defun list-islamic-diary-entries () | 198 | (defun list-islamic-diary-entries () |
| 206 | "Add any Islamic date entries from the diary file to `diary-entries-list'. | 199 | "Add any Islamic date entries from the diary file to `diary-entries-list'. |
| 207 | Islamic date diary entries must be prefaced by `islamic-diary-entry-symbol' | 200 | Islamic date diary entries must be prefaced by `islamic-diary-entry-symbol' |
| @@ -511,6 +504,16 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 511 | (calendar-cursor-to-date t))))) | 504 | (calendar-cursor-to-date t))))) |
| 512 | arg))) | 505 | arg))) |
| 513 | 506 | ||
| 507 | (defvar date) | ||
| 508 | |||
| 509 | ;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. | ||
| 510 | (defun diary-islamic-date () | ||
| 511 | "Islamic calendar equivalent of date diary entry." | ||
| 512 | (let ((i (calendar-islamic-date-string date))) | ||
| 513 | (if (string-equal i "") | ||
| 514 | "Date is pre-Islamic" | ||
| 515 | (format "Islamic date (until sunset): %s" i)))) | ||
| 516 | |||
| 514 | (provide 'cal-islam) | 517 | (provide 'cal-islam) |
| 515 | 518 | ||
| 516 | ;; Local Variables: | 519 | ;; Local Variables: |