org-plot.el: add missing cl- prefixes

* lisp/org-plot.el ( org--plot/merge-alists, org--plot/item-frequencies,
org--plot/prime-factors): Add missing cl- prefic to cl-lib functions
called.
(org--plot/radar): Refactor f function to remove dependency.
(org--plot/values-stats, org--plot/nice-frequency-pick): Autoformatting.
This commit is contained in:
TEC 2020-10-25 01:43:01 +08:00 committed by Bastien
parent c2fdf424a6
commit a46cadfae3

View file

@ -261,9 +261,9 @@ values, namely regarding the range."
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)))
(flet ((keys (alist) (mapcar #'car alist))
(cl-flet ((keys (alist) (mapcar #'car alist))
(lookup (key alist) (or (cdr (assoc key alist)) default)))
(loop with keys = (union (keys alist1) (keys alist2) :test 'equal)
(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))))))
@ -283,7 +283,7 @@ only present in one alist, DEFAULT is used as the second argument for the FUNCTI
(setq value (/ value i))
(setq i (1- i))
))
(subseq factors 0 -1)))
(cl-subseq factors 0 -1)))
(defcustom org-plot/gnuplot-script-preamble ""
"String or function which provides content to be inserted into the GNUPlot
@ -500,8 +500,8 @@ EOD
)))
table)))
(setup-file (make-temp-file "org-plot-setup")))
(f-write-text (format org--plot/radar-setup-template data settings)
'utf-8 setup-file)
(let ((coding-system-for-write 'utf-8))
(write-region (format org--plot/radar-setup-template data settings) nil setup-file nil :silent))
(format org--plot/radar-template
setup-file
(if (eq ticks 0) 2 ticks)