Starting on runtime errors, 2 immediate more to come

master
Brady McDonough 3 years ago
parent f46b9b41c0
commit c5bfdab476

@ -108,6 +108,8 @@
:group 'faces
:prefix "tacc-")
;; Font/face inheritance is not well described anywhere in the elisp programming manual
;; Check emacs user manual?
(defface tacc-graph-work
'((t (:inherit 'success)))
"For work graph bars"
@ -417,12 +419,16 @@ Note, if there is no tacc-buffer then you shouldn't be touching tacc-info"
(+ len (if (<= ticker rem) 1 0)))))
(defun gradient-string (width chars)
(mapconcat (let ((ticker 0))
(lambda (c) (let ((rem (mod width (length chars)))
(len (/ width (length chars))))
(make-string (progn (setf ticker (1+ ticker))
(+ len (if (<= ticker rem) 1 0)))
c))))
;; ERROR: If I'm not mistaken mapconcat internally uses a call to eval
;; In order for eval to respect lexical binding rules rather than dynamic ones
;; it requires an optional argument to enable the feature.
;; A look at the source is required and maybe a less "clever" solution should be found
(mapconcat (let ((ticker 0)
(rem (mod width (length chars)))
(len (/ width (length chars))))
(lambda (c)
(make-string (+ len (if (<= (setq ticker (1+ ticker)) rem) 1 0))
c)))
chars ""))
(defun tacc-header-render (width)

Loading…
Cancel
Save