With C-u, doom/what-face doesn't fontify results
In case you get a face that's too hard to see.
This commit is contained in:
parent
60e7b78739
commit
4d5a247d53
1 changed files with 5 additions and 4 deletions
|
@ -183,12 +183,12 @@ selection of all minor-modes, active or not."
|
||||||
((error "Expected a symbol/string, got a %s" (type-of mode))))))
|
((error "Expected a symbol/string, got a %s" (type-of mode))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/what-face (&optional pos)
|
(defun doom/what-face (arg &optional pos)
|
||||||
"Shows all faces and overlay faces at point.
|
"Shows all faces and overlay faces at point.
|
||||||
|
|
||||||
Interactively prints the list to the echo area. Noninteractively, returns a list
|
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."
|
whose car is the list of faces and cadr is the list of overlay faces."
|
||||||
(interactive)
|
(interactive "P")
|
||||||
(let* ((pos (or pos (point)))
|
(let* ((pos (or pos (point)))
|
||||||
(faces (let ((face (get-text-property pos 'face)))
|
(faces (let ((face (get-text-property pos 'face)))
|
||||||
(if (keywordp (car-safe 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)
|
(propertize "Faces:" 'face 'font-lock-comment-face)
|
||||||
(if faces
|
(if faces
|
||||||
(cl-loop for face in faces
|
(cl-loop for face in faces
|
||||||
if (listp face)
|
if (or (listp face) arg)
|
||||||
concat (format "'%s " face)
|
concat (format "'%s " face)
|
||||||
else
|
else
|
||||||
concat (concat (propertize (symbol-name face) 'face face) " "))
|
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)
|
(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) " "))
|
if arg concat (concat (symbol-name ov) " ")
|
||||||
|
else concat (concat (propertize (symbol-name ov) 'face ov) " "))
|
||||||
"n/a")))
|
"n/a")))
|
||||||
(t
|
(t
|
||||||
(and (or faces overlays)
|
(and (or faces overlays)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue