all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: lee <lee@yun.yagibdah.de>
To: 17023@debbugs.gnu.org
Subject: bug#17023: 24.3.50; font-lock-add-keywords creates duplicates
Date: Mon, 17 Mar 2014 11:48:24 +0100	[thread overview]
Message-ID: <87ha6xhzif.fsf@yun.yagibdah.de> (raw)


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	other threads:[~2014-03-17 10:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 10:48 lee [this message]
2014-03-17 15:06 ` bug#17023: 24.3.50; font-lock-add-keywords creates duplicates Stefan

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=87ha6xhzif.fsf@yun.yagibdah.de \
    --to=lee@yun.yagibdah.de \
    --cc=17023@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.