unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Using function passing face non-interactively
Date: Wed, 10 Aug 2022 03:55:15 +0200 (CEST)	[thread overview]
Message-ID: <N94N2l5--3-2@tutanota.com> (raw)


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



             reply	other threads:[~2022-08-10  1:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10  1:55 carlmarcos--- via Users list for the GNU Emacs text editor [this message]
2022-08-10 12:34 ` Using function passing face non-interactively Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=N94N2l5--3-2@tutanota.com \
    --to=help-gnu-emacs@gnu.org \
    --cc=carlmarcos@tutanota.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).