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: Thu, 19 Dec 2019 02:19:10 +0100 Message-ID: <20191219011910.bhvwrcco56uv2znm@Ergus> References: <83eex771ky.fsf@gnu.org> <20191216161104.767sfxj7taabs5jl@Ergus> <83v9qg42vz.fsf@gnu.org> <20191216203156.oojz2o3uskxsgd5a@Ergus> <83lfrb4owb.fsf@gnu.org> <20191217141345.z3ldbj4nolrgmbqo@Ergus> <834kxy50rk.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="23687"; 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 Thu Dec 19 02:19:51 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 1ihkTn-00062O-PC for ged-emacs-devel@m.gmane.org; Thu, 19 Dec 2019 02:19:51 +0100 Original-Received: from localhost ([::1]:34712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihkTm-0006dL-Dy for ged-emacs-devel@m.gmane.org; Wed, 18 Dec 2019 20:19:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40842) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihkTY-0006ZP-8G for emacs-devel@gnu.org; Wed, 18 Dec 2019 20:19:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihkTW-0008D7-Hi for emacs-devel@gnu.org; Wed, 18 Dec 2019 20:19:35 -0500 Original-Received: from sonic308-3.consmr.mail.bf2.yahoo.com ([74.6.130.42]:42211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihkTW-00089e-9M for emacs-devel@gnu.org; Wed, 18 Dec 2019 20:19:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1576718372; bh=76JvefRsT1llF1fa7Or15pLEEYI/rJLHq9OvkQJ5JAM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=H3FCc3H978VF6Oq7e/+Z/l6e24e2zRWblbpVdZCooAQfp1EV1Kd0UKTHmJQAChuBNWCoA9z57KsRZEV+QgZKHGSPJWMk6+0OyDktpKO0SiHKYe4Lolkr4Svgwy8rdwIYA1JWZjZem7qO0b3fGyKylHgX/9PCRrsckSc3E7k4vdxzq32sL2B1RM0QPn/CtQMkIT38L+P6S45O9jjJk7zX/nWHz9/38+lXMEJRqrwKeuitqDOAF5g77eToam7BJAeSRdIwam/linh5EbOSIWcKDIvZC7TpUgAY3L5Ndgfr6pMi42R+m5Fcm18OXKL2eQHAydhSLeXyxkdoYu87V3rX1A== X-YMail-OSG: m8E4riwVM1ljLCJ53X51JMkt0ShQnQTD1wwe8JseCtrzE8sxALUPVx2PcFtJJuQ tQ24b5lItqd_XGjJtjHww70RvmkoC8EDs10sxqn_cozqJN_iyaa05_JzU_9tNixOaRRoHqXS6ZRS adMlxbpc7rzUgKDAV5LEyT6MqW39h1dCQtXn0kB6pPSPvRSKG2u7QbNW1vzsqkGoudv6F6Bbw2nY GoKRfRS_dlrelFdv9FulBHDdmXJ9iwzR2eHZY6tP1T4CdJEQHfFW6AhFLbT2ipmNOD9gawBG8Hs4 8hF3efMrjVoWHifDYQzlcibYwsKTQyigawZjxNZ1RRlx7neKAyulpMTdd97cF8QMxAVCnQZQwpor Od1fY1lt_hm5PeRIqqmATbJu8foGiy7K_7B4os4fQJ0YGXZ7wsrfybaVW4iSOUExuo23z95plMnd ukbWKuRRGLNIaL_y6Qung8CBI73UsNX135pvPJksekDnkDp449xvCdXHj_oCoI0sxy1Mz4jZ.jnH Gt0oC.qbc3M7A0GzCM7Upb68UcpCsniWIT8cHZoqFcGER0vNE1nHSqI0c0G3YL1fp4y9kmzuPDJ_ wumsJaPnWZCBYos8w_T2lNcuKcmgbM6VvZ0cJDjNj19mDlFgXO0kNSpeyXgtD.ernraLsfdpRaIw 2CUXj5nxdiMY4ROLJfhd_zOY_Tqap0.4GPlA_2dWmPogon5d.yTaMLuihgTRgBPcl7DI55hpTo2a wqaTE5fhdPbRfw9HFdYOG1LfsCucvXZsXvawhQ0YFzkSIXAck0jOXlVi_iqHLFYQCpS_X3qb5g4q EXeltqCrgFS6021X0Lvy3FcsbAgviRBMSl96NrWkuV Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.bf2.yahoo.com with HTTP; Thu, 19 Dec 2019 01:19:32 +0000 Original-Received: by smtp402.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 0c05a009ddd35b26221642044b4bb62a; Thu, 19 Dec 2019 01:19:29 +0000 (UTC) Content-Disposition: inline In-Reply-To: <834kxy50rk.fsf@gnu.org> X-Mailer: WebService/1.1.14873 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.130.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:243467 Archived-At: On Tue, Dec 17, 2019 at 07:18:23PM +0200, Eli Zaretskii wrote: >> Date: Tue, 17 Dec 2019 15:13:45 +0100 >> From: Ergus >> Cc: emacs-devel@gnu.org >> >> --- a/src/xdisp.c >> +++ b/src/xdisp.c >> @@ -21596,13 +21596,17 @@ extend_face_to_end_of_line (struct it *it) >> >> 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) >> + && !Vdisplay_fill_column_indicator >> + && (NILP (face->lface[LFACE_EXTEND_INDEX]) >> + ||(face->box == FACE_NO_BOX >> + && face->underline == FACE_NO_UNDERLINE >> + && face->overline_p == false >> + && face->strike_through_p == false))) >> return; > >I don't think I understand the test for the :extend attribute being >non-nil. Can you explain why you added it? In general, faces that we >treat as "base face" when we start face merging don't need to have the >:extend attribute set (see, for example, the tool-bar face), but we >still want to apply them to the space past EOL. Am I missing >something? Did you bump into some scenario where this attribute >caused some regression or bad results? > >Thanks. > Hi Eli: I just added that test (probably not the best one) for the case where the face is the default face. Actually the merge we use (with the filter) asserts that the resulting face will be :extend t or the default face (AFAIR). So at this point I thought (probably wrong) that only the default face could have :extend nil and we could exit early in that case... But if there are some cases that I am not considering we can remove that. Do you think that removing it, the rest of the changes will be enough? Best, Ergus