[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffer-face-set changes the fringe, is it a bug?
From: |
Eli Zaretskii |
Subject: |
Re: buffer-face-set changes the fringe, is it a bug? |
Date: |
Tue, 07 Jul 2020 21:34:32 +0300 |
> Date: Tue, 7 Jul 2020 17:47:55 +0200 (CEST)
> From: Gregory Heytings via "Emacs development discussions."
> <emacs-devel@gnu.org>
>
> > (set-face-attribute 'fringe nil :background "red")
> > (let ((o (make-overlay 0 1)) (s "_"))
> > (put-text-property 0 1 'display '(left-fringe question-mark) s)
> > (overlay-put o 'after-string s)
> > (set-face-foreground 'default "green"))
> >
>
> Why did you change my code, which demonstrated the problem, into another
> one which indeed does not show the problem?
Because I tried to explain something, in the text that you removed.
> Try this:
>
> (set-face-attribute 'fringe nil :background "red" :foreground "blue")
> (let ((o (make-overlay 0 1)) (s "_"))
> (put-text-property 0 1 'display '(left-fringe question-mark) s)
> (overlay-put o 'after-string s))
> (progn (set-face-background 'default "yellow") (set-face-foreground 'default
> "red")) [1]
> (face-remap-add-relative 'default '(:background "yellow" :foreground "red"))
> [2]
>
> After [1] the behavior is what I expect: red on yellow in the buffer, blue
> on red in the fringe.
Certainly: since in this example the 'fringe' face defines both the
foreground and the background colors, none of the colors of the
'default' face show.
> After [2] the behavior is *not* what I expect anymore: red on yellow in
> the buffer, red on yellow for the question mark in the fringe (the other
> parts of the fringe remain red, and other bitmaps in the fringe, e.g.
> curly arrows, remain blue on a red background).
Because now what you call 'default' is not the original 'default'
face, it's a new face created by face-remapping machinery.
- Re: buffer-face-set changes the fringe, is it a bug?, (continued)
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/06
- Re: buffer-face-set changes the fringe, is it a bug?, Eli Zaretskii, 2020/07/06
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/06
- Re: buffer-face-set changes the fringe, is it a bug?, Eli Zaretskii, 2020/07/06
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/06
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/07
- Re: buffer-face-set changes the fringe, is it a bug?, Eli Zaretskii, 2020/07/07
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/07
- Re: buffer-face-set changes the fringe, is it a bug?,
Eli Zaretskii <=
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/07
- Re: buffer-face-set changes the fringe, is it a bug?, Eli Zaretskii, 2020/07/07
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/07
- Re: buffer-face-set changes the fringe, is it a bug?, Eli Zaretskii, 2020/07/07
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/08
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/08
- Re: buffer-face-set changes the fringe, is it a bug?, Eli Zaretskii, 2020/07/08
- Re: buffer-face-set changes the fringe, is it a bug?, Richard Stallman, 2020/07/08
- Re: buffer-face-set changes the fringe, is it a bug?, Gregory Heytings, 2020/07/09
- Re: buffer-face-set changes the fringe, is it a bug?, Eli Zaretskii, 2020/07/09