From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Raphael 'kena' Poss Newsgroups: gmane.emacs.bugs Subject: bug#39390: 28.0.50; prettify-symbols-mode confuses display when start/end faces are different Date: Sun, 2 Feb 2020 19:28:24 +0100 Message-ID: <34ca60a0-3658-0e64-b16f-829d914d4b81@thaumogen.net> References: <3184164c-5d94-6cb3-aca4-338b710bf97f@thaumogen.net> <83eevcj4ar.fsf@gnu.org> <83blqgj285.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="47108"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: 39390@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 02 19:29:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iyJze-000C8T-4z for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Feb 2020 19:29:14 +0100 Original-Received: from localhost ([::1]:58610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyJzd-0000EZ-87 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Feb 2020 13:29:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49353) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyJzU-0000EP-6z for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 13:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyJzT-0002AX-0q for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 13:29:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyJzS-0002AF-2f for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 13:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iyJzR-00052J-Uq for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 13:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Raphael 'kena' Poss Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2020 18:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39390 X-GNU-PR-Package: emacs Original-Received: via spool by 39390-submit@debbugs.gnu.org id=B39390.158066811219311 (code B ref 39390); Sun, 02 Feb 2020 18:29:01 +0000 Original-Received: (at 39390) by debbugs.gnu.org; 2 Feb 2020 18:28:32 +0000 Original-Received: from localhost ([127.0.0.1]:40527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyJyy-00051P-Ij for submit@debbugs.gnu.org; Sun, 02 Feb 2020 13:28:32 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyJyx-00051A-23 for 39390@debbugs.gnu.org; Sun, 02 Feb 2020 13:28:31 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id EDC1820CB2; Sun, 2 Feb 2020 13:28:25 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 02 Feb 2020 13:28:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thaumogen.net; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=I OuGFdFSWcZ1SiKejqYhrYG7CEvuCWPDWTUnkwXW1iA=; b=qd8ixz8lro+AVIr9V Vz8w5sW/fpKxXsz+eDI4gQSSsky++GDCcq/0JOTRUrLnX4YCyxaM9UV2gPQjH0Wp VXKvKKTOUNnA4XZctJ1ftTezQ/4KkBX7XMQnNMmWAr5CA6iAojv+xMgvNeCE4+H1 Zb5SBFdU+fLDa0YAxwdxRyJF3OSrDAmz1Ug9lrtPVgeFcyfAh0zx0O7FO3yXGecn 28Y1DQ5YU2GTkCrfORn87T5vnYyH1arczFI2/D55yc3QTVggicJJQbwkXIkL8g23 6vfJW2IXdneRh4rhpLKIadDKUIJVyPtLztcAGRSYLrMQwRxYhgSxN+tbv5jCFOaX +TLWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=IOuGFdFSWcZ1SiKejqYhrYG7CEvuCWPDWTUnkwXW1 iA=; b=Uc4MakpvO/rLlwb5FmRNIgX7AC9wmPruu+iA9ymZuNIHk1TdU1RUmV6DO xKsTxALlep4AdavEwbZfWdfAZfHvp4mlJWycKv5hsUlBuOBOezWJhAwj7ISzLku2 nhnQUl/lXCk6dJTEpF4yJ5apWhVX9G4N0te5vO2mj2s46ZzUgUSUXcrnKHn48ijj W0wyu4Wh37dSjTYp/BoqJVlpDQAE2QvWGW0av/lPLda8GSC4y6fS0jfe/F0009vn Hlt1YwAGafye2tX/mq0olvyfK3Nt+U+gxDrzEviapJpLeLEKPkPwYUFekGSpRItM KFD11DywSaKGSb/Sdpj5bZz1AkM7Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrgeehgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptfgrphhh rggvlhcukdhkvghnrgdkucfrohhsshcuoehknhiisehthhgruhhmohhgvghnrdhnvghtqe enucffohhmrghinhepghhnuhdrohhrghenucfkphepkeeirdekjedrudeliedrjeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehknhiisehthh gruhhmohhgvghnrdhnvght X-ME-Proxy: Original-Received: from [192.168.2.14] (ip5657c407.direct-adsl.nl [86.87.196.7]) by mail.messagingengine.com (Postfix) with ESMTPA id 7893E30602EE; Sun, 2 Feb 2020 13:28:25 -0500 (EST) Autocrypt: addr=knz@thaumogen.net; prefer-encrypt=mutual; keydata= mQSuBFN56cERDACePTTZjZwCCXm5d4VheFgjGYG9kY3FNlmGOP2UtwHnbhK5TIe+8GYjE+8R uNuf49+zvDFDtBgwGwi0WQndC/OOhRqg2OyTjNNJWtnvbpiwSGBI15acvL/7gLkZPHi4IR7q 6RnV+Uj76G8h0jyoLzkrdilvJe8xdkQ+zEPuqIxFRwr/Of2/fbt6icSiIpNvOKAD8xhNWWlF NW3QS4h4ug7v2ntrwZTam7I4W7GOubMhThZoCRWCVSN/V37yGOAvHdiaHb5cDdayQN3obH9c kpMTreichl6/0Gklx6OgGLjnRl7UeHSUa9VaINpbVPHZyye6KNCAYxF7ppCVfJOt6Xv+Wih9 F4G7D3nVlOxHeXUph+oqsiJXCX/niBPkb0NjQv0ZqDvEK6u/uZNSvM0y+1K64aE5oMdQd1EY DWZDWlBPcispKi6MQnRfw7PXrXGcuHJ5x5VbLRLOzMMyqP6XdJgcGwoMkH8HCdV+P8t8tc9+ En8diYj91GGPVQG542fB9asBALzvA44LMFPh0CmiJltaXXcp1VDUhyww7F/BBa6TW6OjC/4r 0xupaCFwIO74D1y4QuGwBZRrKFTxC0zyvtnKyAnNexpwDZFZmCuMxkZDAN0TcF5Slkr9k8SB 7rBGjkDfuHZ9YB1e8LQQMaYM4p743q6cQeGJ++YgaHQu/r4RulTICOeq1av0yYJ0i9gEZA6M OHKHvu0PxRD8jy3ybMdW2a8WYoHIL8Fg3BjWIV6gBkcYuwQYVLQCR8seMZl5+YafTLWU8YuF txDOXNWueeFbKALKb4 In-Reply-To: <83blqgj285.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175606 Archived-At: Hi Eli, thanks for your fast answer. On 02-02-2020 19:03, Eli Zaretskii wrote: > I can only explain it in general terms, since I'm not familiar with > go-mode. Look the issue is not particular to go-mode. Also note that I am using prettify-symbols-mode which is a standard function from prog-mode.el shipped in core Emacs. This is not an extension and it is not my own custom code. I am looking for advice to either: 1. enhance my *configuration* of prettify-symbols-alist, so as to avoid the problem when using the standard code prog-mode.el 2. or, a diff for prog-mode.el to fix/workaround the problem in a way independent of the particular lang major mode. Your advice: > The idea is to modify the font-lock definitions of the mode such that > the characters you want to substitute all get the same face. The substitution is performed by prog-mode.el (prettify-symbols--compose-symbol) not by my own code. I would like to know what I need to do to make that code use the same face for all of the result of the substitution. Preferably without modifying prog-mode.el (which I don't control), but I'll take a diff against that if that's my only option. I think the salient part from prog-mode.el is this: ;; That's a symbol alright, so add the composition. (with-silent-modifications (compose-region start end (cdr (assoc match alist))) (add-text-properties start end `(prettify-symbols-start ,start prettify-symbols-end ,end))) from here: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/prog-mode.el#n134 Is there a way to tweak either the configuration (prettify-symbols-alist) or prog-mode.el to trick it into emitting the same face for the substitution? If that is not possible, is there a way to add an additional font-lock keyword rule that applies _after_ the substitution performed by prettify-symbols-mode and "clean up" the face mix-up? (My opinion is that this bug exists in prog-mode.el and thus a workaround/fix should be provided at that level, not in a per-mode or per-user customization.) -- Raphael 'kena' Poss