what-face now ignores hl-line-mode face

This commit is contained in:
Henrik Lissner 2015-11-08 17:58:18 -05:00
parent 7bf3d49582
commit 860ca2d96c

View file

@ -4,9 +4,12 @@
(defun what-face (pos)
"Tells you the name of the face (point) is on."
(interactive "d")
(let ((face (or (get-char-property (point) 'read-face-name)
(get-char-property (point) 'face))))
(if face (message "Face: %s" face) (message "No face at %d" pos))))
(let ((hl-line-p hl-line-mode))
(if hl-line-p (hl-line-mode -1))
(let ((face (or (get-char-property (point) 'read-face-name)
(get-char-property (point) 'face))))
(if face (message "Face: %s" face) (message "No face at %d" pos)))
(if hl-line-p (hl-line-mode 1))))
;;;###autoload
(defun what-col ()