Function: org--plot/merge-alists
org--plot/merge-alists is a byte-compiled function defined in
org-plot.el.gz.
Signature
(org--plot/merge-alists FUNCTION DEFAULT ALIST1 ALIST2 &rest ALISTS)
Documentation
Using FUNCTION, combine the elements of ALIST1, ALIST2 and any other ALISTS.
When an element is only present in one alist, DEFAULT is used as the second argument for the FUNCTION.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-plot.el.gz
(defun org--plot/merge-alists (function default alist1 alist2 &rest alists)
"Using FUNCTION, combine the elements of ALIST1, ALIST2 and any other ALISTS.
When an element is only present in one alist, DEFAULT is used as the second
argument for the FUNCTION."
(when (> (length alists) 0)
(setq alist2 (apply #'org--plot/merge-alists function default alist2 alists)))
(cl-flet ((keys (alist) (mapcar #'car alist))
(lookup (key alist) (or (cdr (assoc key alist)) default)))
(cl-loop with keys = (cl-union (keys alist1) (keys alist2) :test 'equal)
for k in keys collect
(cons k (funcall function (lookup k alist1) (lookup k alist2))))))