From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Le Wang" Newsgroups: gmane.emacs.help Subject: Adding keywords to cc-mode Date: 23 Jun 2006 20:22:38 -0700 Organization: http://groups.google.com Message-ID: <1151119358.514309.37040@g10g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1151120457 27416 80.91.229.2 (24 Jun 2006 03:40:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Jun 2006 03:40:57 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 24 05:40:56 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ftz0v-0006Yi-RO for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Jun 2006 05:40:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ftz0v-0005Un-A8 for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Jun 2006 23:40:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g10g2000cwb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 131.107.0.74 Original-X-Trace: posting.google.com 1151119364 18153 127.0.0.1 (24 Jun 2006 03:22:44 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 24 Jun 2006 03:22:44 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; SV1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 RED-PRXY-24 Complaints-To: groups-abuse@google.com Injection-Info: g10g2000cwb.googlegroups.com; posting-host=131.107.0.74; posting-account=j4OimgwAAAALo-2szSZvOyX5OE1uyIeS Original-Xref: shelby.stanford.edu gnu.emacs.help:140006 Original-To: help-gnu-emacs@gnu.org 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:35630 Archived-At: 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