unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using function passing face non-interactively
@ 2022-08-10  1:55 carlmarcos--- via Users list for the GNU Emacs text editor
  2022-08-10 12:34 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-08-10  1:55 UTC (permalink / raw)
  To: Help Gnu Emacs


I have the following function that works well in an interactive way.  What changes are needed to make the function works non-interactively as well?

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

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

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



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

* Re: Using function passing face non-interactively
  2022-08-10  1:55 Using function passing face non-interactively carlmarcos--- via Users list for the GNU Emacs text editor
@ 2022-08-10 12:34 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2022-08-10 12:34 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 10 Aug 2022 03:55:15 +0200 (CEST)
> From: carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> 
> 
> I have the following function that works well in an interactive way.  What changes are needed to make the function works non-interactively as well?

Why do you think you need any changes for that?  What goes wrong if
you use it non-interactively?



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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10  1:55 Using function passing face non-interactively carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-10 12:34 ` Eli Zaretskii

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