|
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:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 |
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 <miles-at-lsi.nec.co.jp> for this (gnus.emacs.help)" (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.
[Prev in Thread] | Current Thread | [Next in Thread] |