From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Merging the underline attribute at EOL Date: Mon, 16 Dec 2019 17:11:04 +0100 Message-ID: <20191216161104.767sfxj7taabs5jl@Ergus> References: <83eex771ky.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="38128"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 17:12:22 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igsyr-0009nl-96 for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2019 17:12:21 +0100 Original-Received: from localhost ([::1]:56314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igsyp-0001UE-UH for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2019 11:12:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48633) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igsy1-0000ds-0S for emacs-devel@gnu.org; Mon, 16 Dec 2019 11:11:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igsxz-0002U7-N4 for emacs-devel@gnu.org; Mon, 16 Dec 2019 11:11:28 -0500 Original-Received: from sonic315-13.consmr.mail.bf2.yahoo.com ([74.6.134.123]:46213) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igsxz-0002SW-I5 for emacs-devel@gnu.org; Mon, 16 Dec 2019 11:11:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1576512685; bh=JD+O/IMeCmufacb5rxbZEzdrakZHoixlM1Ew2+nu8lQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=ptk0qQpZfc4+m/JwgcXV9JpHLpmNvfDZJtC74uCSI9gDzQZMNdCOl0xjR07OvGaVEJzeHo4Q8Bgc4f9MBm8ibc6SD0vQkST+0Ntgls/C6O/64sKmIbiccHLJOScsYG1/8GgJ9jOsrkQ4iu3oRfQjoOpvRUhRpjFiFGMS4rLbD4Igau0IMk9IdCSYYlZwCiwOcC8INhOLQTu2cE/4uCrKRLqpMdl7WFyaMP2igtfuJtz2pN0CFe/A7vGjHFW5NXfmz0S0taf9YSDs+yH2NX0rFJb16FZNLHkoO125/301Mg8tBAJESDxCCAbDjCmelnZuByy7/8H3UlvncGcNt2nkzg== X-YMail-OSG: 1tWkZ3YVM1loxzxvlUlkRngrlktFZTBMkmWQUXN8gdgkS0TIgTHGCRcBhytU0pE 1IY8NTDKc2ybTSpOKtDtPNHmZz9ZMp2rqV0rU1AY6rZg7M_Op8rSkhXOKd_ItZoHVbD04QDtn2y3 Vk7lFN_a2EnVbfYy0AnBO_9fDKXpnyCnosZDB.6eJb8272d6yt3pL5BrEzdnxyv_j6TZbtTJ05fo 3kbG49WJ24k7xvPitDlIesMt2YcpdeLfZAykFb1l.MjgO2yySxbesVTWCgeya63kXf0cNHGiE2y7 w2YF9r18UFbp0C3P1HJKxvPPvLj7yrU2OD.aANWVmrGBhntBXxVNfvaOkSQK4MSAdHtnJ0PcLZwm gGF4KPjtZrYVJUYc_xFUmvtOSUlZUA.fCXa7YUmqP2cuaqoFnbpcVwd4nlRSZPUrcaLgAN3PlEOk XnIamdizXVvmfhthV3XstsRu0cRnVluzEmWbEjj9jUT_CgqyRONx4RQ7dcdIsytthZACwkbwTgdE nRviFiQvD10g46uQtJ.q7JJI1q7YQDKy2spT6mf9QEd_Q8KNBgDQp5dzJWqdDsy29ZlIaHAPVY6w KuLoRd9RIC7Xee_Jh6OCom2mX.9OWC5hrenkYvPGkJ3MB354WA.wvxRfM6I.Dm3kf31PaeOqxfnJ kdfOYarpUSBNqBYgZl7JVnTjmKxw37v1wYACXnwsTFApbjVCoR8DooTyelYcYiH7UP2wU.Nix.xz HjQCshz9k1zCUSf1FHCyCA3ZwWE6sKClyKyq4vB62OtOi8.5b.omHJU7IvPd3vDNoZJwoPoP0n4C oXGXNIjBityXB67JAiOOsfBfxu6Rcsiz.rbzh4iwcD Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Mon, 16 Dec 2019 16:11:25 +0000 Original-Received: by smtp429.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 81d1e3a139efebf05d9cca1b9159449a; Mon, 16 Dec 2019 16:11:24 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83eex771ky.fsf@gnu.org> X-Mailer: WebService/1.1.14728 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_181) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.6.134.123 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243416 Archived-At: Hi Eli: On the current master I can't reproduce the issue anymore. I don't remember where was my last built master before. Did you fixed this? On Sat, Dec 14, 2019 at 10:28:45AM +0200, Eli Zaretskii wrote: >Jimmy, > >The current code in extend_face_to_end_of_line says: > > /* Face extension extends the background and box of IT->extend_face_id > to the end of the line. If the background equals the background > of the frame, we don't have to do anything. */ > struct face *face = FACE_FROM_ID (f, (it->face_before_selective_p > ? it->saved_face_id > : extend_face_id)); > > if (FRAME_WINDOW_P (f) > && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row) > && face->box == FACE_NO_BOX > && FACE_COLOR_TO_PIXEL (face->background, f) == FRAME_BACKGROUND_PIXEL (f) >#ifdef HAVE_WINDOW_SYSTEM > && !face->stipple >#endif > && !it->glyph_row->reversed_p > && !Vdisplay_fill_column_indicator) > return; > >This has the effect that the underline property is not extended past >EOL, and neither are overline and strike-through. Only the box >attribute is extended. Was this how we intended things to be, or is >this just an oversight? > >Currently, this creates some strange counter-intuitive effects. For >example, try this in "emacs -Q": > > C-p > M-x font-lock-mode RET > M-: (add-text-properties (point) (1+ (point)) '(face (:underline t :extend t))) RET > >You will see that the underline is limited only to the newline at >point, it is not extended to the edge of the window. But if you now >do this: > > C-SPC > C-n > >suddenly the entire last line is underlined, in addition to having the >background color from the region face. > >If you replace the :underline with :box in the above example, then the >last line has the box attribute extended to EOL even before setting >the region, as expected. > >So I think this is a bug, and we should add conditions to the above >'if' clause. Am I missing something? >