Subject: bug#23574: 24.5; Overzealous underlining in emacs-nox

From: Eli Zaretskii <[email-masked]>
Date: Tue, 07 Jun 2016 18:50:25 +0300

> Date: Tue, 07 Jun 2016 11:10:30 +0200
> From: martin rudalics <[email-masked]>
> CC: [email-masked], [email-masked], 
>  [email-masked], [email-masked]
> 
> (defcustom face-extend-to-window-edge nil
>    "Non-nil means extend face of last character on line to window edge.
> This variable specifies whether the space following the last
> character on a line is decorated using properties of that
> character.  nil means do not extend any properties of that
> character.  t means extend all properties of that character.
> 
> A property list means to determine the value of any such property
> from that list. If a property is not on that list, that property
> is not extended.  The special value 'inherit' means to inherit
> the value for that property from the last character on the line.
> A function specifies the function to return the value of that
> property.  Any other value means to extend that as value for that
> property.")

Talk about over-specification ;-)

I hope you realize how some of that will make redisplay much more
expensive?

How about the following more modest alternative?

(defcustom face-extend-to-window-edge t
   "Non-nil means extend face of last character on line to window edge.

Certain face attributes, if present in the face of the last character
of a line and different from those of the default face, cause the
empty space following the end of text on the line to be drawn with
those attributes, to give the empty space appearance similar to that
of the preceding text.  These attributes are those which affect the
background of a face: `:background', `:stipple', `:box', `:underline',
`:overline', and `:strike-through'.  By default, if the face of a
line's last character has any of these attributes, and the value is
different from that of the default face, the empty space following the
line's text will be drawn in the face of the last character.

This variable allows fine-tuning which attributes trigger the face
extension.  The default value of t means any of the mentioned
attributes will cause face extension.  The value of nil means face
extension is turned off.  A value that is a list of attributes will
extend the face only if any of the attributes from the list are
present in the last character's face.  Note that only attributes from
the above list are meaningful in list values of this variable.")