From: Drew Adams <drew.adams@oracle.com>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>, 34764@debbugs.gnu.org
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Date: Tue, 5 Mar 2019 22:23:06 -0800 (PST) [thread overview]
Message-ID: <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default> (raw)
In-Reply-To: <aad3efd1-b5ae-405f-2731-890beff06dac@gmail.com>
> > 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.
>
> 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.
>
> 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.
> Thanks for the cool idea about char-property-alias-alist!
It was your idea! Let us know how you make do with it.
next prev parent reply other threads:[~2019-03-06 6:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 22:15 bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords Clément Pit-Claudel
2019-03-05 23:54 ` Drew Adams
2019-03-06 3:50 ` Clément Pit-Claudel
2019-03-06 6:23 ` Drew Adams [this message]
2019-03-06 6:50 ` Clément Pit-Claudel
2019-03-06 15:37 ` Drew Adams
2019-10-30 19:30 ` Lars Ingebrigtsen
2019-10-30 20:57 ` Clément Pit-Claudel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default \
--to=drew.adams@oracle.com \
--cc=34764@debbugs.gnu.org \
--cc=cpitclaudel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.