From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: EScott@nyiso.com Newsgroups: gmane.emacs.help Subject: Re: Emacs changed indenting on me Date: Fri, 1 Oct 2004 15:44:32 -0400 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1929773907==" X-Trace: sea.gmane.org 1096659925 24743 80.91.229.6 (1 Oct 2004 19:45:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Oct 2004 19:45:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, help-gnu-emacs-bounces+escott=nyiso.com@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 01 21:45:12 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CDTL6-0006Er-00 for ; Fri, 01 Oct 2004 21:45:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CDTRY-00030T-FZ for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Oct 2004 15:51:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CDTRP-000304-PI for help-gnu-emacs@gnu.org; Fri, 01 Oct 2004 15:51:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CDTRO-0002zn-Ig for help-gnu-emacs@gnu.org; Fri, 01 Oct 2004 15:51:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CDTRO-0002zi-Dz; Fri, 01 Oct 2004 15:51:42 -0400 Original-Received: from [204.152.47.133] (helo=dommail2.nyiso.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CDTKu-0002tZ-DP; Fri, 01 Oct 2004 15:45:01 -0400 In-Reply-To: Original-To: Sarir Khamsi X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 X-MIMETrack: Serialize by Router on DomMail2/NYISO(Release 6.51HF99 | March 17, 2004) at 10/01/2004 15:45:00, Serialize complete at 10/01/2004 15:45:00 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20989 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20989 This is a multipart message in MIME format. --===============1929773907== Content-Type: multipart/alternative; boundary="=_alternative 006C729C85256F20_=" This is a multipart message in MIME format. --=_alternative 006C729C85256F20_= Content-Type: text/plain; charset="US-ASCII" help-gnu-emacs-bounces+escott=nyiso.com@gnu.org wrote on 10/01/2004 02:13:44 PM: > dave@adboyd.com (J. David Boyd) writes: > > > Sarir Khamsi writes: > > > >> Never mind...I did a diff between previous versions and found my > >> problem. Sorry. > > > > You're supposed to tell us what the problem was so that we can all learn! > > Fair enough...this is what I took out: > > (add-hook 'c-mode-hook > (function (lambda () > (setq c-file-style "local")))) > > (add-hook 'c++-mode-hook > (function (lambda () > (setq c-file-style "local")))) [snip] > > I didn't think I needed it. After I got the initial reply, it all made > sense when I did the diff. > > Sari I still think you would do better using something like this in your .emacs: ;Set Ellemtel as the default indent style ;Stroustrup looks about the same (add-hook 'c-mode-hook '(lambda () (c-set-style "Ellemtel"))) There are several complete systems of C styles, which should be more satisfactory than re-inventing the wheel. Of course, you may like inventing! Eric --=_alternative 006C729C85256F20_= Content-Type: text/html; charset="US-ASCII"
help-gnu-emacs-bounces+escott=nyiso.com@gnu.org wrote on 10/01/2004 02:13:44 PM:

> dave@adboyd.com (J. David Boyd) writes:
>
> > Sarir Khamsi <sarir.khamsi@raytheon.com> writes:
> >
> >> Never mind...I did a diff between previous versions and found my
> >> problem. Sorry.
> >
> > You're supposed to tell us what the problem was so that we can all learn!
>
> Fair enough...this is what I took out:
>
> (add-hook 'c-mode-hook
>       (function (lambda ()
>               (setq c-file-style "local"))))
>
> (add-hook 'c++-mode-hook
>        (function (lambda ()
>               (setq c-file-style "local"))))
[snip]
>
> I didn't think I needed it. After I got the initial reply, it all made
> sense when I did the diff.
>
> Sari

I still think you would do better using something like this in your .emacs:

                             ;Set Ellemtel as the default indent style
                                      ;Stroustrup looks about the same
(add-hook 'c-mode-hook
          '(lambda ()
             (c-set-style "Ellemtel")))

There are several complete systems of C styles, which should be more satisfactory than re-inventing the wheel.  Of course, you may like inventing!

Eric --=_alternative 006C729C85256F20_=-- --===============1929773907== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1929773907==--