[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Interactive function displaying face attributes
From: |
carlmarcos |
Subject: |
Interactive function displaying face attributes |
Date: |
Tue, 9 Aug 2022 20:24:21 +0200 (CEST) |
I am writing this function to display face attributes. The function works
interactively accepting a string from the user obtained from `completing-read'.
For `char-after-point' I want to display the face attribute of the character
after point. Having seen that there can be more than one face at point, what
can I do?
(defun descface (face)
"Describe the typeface properties of FACE."
(interactive
(list
(let* ( (cseq '("char-after-point" "mode-line-inactive" "mode-line"
"default")) )
(completing-read "Face: " cseq nil t "mode-line"))))
(cond ((equal face "char-after-point")
(plist-get (text-properties-at (point)) 'face))
(t (describe-face face)))
- Interactive function displaying face attributes,
carlmarcos <=
- Re: Interactive function displaying face attributes, Eli Zaretskii, 2022/08/09
- Re: Interactive function displaying face attributes, carlmarcos, 2022/08/09
- Re: Interactive function displaying face attributes, Eli Zaretskii, 2022/08/09
- Message not available
- Re: Interactive function displaying face attributes, carlmarcos, 2022/08/09
- Re: Interactive function displaying face attributes, Eli Zaretskii, 2022/08/09
- Re: Interactive function displaying face attributes, carlmarcos, 2022/08/09
- Re: Interactive function displaying face attributes, Eli Zaretskii, 2022/08/10