From 4d5a247d53d5403b3852708af3b4117210320ae3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 15 Jun 2018 18:50:45 +0200 Subject: [PATCH] With C-u, doom/what-face doesn't fontify results In case you get a face that's too hard to see. --- core/autoload/help.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 7417800be..be4361f00 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -183,12 +183,12 @@ selection of all minor-modes, active or not." ((error "Expected a symbol/string, got a %s" (type-of mode)))))) ;;;###autoload -(defun doom/what-face (&optional pos) +(defun doom/what-face (arg &optional pos) "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 "P") (let* ((pos (or pos (point))) (faces (let ((face (get-text-property pos 'face))) (if (keywordp (car-safe face)) @@ -201,7 +201,7 @@ whose car is the list of faces and cadr is the list of overlay faces." (propertize "Faces:" 'face 'font-lock-comment-face) (if faces (cl-loop for face in faces - if (listp face) + if (or (listp face) arg) concat (format "'%s " face) else concat (concat (propertize (symbol-name face) 'face face) " ")) @@ -209,7 +209,8 @@ whose car is the list of faces and cadr is the list of overlay faces." (propertize "Overlays:" 'face 'font-lock-comment-face) (if overlays (cl-loop for ov in overlays - concat (concat (propertize (symbol-name ov) 'face ov) " ")) + if arg concat (concat (symbol-name ov) " ") + else concat (concat (propertize (symbol-name ov) 'face ov) " ")) "n/a"))) (t (and (or faces overlays)