Function: diary-font-lock-date-forms
diary-font-lock-date-forms is a byte-compiled function defined in
diary-lib.el.gz.
Signature
(diary-font-lock-date-forms MONTH-ARRAY &optional SYMBOL ABBREV-ARRAY)
Documentation
Create font-lock patterns for diary-date-forms using MONTH-ARRAY.
If given, optional SYMBOL must be a prefix to entries. If
optional ABBREV-ARRAY is present, also matches the abbreviations
from this array (with or without a final .), in addition to the
full month names.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
(defun diary-font-lock-date-forms (month-array &optional symbol abbrev-array)
"Create font-lock patterns for `diary-date-forms' using MONTH-ARRAY.
If given, optional SYMBOL must be a prefix to entries. If
optional ABBREV-ARRAY is present, also matches the abbreviations
from this array (with or without a final `.'), in addition to the
full month names."
(calendar-dlet
((dayname (diary-name-pattern calendar-day-name-array
calendar-day-abbrev-array t))
(monthname (format "\\(%s\\|\\*\\)"
(diary-name-pattern month-array abbrev-array)))
(month "\\([0-9]+\\|\\*\\)")
(day "\\([0-9]+\\|\\*\\)")
(year "-?\\([0-9]+\\|\\*\\)"))
(mapcar (lambda (x)
(cons
(concat "^" (regexp-quote diary-nonmarking-symbol) "?"
(if symbol (regexp-quote symbol) "") "\\("
(mapconcat #'eval
;; If backup, omit first item (backup)
;; and last item (not part of date).
(if (equal (car x) 'backup)
(nreverse (cdr (reverse (cdr x))))
x)
"")
;; With backup, last item is not part of date.
(if (equal (car x) 'backup)
(concat "\\)" (eval (car (reverse x))))
"\\)"))
'(1 'diary)))
diary-date-forms)))