all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: rusi <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: cc-mode in emacs 23.2 goes into infinte loop
Date: Sun, 23 Jan 2011 09:57:51 -0800 (PST)	[thread overview]
Message-ID: <a6db1505-a0b3-46cd-994e-d80181c5dcff@v17g2000prc.googlegroups.com> (raw)
In-Reply-To: slrnijomtk.o9q.Jim.Diamond@jdiamond-nb2.acadiau.ca

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	other threads:[~2011-01-23 17:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22 22:41 cc-mode in emacs 23.2 goes into infinte loop jdiamond
2011-01-23  9:54 ` rusi
2011-01-23 14:05   ` foo-font-lock-keywords (was Re: cc-mode in emacs 23.2 goes into infinte loop) Jorgen Grahn
2011-01-23 16:49     ` rusi
2011-01-23 19:22       ` Jim Diamond
2011-01-23 16:47   ` cc-mode in emacs 23.2 goes into infinte loop Jim Diamond
2011-01-23 17:57     ` rusi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6db1505-a0b3-46cd-994e-d80181c5dcff@v17g2000prc.googlegroups.com \
    --to=rustompmody@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.