[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Handling non-interactive use with faces
From: |
carlmarcos |
Subject: |
Re: Handling non-interactive use with faces |
Date: |
Thu, 11 Aug 2022 17:56:23 +0200 (CEST) |
Aug 10, 2022, 17:23 by help-gnu-emacs@gnu.org:
> 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))) )
>
------- Original Message -------
On Wednesday, August 10th, 2022 at 5:36 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> You need to add a pcase alternative for a face or face name, and then
> you call your function with that face as a single argument.
I am struggling to figure out what kind of `pcase' I should use for the scheme
you suggest.
- Handling non-interactive use with faces, carlmarcos, 2022/08/10
- Re: Handling non-interactive use with faces, Eli Zaretskii, 2022/08/10
- Message not available
- Re: Handling non-interactive use with faces,
carlmarcos <=
- Re: Handling non-interactive use with faces, Eli Zaretskii, 2022/08/11
- Re: Handling non-interactive use with faces, carlmarcos, 2022/08/11
- Re: Handling non-interactive use with faces, Eli Zaretskii, 2022/08/11
- Re: Handling non-interactive use with faces, carlmarcos, 2022/08/11
- Re: Handling non-interactive use with faces, Michael Heerdegen, 2022/08/12
- Re: Handling non-interactive use with faces, carlmarcos, 2022/08/12
- Re: Handling non-interactive use with faces, Michael Heerdegen, 2022/08/12
- Re: Handling non-interactive use with faces, uzibalqa, 2022/08/12
- Re: Handling non-interactive use with faces, Michael Heerdegen, 2022/08/12
- Re: Handling non-interactive use with faces, uzibalqa, 2022/08/12