From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Colin S. Miller" Newsgroups: gmane.emacs.help Subject: Re: emacs new user. Date: Tue, 25 Sep 2007 22:52:10 +0100 Organization: SunSITE.dk - Supporting Open source Message-ID: <46f9830a$0$90272$14726298@news.sunsite.dk> References: <12863621.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1190760043 17129 80.91.229.12 (25 Sep 2007 22:40:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2007 22:40:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 26 00:40:38 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IaJ54-00010i-Dg for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Sep 2007 00:40:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IaJ51-0000Kd-H8 for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Sep 2007 18:40:35 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail User-Agent: Icedove 1.5.0.12 (X11/20070607) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 44 Original-NNTP-Posting-Host: 62.56.116.134 Original-X-Trace: news.sunsite.dk DXC=b; 8SBIUW^XP8AmV=S2QQ[\YSB=nbEKnk[TekT_m2IJNZG1[Bg<0aH5P\VT\m5_SIbVU_42Df:PaKXTcL2h5ahoT_kF_>m>CYcV_i0ioh=OFG\Y250ONeOk4?U[Qmo3fTWiRR Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:152349 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:47859 Archived-At: Moofar wrote: > Your responses have been very welcome. Just knowing that there is an active > forum on the internet makes a huge difference. I have been reading the help > files and I know I just need to keep on reading and learning. > > I do have one question that would just be very helpful to get me started. I > am working on a file in C, xxx.c and the auto indentation feature is not > working or not turned on. The c mode is enabled and other functions are > working. I'm reading about the c mode options and options in general through > in the documentation to figure it out, but an easy answer would be a huge > help. Moofar, Adding this to your .emacs file might help (add-hook 'c-mode-common-hook '(lambda () (c-set-style "whitesmith") (turn-on-auto-fill) (turn-on-font-lock) (setq fill-column 77) (setq indent-tabs-mode nil) (flyspell-prog-mode) )) This changes c-mode to 1) Whitesmith indent style; this has the curly brackets on their own line, and lined-up with the preceding control block, indent is the default of 4 characters. 2) Autoindent is enabled; the next line will default to the correct indentation when you press enter. 3) Syntax highlighting is enabled 4) Code auto-wraps to the next line at 77 characters 5) Spaces are used instead of tab characters for indenting 6) Spell checking is enabled (if ispell/aspell is installed; it will be on unix systems but not MS-Windows systems) This is for XEmacs; it should work on GNU Emacs, but I can't guarantee this. HTH, Colin S. Miller -- Replace the obvious in my email address with the first three letters of the hostname to reply.