Use --map instead of mapcar in modules/modeline

This commit is contained in:
Wojciech Kozlowski 2019-12-18 22:53:16 +01:00
parent f96aeffbef
commit 71efbad2de

View File

@ -76,17 +76,14 @@
"Return the currently active eyebrowse workspace." "Return the currently active eyebrowse workspace."
(if (bound-and-true-p eyebrowse-mode) (if (bound-and-true-p eyebrowse-mode)
(let* ((cur (eyebrowse--get 'current-slot)) (let* ((cur (eyebrowse--get 'current-slot))
(all (mapcar 'car (eyebrowse--get 'window-configs))) (all (--map (car it) (eyebrowse--get 'window-configs)))
strs) (str (--map (if (= cur it)
(setq strs (propertize (int-to-string it)
(mapcar (lambda (el) 'face
(if (= cur el) 'eyebrowse-mode-line-active)
(propertize (int-to-string el) (int-to-string it))
'face all)))
'eyebrowse-mode-line-active) (apply 'concat str))
(int-to-string el)))
all))
(apply 'concat strs))
"")) ""))
(doom-modeline-def-segment emodule/modeline-eyebrowse-segment (doom-modeline-def-segment emodule/modeline-eyebrowse-segment