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

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

bug#14645: Keep highlighting face foreground


From: Lars Ingebrigtsen
Subject: bug#14645: Keep highlighting face foreground
Date: Thu, 13 Aug 2020 13:27:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <juri@jurta.org> writes:

> Now that we have a new function `add-face-text-property' it would be
> very useful for features that add faces with a different background
> to highlight matches.  For instance, `occur' uses `add-text-properties'
> to add the `match' face, but currently it removes foreground colors
> from the text copied from the fontified buffer.

[...]

> +                      '(occur-match t) curstring)
> +                     (when match-face
> +                       ;; Add `match-face' to faces copied from the buffer.
> +                       (add-face-text-property
> +                        (match-beginning 0) (match-end 0)
> +                        match-face nil curstring))

Looks like a variation of this has been applied already.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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