aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calendar
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-07-22 15:30:43 +0000
committerRichard M. Stallman <[email protected]>2002-07-22 15:30:43 +0000
commite0ab9b68c524894ba844a0b3cf0bb1b2dd9a120f (patch)
tree473cd94c426adf51ef29d8c8fb342a8192fd3879 /lisp/calendar
parent16cd607da77e5f8894b3cb65900b8c6035861fcf (diff)
(diary-phases-of-moon): Add optional MARK
parameter, specifying what face or character to use in the calendar display. These will now return (MARK . ENTRY).
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/lunar.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index a076f0b88c..2a4666ba70 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -236,8 +236,11 @@ This function is suitable for execution in a .emacs file."
(displayed-year (extract-calendar-year date)))
(calendar-phases-of-moon))))
-(defun diary-phases-of-moon ()
- "Moon phases diary entry."
+(defun diary-phases-of-moon (&optional mark)
+"Moon phases diary entry.
+
+An optional parameter MARK specifies a face or single-character string to
+use when highlighting the day in the calendar."
(let* ((index (* 4
(truncate
(* 12.3685
@@ -250,8 +253,8 @@ This function is suitable for execution in a .emacs file."
(setq index (1+ index))
(setq phase (lunar-phase index)))
(if (calendar-date-equal (car phase) date)
- (concat (lunar-phase-name (car (cdr (cdr phase)))) " "
- (car (cdr phase))))))
+ (cons mark (concat (lunar-phase-name (car (cdr (cdr phase)))) " "
+ (car (cdr phase)))))))
;; For the Chinese calendar the calculations for the new moon need to be more