From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rusi Newsgroups: gmane.emacs.help Subject: Re: cc-mode in emacs 23.2 goes into infinte loop Date: Sun, 23 Jan 2011 09:57:51 -0800 (PST) Organization: http://groups.google.com 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: quoted-printable X-Trace: dough.gmane.org 1295808032 2715 80.91.229.12 (23 Jan 2011 18:40:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 Jan 2011 18:40:32 +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 19:40:28 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 1Ph4rS-0004ks-Bx for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Jan 2011 19:40:26 +0100 Original-Received: from localhost ([127.0.0.1]:58976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ph4rS-000442-0A for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Jan 2011 13:40:26 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!v17g2000prc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 66 Original-NNTP-Posting-Host: 116.73.35.230 Original-X-Trace: posting.google.com 1295805472 2242 127.0.0.1 (23 Jan 2011 17:57:52 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 23 Jan 2011 17:57:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v17g2000prc.googlegroups.com; posting-host=116.73.35.230; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:184522 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:78681 Archived-At: On Jan 23, 9:47=A0pm, Jim Diamond wrote: > 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. =A0In 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) > =A0 "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) > =A0 "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) > =A0 "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 > =A0 "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. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Jim Well thanks Jim! But I dont get how they are used... Who/what/where are these variable passed in to the cc-mode so that it knows what to do with it? Here is a sample of my problem http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/6e10d0eb= 871b4951/f68d42fe89a6d1c4?#f68d42fe89a6d1c4