I just started using Emacs for the specific purpose of editing latex documents. I was attracted to Emacs because I want to be able to customize syntax highlighting even before the color definition of specific words. I am new to Emacs, not a programmer, so I have extreme difficulty in doing what I want to do, because most of the help I find involves too much knowledge for my level (it took me days to be able to install emacs + auctex and change the first complexion).
I found something that I think will help me, but I donβt know how to do it. The message below is what I want to do, but what should I do with this code? Where should I insert it or where to enter it? I am using GNU Emacs on Windows. Thank you so much for your help :)
Mx what-face
prints the face found at the current point. And the code for this:
(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))))
By the way, I found this in another post that can be found here: Get the font under the cursor in Emacs
source share