From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sven Utcke Newsgroups: gmane.emacs.help Subject: Q: less intelligent c-mode Date: 25 Sep 2002 17:21:34 +0200 Organization: University of Hamburg -- Germany Sender: help-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032968212 3734 127.0.0.1 (25 Sep 2002 15:36:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 25 Sep 2002 15:36:52 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17uEDa-0000y4-00 for ; Wed, 25 Sep 2002 17:36:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17uEDf-00024N-00; Wed, 25 Sep 2002 11:36:55 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-ham1.dfn.de!news.uni-hamburg.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: kogs31.informatik.uni-hamburg.de Original-X-Trace: rzsun03.rrz.uni-hamburg.de 1032967295 7605 134.100.12.153 (25 Sep 2002 15:21:35 GMT) Original-X-Complaints-To: usenet@news.uni-hamburg.de Original-NNTP-Posting-Date: 25 Sep 2002 15:21:35 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Xref: nntp.stanford.edu gnu.emacs.help:105295 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1849 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1849 Hi, within mmm-mode, I need to write some C-code. However, this will not be valid C-code, but rather some fragments only; in particular there will not generally be a function declaration included. However, cc-mode in that case insists to a) indent everything to start in the first column b) colour anything starting in column 1 as a function declaration. Is there any way lobotomize cc-mode some in such a way that it will indent relative to the first line within the region it is seeing? Sven PS: To give you an idea: cc-mode will indent for (i=1; in; i++) { VASSERT(the_outline->x[2][i] == 1.0); } /* end for |i| */ if (verbose) { fprintf(stderr, "# dist = %g\n", dist); } as for (i=1; in; i++) { VASSERT(the_outline->x[2][i] == 1.0); } /* end for |i| */ if (verbose) { fprintf(stderr, "# dist = %g\n", dist); } -- _ __ The Cognitive Systems Group | |/ /___ __ _ ___ University of Hamburg | '