unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Le Wang" <l26wang@gmail.com>
Subject: Adding keywords to cc-mode
Date: 23 Jun 2006 20:22:38 -0700	[thread overview]
Message-ID: <1151119358.514309.37040@g10g2000cwb.googlegroups.com> (raw)

Hi,

I'd like to get the following to indent properly somehow.

    for each (i in collection) {
        // do stuff
    };

The "for each" syntax is valid in c++/cli.  I'm hopefully lost after
looking at cc-*.el and the various modes based on it, csharp-mode, etc.

I've tried adding this to my mode:

(c-lang-defconst c-block-stmt-2-kwds
  c++cli '("for" "if" "switch" "while" "catch" "for each"
	   "checked" "unchecked" "lock"))

This gets the font-locking right, but everything after "{" is still
doubly indented.  Can someone point me to some resources?

Thanks.

--
Le

             reply	other threads:[~2006-06-24  3:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-24  3:22 Le Wang [this message]
2006-06-24  4:37 ` Adding keywords to cc-mode Le Wang
  -- strict thread matches above, loose matches on Subject: below --
2007-06-13 16:02 Stefan Arentz
     [not found] ` <mailman.2114.1181760059.32220.help-gnu-emacs@gnu.org>
2007-06-13 20:03   ` Stefan Arentz
2007-06-13 20:06 ` Alan Mackenzie

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=1151119358.514309.37040@g10g2000cwb.googlegroups.com \
    --to=l26wang@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).