all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.