Minor refactor of doom/describe-active-minor-mode

This commit is contained in:
Henrik Lissner 2018-06-15 18:32:53 +02:00
parent 4d017ae19e
commit 60e7b78739
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -176,13 +176,11 @@ current file is in, or d) the module associated with the current major mode (see
"Get information on an active minor mode. Use `describe-minor-mode' for a
selection of all minor-modes, active or not."
(interactive
(list (completing-read "Minor mode: "
(doom-active-minor-modes))))
(list (completing-read "Minor mode: " (doom-active-minor-modes))))
(describe-minor-mode-from-symbol
(cl-typecase mode
(string (intern mode))
(symbol mode)
(t (error "Expected a symbol/string, got a %s" (type-of mode))))))
(cond ((stringp mode) (intern mode))
((symbolp mode) mode)
((error "Expected a symbol/string, got a %s" (type-of mode))))))
;;;###autoload
(defun doom/what-face (&optional pos)