help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interactive function displaying face attributes


From: carlmarcos
Subject: Re: Interactive function displaying face attributes
Date: Tue, 9 Aug 2022 22:25:07 +0200 (CEST)

Aug 9, 2022, 19:32 by eliz@gnu.org:

>> Date: Tue, 9 Aug 2022 21:21:17 +0200 (CEST)
>> From: carlmarcos@tutanota.com
>> Cc: help-gnu-emacs@gnu.org
>>
>> Aug 9, 2022, 18:59 by eliz@gnu.org:
>>
>> What about face after point?  What could I call?  Same `describe-face'?
>>
>
> Yes, I think so.
>
>> And what would be the correct face name?
>>
>
> (get-text-property (point) 'face)
>
Eli, I have done the following

How can I fix the problem with using `describe-face' for "text-property"?

(defun laxy-descface (face)
  "Describe the typeface properties of FACE."

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

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]