From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: 34764@debbugs.gnu.org
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Date: Tue, 5 Mar 2019 17:15:03 -0500 [thread overview]
Message-ID: <42355266-99e2-403a-8dd2-8a5320659d1b@gmail.com> (raw)
Hi all,
When turned off, prettify-symbols-mode removes 'composition' from font-lock-extra-keywords, but not prettify-symbols-start or prettify-symbols-end; as a result, every time prettify-symbols-mode is turned on, it adds two new elements to font-lock-extra-keywords.
(I ran into this issue because I added a watcher on font-lock-extra-keywords to debug an intermittent font-lock problem, and the increasingly long lists of prettify-symbol-* entries made things harder to read).
I'm happy to provide a patch, but I'm a bit puzzled by the implementation:
(remove-hook 'post-command-hook #'prettify-symbols--post-command-hook t)
(when prettify-symbols--keywords
(font-lock-remove-keywords nil prettify-symbols--keywords)
(setq prettify-symbols--keywords nil))
(when (memq 'composition font-lock-extra-managed-props)
(setq font-lock-extra-managed-props (delq 'composition
font-lock-extra-managed-props))
(with-silent-modifications
(remove-text-properties (point-min) (point-max) '(composition nil))))))
Would it be simpler to just call font-lock-unfontify-region-function and remove all three properties from font-lock-extra-managed-props?
Cheers,
Clément.
In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2019-02-28 built on clem-w50-mint
Repository revision: 5d60229bf1a9a496102fc2a3ef9e57dcce7bef10
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Linux Mint 19.1
next reply other threads:[~2019-03-05 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 22:15 Clément Pit-Claudel [this message]
2019-03-05 23:54 ` bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords Drew Adams
2019-03-06 3:50 ` Clément Pit-Claudel
2019-03-06 6:23 ` Drew Adams
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=42355266-99e2-403a-8dd2-8a5320659d1b@gmail.com \
--to=cpitclaudel@gmail.com \
--cc=34764@debbugs.gnu.org \
/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.