[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cwarn-mode cause syntax highlighting lost. is this emacs bug?
From: |
Thorsten Bonow |
Subject: |
Re: cwarn-mode cause syntax highlighting lost. is this emacs bug? |
Date: |
Fri, 16 Jul 2004 10:04:37 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) |
>>>>> "Klaus" == Klaus Zeitler <kzeitler+usenet@gsm-mailhost.de.lucent.com>
>>>>> writes:
>>>>> "Felix" == Felix <fengli@gmail.com> writes:
Felix> after M-x cwarn-mode, most of the c/c++ syntax highlighting is lost,
Felix> except for the comments. i also tried "emacs -q" and still have the
Felix> same problem.
Hi,
it appears to be a bug in CVS emacs, related to font-lock-add-keywords. I just
updated via CVS, no fix yet.
Klaus> [...] Please send a bug report to emacs-pretest-bug@gnu.org (maybe
Klaus> you could hint at my bug report).
Oliver Scholz already posted, no reply yet. I include his message below because
it contains a small test...
Toto
CVS from today: Starting from emacs -q --no-site-file eval the
following:
-------------------------
(progn
(switch-to-buffer (generate-new-buffer "*tmp*"))
(emacs-lisp-mode)
(font-lock-mode 1)
;; This is the evildoer:
(font-lock-add-keywords nil '(("lirum larum" . font-lock-warning-face)))
;; Examples:
(insert ";; Strings and comments work o.k.:\n" "\"this is a string\"\n\n")
(insert ";; The new keyword is highlighted correctly:\n" "lirum larum\n\n")
(insert ";; But this is not hightlighted correctly:\n")
(insert "(defun lirum-larum ()\n (save-excursion\n (message \"lirum
larum\"))))"))
-------------------------
--
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow
But if you're paranoid long enough, sooner or later you're gonna be
right.
Friedman, Kinky (1993), A case of Lone Star. New York (Wings Books),
325