[Top][All Lists]

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

Re: Question about font-lock faces

From: Lennart Borgman (gmail)
Subject: Re: Question about font-lock faces
Date: Thu, 01 Mar 2007 15:48:58 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061207 Thunderbird/ Mnenhy/

Chris McMahan wrote:
I've been using this one from Miles Bader for some time, and it works
quite well.

- Chris

(defun what-face (pos)
  "Return the font-lock face information at the current point
Thanks to Miles Bader <> for this ("
  (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))))

Nice, but (point) should be pos in the code above.

reply via email to

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