Function: calendar-mark-1
calendar-mark-1 is a byte-compiled function defined in
diary-lib.el.gz.
Signature
(calendar-mark-1 MONTH DAY YEAR FROMABS TOABS &optional COLOR)
Documentation
Mark dates in the calendar conforming to MONTH DAY YEAR of some system.
The function FROMABS converts absolute dates to the appropriate date system.
The function TOABS carries out the inverse operation. Optional argument
COLOR is passed to calendar-mark-visible-date as MARK.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;; Bahá’í, Islamic.
(defun calendar-mark-1 (month day year fromabs toabs &optional color)
"Mark dates in the calendar conforming to MONTH DAY YEAR of some system.
The function FROMABS converts absolute dates to the appropriate date system.
The function TOABS carries out the inverse operation. Optional argument
COLOR is passed to `calendar-mark-visible-date' as MARK."
(with-current-buffer calendar-buffer
(if (and (not (zerop month)) (not (zerop day)))
(if (not (zerop year))
;; Fully specified date.
(let ((date (calendar-gregorian-from-absolute
(funcall toabs (list month day year)))))
(if (calendar-date-is-visible-p date)
(calendar-mark-visible-date date color)))
;; Month and day in any year--this taken from the holiday stuff.
(let* ((i-date (funcall fromabs
(calendar-absolute-from-gregorian
(list displayed-month 15 displayed-year))))
(m (calendar-extract-month i-date))
(y (calendar-extract-year i-date))
date)
(unless (< m 1) ; calendar doesn't apply
(calendar-increment-month m y (- 10 month))
(and (> m 7) ; date might be visible
(calendar-date-is-visible-p
(setq date (calendar-gregorian-from-absolute
(funcall toabs (list month day y)))))
(calendar-mark-visible-date date color)))))
(calendar-mark-complex month day year fromabs color))))