fixup! Fix doom/what-face not handling face plist specs

This commit is contained in:
Henrik Lissner 2017-06-10 16:10:59 +02:00
parent d9e422d64a
commit de8269acf8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -2,7 +2,10 @@
;;;###autoload ;;;###autoload
(defun doom/what-face (&optional pos) (defun doom/what-face (&optional pos)
"Lists all faces at point. Overlay faces are denoted with an asterix." "Shows all faces and overlay faces at point.
Interactively prints the list to the echo area. Noninteractively, returns a list
whose car is the list of faces and cadr is the list of overlay faces."
(interactive) (interactive)
(unless pos (unless pos
(setq pos (point))) (setq pos (point)))
@ -17,7 +20,7 @@
collect f)))) collect f))))
(cond ((called-interactively-p 'any) (cond ((called-interactively-p 'any)
(message "%s %s; %s" (message "%s %s\n%s %s"
(propertize "Faces:" 'face 'font-lock-comment-face) (propertize "Faces:" 'face 'font-lock-comment-face)
(if faces (if faces
(cl-loop for face in faces (cl-loop for face in faces
@ -26,6 +29,7 @@
else else
concat (concat (propertize (symbol-name face) 'face face) " ")) concat (concat (propertize (symbol-name face) 'face face) " "))
"n/a ") "n/a ")
(propertize "Overlays:" 'face 'font-lock-comment-face)
(if overlays (if overlays
(cl-loop for ov in overlays (cl-loop for ov in overlays
concat (concat (propertize (symbol-name ov) 'face ov) " ")) concat (concat (propertize (symbol-name ov) 'face ov) " "))