* bug#17023: 24.3.50; font-lock-add-keywords creates duplicates
@ 2014-03-17 10:48 lee
2014-03-17 15:06 ` Stefan
0 siblings, 1 reply; 2+ messages in thread
From: lee @ 2014-03-17 10:48 UTC (permalink / raw)
To: 17023
To reproduce:
emacs -q
C-x b test ;; switch to an arbitrary buffer
M-x describe-variable font-lock-keywords
;; The value of `font-lock-keywords' should be nil.
foobar
(font-lock-add-keywords nil '(("\\_<foobar\\_>" (0 'hi-yellow prepend))))
C-x e ;; to evaluate above expression --- "foobar" is being highlighted
M-x describe-variable font-lock-keywords
;; The value of `font-lock-keywords' is now:
font-lock-keywords is a variable defined in `font-lock.el'.
Its value is (t
(("\\_<foobar\\_>"
(0 'hi-yellow prepend)))
("\\_<foobar\\_>"
(0 'hi-yellow prepend)))
The 'hi-yellow face is defined in hi-lock.el. The
`font-lock-add-keywords' function even removes keywords before adding
them to avoid duplicates. Yet it seems to create duplicates itself.
In GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, X toolkit)
of 2014-03-17 on yun.yagibdah.de
Windowing system distributor `Fedora Project', version 11.0.11404000
Configured using:
`configure --without-gpm --without-toolkit-scroll-bars
--with-x-toolkit=lucid --enable-link-time-optimization'
--
Knowledge is volatile and fluid. Software is power.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-17 15:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 10:48 bug#17023: 24.3.50; font-lock-add-keywords creates duplicates lee
2014-03-17 15:06 ` Stefan
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).