# HG changeset patch # User Richard M. Stallman # Date 1027351843 0 # Node ID 6edefbc65dc48e833e86fde85bdb79ffc1d1019a # Parent b15eab0c85c1693302f72c4f5f6382ec97227310 (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). diff -r b15eab0c85c1 -r 6edefbc65dc4 lisp/calendar/lunar.el --- a/lisp/calendar/lunar.el Mon Jul 22 15:30:24 2002 +0000 +++ b/lisp/calendar/lunar.el Mon Jul 22 15:30:43 2002 +0000 @@ -236,8 +236,11 @@ (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 @@ (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