summaryrefslogtreecommitdiff
path: root/lisp/calendar/cal-islam.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-03-09 03:42:58 +0000
committerGlenn Morris <rgm@gnu.org>2008-03-09 03:42:58 +0000
commit6546bf55685c01fd4bf25ba51b548bf8661df163 (patch)
tree74700023894989cb9ace944195536293609a6a74 /lisp/calendar/cal-islam.el
parent7e8a162967c325af3e67df53eb75de450881a901 (diff)
downloademacs-6546bf55685c01fd4bf25ba51b548bf8661df163.tar.gz
(diary-islamic-date): Move to end.
(date, number): Declare where needed.
Diffstat (limited to 'lisp/calendar/cal-islam.el')
-rw-r--r--lisp/calendar/cal-islam.el21
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 @@
;;; Code:
-(defvar date)
(defvar displayed-month)
(defvar displayed-year)
-(defvar number)
(defvar original-date)
(require 'cal-julian)
@@ -171,13 +169,6 @@ Driven by the variable `calendar-date-display-form'."
(calendar-absolute-from-islamic date)))
(or noecho (calendar-print-islamic-date)))
-(defun diary-islamic-date ()
- "Islamic calendar equivalent of date diary entry."
- (let ((i (calendar-islamic-date-string date)))
- (if (string-equal i "")
- "Date is pre-Islamic"
- (format "Islamic date (until sunset): %s" i))))
-
(defun holiday-islamic (month day string)
"Holiday on MONTH, DAY (Islamic) called STRING.
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."
(declare-function add-to-diary-list "diary-lib"
(date string specifier &optional marker globcolor literal))
+(defvar number) ; from diary-list-entries
+
(defun list-islamic-diary-entries ()
"Add any Islamic date entries from the diary file to `diary-entries-list'.
Islamic date diary entries must be prefaced by `islamic-diary-entry-symbol'
@@ -511,6 +504,16 @@ Prefix argument ARG makes the entry nonmarking."
(calendar-cursor-to-date t)))))
arg)))
+(defvar date)
+
+;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
+(defun diary-islamic-date ()
+ "Islamic calendar equivalent of date diary entry."
+ (let ((i (calendar-islamic-date-string date)))
+ (if (string-equal i "")
+ "Date is pre-Islamic"
+ (format "Islamic date (until sunset): %s" i))))
+
(provide 'cal-islam)
;; Local Variables: