all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Interactive function displaying face attributes
@ 2022-08-09 18:24 carlmarcos--- via Users list for the GNU Emacs text editor
  2022-08-09 18:33 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-08-09 18:24 UTC (permalink / raw)
  To: Help Gnu Emacs


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)))



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-10 12:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-09 18:24 Interactive function displaying face attributes carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-09 18:33 ` Eli Zaretskii
2022-08-09 18:53   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-09 18:59     ` Eli Zaretskii
     [not found]     ` <83v8r1s0ow.fsf@gnu.org-N930CPX----2>
2022-08-09 19:21       ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-09 19:32         ` Eli Zaretskii
2022-08-09 20:25           ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-10 12:35             ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.