From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Bret Comstock Waldow" Newsgroups: gmane.emacs.help Subject: newbie help with emacs C style Date: Thu, 01 May 2003 00:51:03 GMT Organization: EarthLink Inc. -- http://www.EarthLink.net Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1051750597 7258 80.91.224.249 (1 May 2003 00:56:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 1 May 2003 00:56:37 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 01 02:56:34 2003 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 19B2NG-0001se-00 for ; Thu, 01 May 2003 02:56:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19B2MF-0007Ot-08 for gnu-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2003 20:55:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!peernews-us.colt.net!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail User-Agent: Pan/0.13.3 (That cat's something I can't explain) Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 24.170.179.254 Original-X-Complaints-To: abuse@earthlink.net Original-X-Trace: newsread2.prod.itd.earthlink.net 1051750263 24.170.179.254 (Wed, 30 Apr 2003 17:51:03 PDT) Original-NNTP-Posting-Date: Wed, 30 Apr 2003 17:51:03 PDT Original-Xref: shelby.stanford.edu gnu.emacs.help:112603 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9099 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9099 I would like to format my C (and C++ and Java) code like this: function (arguments) { statement; statement; if ( something is true ) { statement; statement; } statement; } The names listed in the documentation I've read so far don't make sense to me - there's not enough of a description of what corresponds to what for me to pick out which variable I need to set...I think I'm supposed to set it to "+" to get it to indent - is this right? Can someone provide the name of the variable that controls the brace and statement indenting shown above? Whenever I open a new level of inner brace on a new line, I want the braces and code to indent the same amount. Also, can someone tell me where there's a reference that shows what the #@$^%# names like: "'defun-block-intro' In the first line in a top-level defun." correspond to? I wouldn't know where to find the definition of a "top-level defun" - where do you learn such a thing? I think "defun" means "define function", but I can't figure out why it's not called a "function definition". Where do people call them defuns? What distinguishes a "top-level" one from whatever else there is? I'm aware of nested blocks in C, but I don't know of nested functions... It's a bit much to bite off all by oneself at first. Thanks for any help. Cheers, Bret