From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jim Diamond Newsgroups: gmane.emacs.help Subject: Re: cc-mode in emacs 23.2 goes into infinte loop Date: Sun, 23 Jan 2011 12:47:48 -0400 Organization: A noiseless patient Spider Message-ID: References: <1cb4543e-859f-40b2-b72f-460e2de06b35@w2g2000yqb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1295804471 18947 80.91.229.12 (23 Jan 2011 17:41:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 Jan 2011 17:41:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 23 18:41:06 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ph3w1-0000S3-2h for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Jan 2011 18:41:05 +0100 Original-Received: from localhost ([127.0.0.1]:39756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ph3w0-0003gA-KI for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Jan 2011 12:41:04 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news2.arglkargh.de!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 Injection-Info: mx02.eternal-september.org; posting-host="Skkm/KdxUIvyPpp2CTtM/Q"; logging-data="19965"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LKXtgsbVpnUkHIdcEv6Mm" User-Agent: slrn/0.9.9p1 (Linux) Cancel-Lock: sha1:YejRlRXyNamOwk7vxBwTqMVRFhA= Original-Xref: usenet.stanford.edu gnu.emacs.help:184517 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: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78677 Archived-At: On 2011-01-23 at 05:54 AST, rusi wrote: > On Jan 23, 3:41 am, jdiam...@snipthis.AcadiaU.ca wrote: >> I have the following file... > > snipped > >>     (setq zsd-c-font-lock-keywords-3 nil) > > No I dont have an answer (and please excuse my hijacking your question > for mine :-) ) > but do you know where I can find out about things like > foo-font-lock-keywords-{1,2,3}? > > Both C and lisp modes are too deep-structured for me to easily figure > out... > > IOW just looking for a typical, simple language mode that uses font- > lock correctly... Jorgen has maybe already answered your question. In addition to his message... The -1, -2, -3 jazz for cc mode can be explained by this relatively short snippet from cc-fonts.el: (defconst c-font-lock-keywords-1 (c-lang-const c-matchers-1 c) "Minimal font locking for C mode. Fontifies only preprocessor directives (in addition to the syntactic fontification of strings and comments).") (defconst c-font-lock-keywords-2 (c-lang-const c-matchers-2 c) "Fast normal font locking for C mode. In addition to `c-font-lock-keywords-1', this adds fontification of keywords, simple types, declarations that are easy to recognize, the user defined types on `c-font-lock-extra-types', and the doc comment styles specified by `c-doc-comment-style'.") (defconst c-font-lock-keywords-3 (c-lang-const c-matchers-3 c) "Accurate normal font locking for C mode. Like `c-font-lock-keywords-2' but detects declarations in a more accurate way that works in most cases for arbitrary types without the need for `c-font-lock-extra-types'.") (defvar c-font-lock-keywords c-font-lock-keywords-3 "Default expressions to highlight in C mode.") So not every mode needs 3 choices, there are three choices in cc mode to suit different tastes. Cheers. Jim