From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords Date: Tue, 5 Mar 2019 22:23:06 -0800 (PST) Message-ID: <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default> References: <42355266-99e2-403a-8dd2-8a5320659d1b@gmail.com> <733dfaa9-55c2-4eb6-be1f-e1e880285546@default> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="217194"; mail-complaints-to="usenet@blaine.gmane.org" To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel , 34764@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 06 07:24:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1PyT-000uOT-In for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Mar 2019 07:24:17 +0100 Original-Received: from localhost ([127.0.0.1]:55092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1PyS-0002CV-E0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Mar 2019 01:24:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1PyF-0002CO-Mt for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 01:24:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1PyE-0007Og-Tm for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 01:24:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1PyE-0007OU-O6 for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 01:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h1PyE-0007NX-Ip for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 01:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Mar 2019 06:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34764 X-GNU-PR-Package: emacs Original-Received: via spool by 34764-submit@debbugs.gnu.org id=B34764.155185339628299 (code B ref 34764); Wed, 06 Mar 2019 06:24:02 +0000 Original-Received: (at 34764) by debbugs.gnu.org; 6 Mar 2019 06:23:16 +0000 Original-Received: from localhost ([127.0.0.1]:33678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1PxT-0007MN-P9 for submit@debbugs.gnu.org; Wed, 06 Mar 2019 01:23:16 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:42996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1PxS-0007Lx-IN for 34764@debbugs.gnu.org; Wed, 06 Mar 2019 01:23:15 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x266Is8P009305; Wed, 6 Mar 2019 06:23:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=4hKfO6+bWs+7AWshNRUDzMMA5i8f6GS0KC7iBoaKaHU=; b=AwKUXRxmlbXU7X+RXVBsFsihYBSsGcdXjZ4NySUd+t9i3zHCr6Uw8TssjWgMjQG/Q9tA fRJ8ne/A377+KnyQyjeJuZz8mDZEaDD7JGOidX/7zw73qZ8Vz8td9X8uzCsy3fKba0Ru Fuu26LIFX5hFFmbs7QO28U4SXHX4Q//u9cos20XY7CCbIwH32xYOS+ULypc/qvRGBAqM tJdIwyYlWxuKDs0clHLf/F8Ks6EyXKGffTlBDYaiDDFpfdjGVLDkqRQHl5jKGWIFp/tV c3R/t1qb+pfOWMKFxxtp/AFJHvT8RMn9fKKESDsuEp36PveiaZnn0Z03GCPETKFBy4fT LA== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2qyh8u9tnj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 Mar 2019 06:23:08 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x266N8Y9025251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 Mar 2019 06:23:08 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x266N7ah008103; Wed, 6 Mar 2019 06:23:08 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9186 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=524 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903060043 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156085 Archived-At: > > Typically, I use a library-specific property instead > > (e.g. `my-composition') and do whatever is needed to > > give that property an effect like the general (global) > > property, without interfering with that general property. >=20 > I never thought about this solution. This is great actually! I'm > aware of char-property-alias-alist, but I never quite realized that it > provided an elegant solution to the problem of restoring font-lock- > extra-managed-props when disabling a minor mode (the only user in the > emacs source tree seems to befont-lock). Is that the mechanism you had > in mind? No, in fact I wasn't aware of `char-property-alias-alist'. ;-) I just meant in some way to try to have a library-specific property control or replace a general property. I don't have in mind a general mechanism for doing that. > > Maybe that's not appropriate for prettify-*. Dunno. > > > > Or I keep track of the initial state before adding > > `composition', and then reset that property only if it > > wasn't used to begin with (i.e., restore its value). > > > > But that's not foolproof either, since some other code > > can affect things after prettify-* is turned on, so > > restoring to the state before it was turned on isn't > > necessarily TRT. > > > > Maybe such a save/restore approach is not easy/possible > > for prettify-*. Dunno. >=20 > Right, I think that approach is doomed, because modes are not enable > and disabled in a well-parenthesized manner (you can enable A, enable > B, disable A, and disable B) Yes. But it kinda depends on how "big", longlasting or important a (minor) mode is. If it's something that you tend to leave on a lot, as a basic Emacs customization then you can sometimes live with just restoring the previously ~virgin state when you toggle it off briefly. But yeah, it depends. =20 > Thanks for the cool idea about char-property-alias-alist! It was your idea! Let us know how you make do with it.