help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc-mode in emacs 23.2 goes into infinte loop


From: rusi
Subject: Re: cc-mode in emacs 23.2 goes into infinte loop
Date: Sun, 23 Jan 2011 09:57:51 -0800 (PST)
User-agent: G2/1.0

On Jan 23, 9:47 pm, Jim Diamond <Jim.Diam...@deletethis.AcadiaU.ca>
wrote:
> On 2011-01-23 at 05:54 AST, rusi <rustompm...@gmail.com> 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

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/6e10d0eb871b4951/f68d42fe89a6d1c4?#f68d42fe89a6d1c4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]