unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Handling non-interactive use with faces
@ 2022-08-10 17:23 carlmarcos--- via Users list for the GNU Emacs text editor
  2022-08-10 17:36 ` Eli Zaretskii
       [not found] ` <N97m-43--3-2@tutanota.com-N97nByi--3-2>
  0 siblings, 2 replies; 14+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-08-10 17:23 UTC (permalink / raw)
  To: Help Gnu Emacs

How can this function be made to handle the case of non-interactive use to pass a face for displaying its properties?


(defun laxy-descface (facenm)
  "Describe the typeface properties of face name FACENM."

  (interactive
   (list
    (let* ( (cseq '("default" "mode-line" "mode-line-inactive"
    "list" "text-property")) )
      (completing-read "Face_property: " cseq nil t "text-property"))))

  (pcase facenm
    ("text-property"
        (describe-face (get-text-property (point) 'face)))
    ("default"
        (describe-face (intern facenm)))
    ("mode-line"
        (describe-face (intern facenm)))
    ("mode-line-inactive"
        (describe-face (intern facenm)))
    ("list"
        (list-faces-display))) )




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

end of thread, other threads:[~2022-08-13  5:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 17:23 Handling non-interactive use with faces carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-10 17:36 ` Eli Zaretskii
     [not found] ` <N97m-43--3-2@tutanota.com-N97nByi--3-2>
2022-08-11 15:56   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-11 16:08     ` Eli Zaretskii
2022-08-11 18:32       ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-11 18:42         ` Eli Zaretskii
2022-08-11 19:47           ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-12  4:29             ` Michael Heerdegen
2022-08-12  4:34               ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-12 21:43                 ` Michael Heerdegen
2022-08-12 21:47                   ` uzibalqa
2022-08-12 23:17                     ` Michael Heerdegen
2022-08-12 23:57                       ` uzibalqa
2022-08-13  5:00                     ` tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).