unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org
Subject: bug#11068: 24.0.94; Face-remapped background does not extend to end of window
Date: Sun, 25 Mar 2012 14:54:12 +0200	[thread overview]
Message-ID: <4F6F1574.2090904@gmx.at> (raw)
In-Reply-To: <83wr69sp4e.fsf@gnu.org>

 >> But the same holds for the current patch as well: You simply fill up
 >> the rest of the window with the background of the remapped default
 >> face.
 >
 > No, not only background.  The entire face with all its attributes is
 > used.  E.g., stipple (which doesn't work on MS-Windows), font
 > (i.e. the size of each line in pixels), etc.
 >
 > And you cannot "fill the rest of the window" with some color, at least
 > not on the device-independent level of the display engine where I made
 > the changes.  The only way the display engine can dictate colors (and
 > other face attributes) is by creating glyphs which have these
 > attributes and adding those glyphs to the current glyph matrix.
 >
 > What the changes I suggested do is add stretch glyphs of a suitably
 > computed width to each glyph row that has no text in it.  The changes
 > are small because the code that does that was already written for the
 > bidirectional display, which needs to display R2L lines flushed all
 > the way to the right margin of the window; it does that by prepending
 > such a stretch glyph to the R2L glyph rows, ahead (i.e to the left) of
 > the text.  All I needed was to activate that code for the case of
 > remapped default face, in addition to R2L lines.

Consider the following example: In my .emacs I do for ages

(custom-set-faces
  '(font-lock-comment-face ((((class color) (background light)) (:background "Beige" :foreground "Black")))))

Evaluate this form with emacs -Q in *scratch* and you will see that the
background color extends from each buffer line end to the right window
edge.  This is butt ugly (and incorrect IMHO) and I had to write my own
`font-lock-fontify-syntactically-region' function in order to remove the
face property from the return character but I disgress ...

Anyway, my conclusion from this example is that even in normal L2R text
Emacs somehow constructs a stretch glyph (or whatever else) to simulate
the effect of text properties over some virtual text.  I assume that
your solution does something equivalent for every virtual buffer line
that is missing down to the bottom of the window.  And it takes the face
property not from the return character but from the remapped default
face.  Apart from that why do you need a solution from R2L lines here?

As an aside I earlier tried to achieve the effect of your patch by
adding an overlay with an after-string containing an appropriate number
of return characters to the last character of each buffer.  It didn't
work and I still consider that a bug.

martin





  reply	other threads:[~2012-03-25 12:54 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 20:49 bug#11068: 24.0.94; Face-remapped background does not extend to end of window Ivan Andrus
     [not found] ` <handler.11068.B.13324512277363.ack@debbugs.gnu.org>
2012-03-22 21:18   ` bug#11068: Acknowledgement (24.0.94; Face-remapped background does not extend to end of window) Ivan Andrus
2012-03-22 21:33     ` Glenn Morris
2012-03-22 21:31 ` bug#11069: 24.0.94; Face-remapped background does not extend to end of window Glenn Morris
2012-03-23 10:36 ` bug#11068: " Eli Zaretskii
2012-03-23 10:48   ` Ivan Andrus
2012-03-24 12:37   ` Eli Zaretskii
2012-03-24 13:42     ` martin rudalics
2012-03-24 14:12       ` Eli Zaretskii
2012-03-24 19:48         ` martin rudalics
2012-03-24 20:47           ` Eli Zaretskii
2012-03-25 12:54             ` martin rudalics [this message]
2012-03-25 17:22               ` Eli Zaretskii
2012-03-25 19:19                 ` martin rudalics
2012-03-25 19:53                   ` Stefan Monnier
2012-03-25 20:44                     ` martin rudalics
2012-03-25 21:49                   ` Eli Zaretskii
2012-03-25 21:53                     ` Eli Zaretskii
2012-03-26  7:05                     ` martin rudalics
2012-03-26 19:32                       ` Eli Zaretskii
2012-03-27  9:23                         ` martin rudalics
2012-03-27 18:40                           ` Eli Zaretskii
2012-03-30  7:35                             ` martin rudalics
2012-03-30  8:18                               ` Eli Zaretskii
2012-03-30 10:14                                 ` martin rudalics
2012-03-30 11:42                                   ` Eli Zaretskii
2012-03-31 10:29                                     ` Eli Zaretskii
2012-03-30 10:47                                 ` martin rudalics
2012-03-24 18:04       ` Stefan Monnier
2012-03-24 19:48         ` martin rudalics
2012-03-24 14:17     ` Chong Yidong
2012-03-24 14:40       ` Eli Zaretskii
2012-03-25  3:01         ` Chong Yidong
2012-03-25  4:02           ` Eli Zaretskii
2012-03-25  6:20             ` Chong Yidong
2012-03-25 12:55               ` martin rudalics
2012-03-25 17:26                 ` Eli Zaretskii
2012-03-25 19:20                   ` martin rudalics
2012-03-25 17:51               ` Eli Zaretskii
2012-03-26  4:16                 ` Chong Yidong
2012-03-26 19:35                   ` Eli Zaretskii
2012-03-30  8:49                   ` Eli Zaretskii
2012-03-25 12:54             ` martin rudalics
2012-03-25 17:25               ` Eli Zaretskii
2012-03-25 19:19                 ` martin rudalics
2012-03-25 21:50                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F6F1574.2090904@gmx.at \
    --to=rudalics@gmx.at \
    --cc=11068@debbugs.gnu.org \
    --cc=darthandrus@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).