How can I pass the face to describe-face
when using the function interactively?
(defun laxy-describe-face (face)
"TODO"
(interactive
(list
(let* ( (cseq '("mode-line-inactive" "mode-line")) )
(completing-read "Face: " cseq nil t "mode-line"))))
(describe-face 'face))
'face
completing-read
only get me a string and might need a form ofintern
call?(describe-face "modeline-inactive")
and(describe-face 'mode-line-inactive)
both work:describe-face
does the interning if necessary. You can look at the code and see for yourself:C-h f describe-face
and then click on the source link at the end of the first sentence in the*Help*
buffer.C-h f describe-face
which says the argument has to beFACE
.if (stringp f) (setq f (intern f)))
: yup, that's it.