help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: face at point


From: Miles Bader
Subject: Re: face at point
Date: 15 Nov 2002 13:24:53 +0900

John Hunter <jdhunter@nitace.bsd.uchicago.edu> writes:
> Ie, how do I find out what face is responsible for a given segment of
> text in a given mode?

(defun what-face (pos)
  (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))))

-Miles
-- 
97% of everything is grunge




reply via email to

[Prev in Thread] Current Thread [Next in Thread]