GNU bug report logs -
#17023
24.3.50; font-lock-add-keywords creates duplicates
Previous Next
Reported by: lee <lee <at> yun.yagibdah.de>
Date: Mon, 17 Mar 2014 10:51:02 UTC
Severity: normal
Found in version 24.3.50
Done: Stefan <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17023 in the body.
You can then email your comments to 17023 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17023
; Package
emacs
.
(Mon, 17 Mar 2014 10:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
lee <lee <at> yun.yagibdah.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 17 Mar 2014 10:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 sent
to
Stefan <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Mon, 17 Mar 2014 15:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
lee <lee <at> yun.yagibdah.de>
:
bug acknowledged by developer.
(Mon, 17 Mar 2014 15:07:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 17023-done <at> debbugs.gnu.org (full text, mbox):
> 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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 15 Apr 2014 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 128 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.