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 04:12:24 +0100 Message-ID: <20191216031224.tn4cuopxyjqlybq3@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="57377"; 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 04:13:15 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 1iggos-000EnW-PX for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2019 04:13:14 +0100 Original-Received: from localhost ([::1]:45696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iggoq-0003oP-Jy for ged-emacs-devel@m.gmane.org; Sun, 15 Dec 2019 22:13:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45167) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iggog-0003o4-9I for emacs-devel@gnu.org; Sun, 15 Dec 2019 22:13:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iggoe-0000eO-Sa for emacs-devel@gnu.org; Sun, 15 Dec 2019 22:13:01 -0500 Original-Received: from sonic306-3.consmr.mail.bf2.yahoo.com ([74.6.132.42]:44664) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iggob-0000Zg-5z for emacs-devel@gnu.org; Sun, 15 Dec 2019 22:12:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1576465974; bh=8Lz+lqU26I+XJVDPyKuN6cBtywtLi0fqZbRdyZJUShE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=uC5jRQGFCQtvkb6I0TT/FKXZge9ztRrK4d32FWMAEY8Gp/0kLbpKNjG0KszUQDZSw1WXGJY7pGwdXraTdovMKqjL1Cw3qcWlKg0bmKHC3wzSe5VqRSzQxxvvGZWbMKTTbM68RCTKAXHD1YdSD2EX53oVpYeP+420DHKFAx5Mb2JBSjJNvFINOELcNI9r1qEU7ivkPA0C965c+h4isG6kaTLWRmBJZ/4CswzejFKqRUMNjVzdmLVplS8lTNsK3Ru3Y09v7HdxY3QRpJKk2RsWL1CVgL9qbfAK9+riuUlehhadzczleSa5243kJX3bJ3SdGzrMB/BHBvV+UnEQv0CRYA== X-YMail-OSG: Y6nN9R0VM1kHqd3SDPNq_zTzduuaRGNNOQPHfRtKzDMpxg2o_jCzOk9xx4OrdZ9 0lOBuKCjI8wljx.8gX0GxOrm82P8TvPp1_xXEdBkA0MxEi3g10R3LGiESX_YjA3BFsx8X8yNsJU6 mGm.sT3pi0_OJpD1KjQ_S4.hwNu1GJe4JZq6ItkzxAcRn1E2au31B8n_Agi4QtZ6.mktNmBf1ksW xNM0YaWrYTkSxxuf2KVVFEzxtyiJDycadxw.TqvyV7GfVDAiiac5_J_N45cZinm1VUWKgynZRhbq q8kz3ZjKt5PtIU50MaUDjr3O.Ds8vgEfHhX57V00utwPUoMfKD9EAaELX1i1ickuAhjBv2tRYGBA 6QzntSqUw4iQfw5pZQVgjGN_VRTmM2anLr8BhbKPvmwLa.Mj4dVAOYng8fBLQOfe2NjZEh3rH3AF ZvDp6ZF7rSkNnoQQUANcngK53kiYeD9YYv9hK2TvYHUmScVd3Y5e0IHMOVmaUjRpJNLNk2gdYWAc QHeKztw5DnVQP.LbO8tMFjLNU4RP.O.t_DJOpHN0M8lQYrg.gNedMkBQz29bzhB1Ys8BFCdA6C_c B.aznYNisuww2TzvWWKBaHQSVOLueKc7Xigwc0e96KkIk.oRslo_UWZNrVdAc2h6TyhSYgC3Q.V3 KhBjh8NzplI7oeqZKbom.QzMRZZqZsH53hD0vn.PEHjhp5SMLakS.bHK3TP9ejJUNDhJtyejt1CA 57Hc1i3tOSY9qNbmd_mrMsSx81G8gV14Xpsz2DNhdNdwZkM8oaKcHVWvpVZuWvb9fC4y.SIy_hI2 9qE8nWAlllIExha90E9C7pk.AtHD4I.glXLoE8LKTC Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Mon, 16 Dec 2019 03:12:54 +0000 Original-Received: by smtp406.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 93774e83759481c969e398e85ce4ce7c; Mon, 16 Dec 2019 03:12:48 +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.132.42 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:243401 Archived-At: Hi Eli: I just saw your message. Actually the problem should be somewhere else a bit latter in the same function. Because in terminal your code underlies the entire line. I will give it a look tomorrow. Best Ergus 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? >