Permalink
Browse files

Add interactive what-face function to get font

  • Loading branch information...
1 parent 9fe63a9 commit 75a6772189c0158b52f70132804b5e5f636ce34e @mshroyer committed May 31, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 init.el
View
@@ -1050,6 +1050,14 @@ future."
(beginning-of-buffer))
+;; Yoinked from http://stackoverflow.com/questions/1242352/get-font-face-under-cursor-in-emacs
+(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))))
+
+
;; Generate tags for directory with Exuberant Ctags
(defun create-tags (dir-name)
"Create tags file with Exuberant Ctags."

0 comments on commit 75a6772

Please sign in to comment.