emacs-devel
[Top][All Lists]
Advanced

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

Re: Question: add-face-text-property for 'font-lock-face?


From: Clément Pit-Claudel
Subject: Re: Question: add-face-text-property for 'font-lock-face?
Date: Sun, 29 Aug 2021 12:13:11 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/29/21 12:13 AM, Qiantan Hong wrote:
> Users of crdt.el report that crdt-visualize-author-mode (which use 
> font-lock-face to color code author of texts)
> conflict with faces from other modes. Apparently there are more than 1 mode 
> which sets this text property.
> 
> Is there some way to add-face-text-property to 'font-lock-face property, 
> i.e. adding new face attributes instead of overwriting any existing face?
> add-face-text-property doesn’t seem to work because 'font-lock-face will just 
> override ‘face.

You want font-lock-append-text-property, I think:

  (font-lock-append-text-property START END PROP VALUE &optional OBJECT)

  Append to one property of the text from START to END.
  Arguments PROP and VALUE specify the property and value to append to the value
  already in place.  The resulting property values are always lists.
  Optional argument OBJECT is the string or buffer containing the text.




reply via email to

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