doom/what-face: return list noninteractively

This commit is contained in:
Henrik Lissner 2017-06-08 02:04:45 +02:00
parent 655e565fe0
commit b4986e908a

View file

@ -13,11 +13,13 @@
(let ((face (overlay-get ov 'face))) (let ((face (overlay-get ov 'face)))
(dolist (f (if (listp face) face (list face))) (dolist (f (if (listp face) face (list face)))
(push (propertize (concat (symbol-name f) "*") 'face f) faces)))) (push (propertize (concat (symbol-name f) "*") 'face f) faces))))
(if (called-interactively-p 'any)
(message "%s %s" (message "%s %s"
(propertize "Faces:" 'face 'font-lock-comment-face) (propertize "Faces:" 'face 'font-lock-comment-face)
(if faces (string-join faces ", ") "n/a")))) (if faces (string-join faces ", ") "n/a"))
(mapcar #'substring-no-properties faces))))
;;;###autoload
(defun doom-active-minor-modes () (defun doom-active-minor-modes ()
"Get a list of active minor-mode symbols." "Get a list of active minor-mode symbols."
(cl-remove-if (lambda (m) (and (boundp m) (symbol-value m))) (cl-remove-if (lambda (m) (and (boundp m) (symbol-value m)))