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

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

[debbugs-tracker] bug#17023: closed (24.3.50; font-lock-add-keywords cre


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17023: closed (24.3.50; font-lock-add-keywords creates duplicates)
Date: Mon, 17 Mar 2014 15:07:02 +0000

Your message dated Mon, 17 Mar 2014 11:06:38 -0400
with message-id <address@hidden>
and subject line Re: bug#17023: 24.3.50; font-lock-add-keywords creates 
duplicates
has caused the debbugs.gnu.org bug report #17023,
regarding 24.3.50; font-lock-add-keywords creates duplicates
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17023: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17023
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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.



--- End Message ---
--- Begin Message --- Subject: Re: bug#17023: 24.3.50; font-lock-add-keywords creates duplicates Date: Mon, 17 Mar 2014 11:06:38 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
> Its value is (t
>  (("\\_<foobar\\_>"
>    (0 'hi-yellow prepend)))
>  ("\\_<foobar\\_>"
>   (0 'hi-yellow prepend)))

Despite appearances, there is no duplicates here.  The "(t ...)" entry is
just a saved version of the "non-compiled" keywords.


        Stefan


--- End Message ---

reply via email to

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