From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.help Subject: Re: cwarn-mode cause syntax highlighting lost. is this emacs bug? Date: Fri, 16 Jul 2004 10:04:37 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87u0w89y3u.fsf@herrrossi.mmweg.rwth-aachen.de> References: <61a955e6.0407152003.41984211@posting.google.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1089965326 17883 80.91.224.253 (16 Jul 2004 08:08:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jul 2004 08:08:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 16 10:08:39 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BlNln-0001yy-00 for ; Fri, 16 Jul 2004 10:08:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BlNoJ-00006H-R8 for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jul 2004 04:11:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-X-Trace: news.uni-berlin.de zpGonc5lHZIA3BVO4fL5ogCWSjo1viZBcyXvGz9WDVOwlJiStBYPrHkxA2 User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:Vp3x6/YASCtZf4FgE4urawCMwUE= Original-Xref: shelby.stanford.edu gnu.emacs.help:124328 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19663 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19663 >>>>> "Klaus" == Klaus Zeitler writes: >>>>> "Felix" == Felix 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