Function: calendar-make-alist
calendar-make-alist is a byte-compiled function defined in
calendar.el.gz.
Signature
(calendar-make-alist SEQUENCE &optional START-INDEX FILTER &rest SEQUENCES)
Documentation
Return an association list corresponding to SEQUENCE.
Associates each element of SEQUENCE with an incremented integer, starting from START-INDEX (default 1). Applies the function FILTER, if provided, to each key in the alist. Repeats the process, with indices starting from START-INDEX each time, for any remaining arguments SEQUENCES.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defun calendar-make-alist (sequence &optional start-index filter
&rest sequences)
"Return an association list corresponding to SEQUENCE.
Associates each element of SEQUENCE with an incremented integer,
starting from START-INDEX (default 1). Applies the function FILTER,
if provided, to each key in the alist. Repeats the process, with
indices starting from START-INDEX each time, for any remaining
arguments SEQUENCES."
(or start-index (setq start-index 1))
(let (index alist)
(mapc (lambda (seq)
(setq index start-index)
(mapc (lambda (elem)
(setq alist (cons
(cons (if filter (funcall filter elem) elem)
index)
alist)
index (1+ index)))
seq))
(append (list sequence) sequences))
(reverse alist)))