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

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

bug#26909: 25.1; A face for margins


From: Yuri Khan
Subject: bug#26909: 25.1; A face for margins
Date: Sat, 13 May 2017 21:59:29 +0700

On Sat, May 13, 2017 at 9:27 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> A face can only affect places where something is displayed using that
> face.  Display margins only display text if the buffer specifies text
> properties or overlays which display in the margins.  But what you
> would like to do calls for having a face that would affect screen
> space where _nothing_ is displayed, and such screen space in Emacs is
> always displayed using the frame's background color, not by using some
> face.
>
> You could specify a light gray background color for the frame, and
> another color for the default face, but I think this would cause
> unpleasant effects elsewhere on display, e.g. in the text area beyond
> EOB.

That might in fact work for me. However, I do not seem to be able to do that.

(linum-mode) ^X^E
(set-frame-parameter nil 'background-color "gray95") ^X^E

* The backgrounds of both the margin and the buffer turn light gray.

(set-face-background 'default "white") ^X^E

* The backgrounds of both the buffer and the margin turn back to white.

Indeed, (elisp) Font and Color Parameters says:

| ‘background-color’
|      The color to use for the background of characters.  It is
|      equivalent to the ‘:background’ attribute of the ‘default’ face.

So the ‘default’ face is already special in that its :background is
used to draw the frame background. The proposed new face could be also
special that way.

(If by “background color for the frame” you meant something other than
the ‘background-color’ frame parameter, please point me to it.)





reply via email to

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