bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17023: 24.3.50; font-lock-add-keywords creates duplicates


From: lee
Subject: bug#17023: 24.3.50; font-lock-add-keywords creates duplicates
Date: Mon, 17 Mar 2014 11:48:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]