* Re: Emacs changed indenting on me [not found] <mailman.370.1096485805.2017.help-gnu-emacs@gnu.org> @ 2004-09-29 21:09 ` Sarir Khamsi 2004-09-30 12:48 ` Greg Rowe 0 siblings, 1 reply; 8+ messages in thread From: Sarir Khamsi @ 2004-09-29 21:09 UTC (permalink / raw) EScott@nyiso.com writes: > help-gnu-emacs-bounces+escott=nyiso.com@gnu.org wrote on 09/29/2004 02:33:27 > PM: > >> Well, I have no idea what I did but GNU Emacs (21.3.50.1) changed >> indenting of C++ code. Now it indents 2 spaces instead of the usual 3 >> and moves comment characters ("//") typed in the first column to align >> with the indented code...it didn't do that before. >> >> Any ideas on what I could have done to make this happen or how I can >> fix it? (I'm on WinXP, SP1.) Thanks. > > Try c-set-style Thanks, but does that change the indentation amount (ie, number of spaces) and comment character placement? I don't see a call to that in my ~/.emacs file. Sarir ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Emacs changed indenting on me 2004-09-29 21:09 ` Emacs changed indenting on me Sarir Khamsi @ 2004-09-30 12:48 ` Greg Rowe 0 siblings, 0 replies; 8+ messages in thread From: Greg Rowe @ 2004-09-30 12:48 UTC (permalink / raw) On Wed, 29 Sep 2004 14:09:40 -0700, Sarir Khamsi wrote: > Thanks, but does that change the indentation amount (ie, number of > spaces) and comment character placement? I don't see a call to that in > my ~/.emacs file. Yes it does. It can completely change the indentation style including the number of spaces. If the spaces do not suit you you can change that by setting the c-basic-offset variable. For example, I like 5 spaces per indent: (setq c-basic-offset 5) In reality I use the stroustroup indentation style which uses a basic-offset of 5 anyhow. Greg -- Home is where the .bashrc is. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Emacs changed indenting on me @ 2004-09-29 18:33 Sarir Khamsi 2004-09-29 19:16 ` EScott 2004-09-29 22:31 ` Sarir Khamsi 0 siblings, 2 replies; 8+ messages in thread From: Sarir Khamsi @ 2004-09-29 18:33 UTC (permalink / raw) Well, I have no idea what I did but GNU Emacs (21.3.50.1) changed indenting of C++ code. Now it indents 2 spaces instead of the usual 3 and moves comment characters ("//") typed in the first column to align with the indented code...it didn't do that before. Any ideas on what I could have done to make this happen or how I can fix it? (I'm on WinXP, SP1.) Thanks. Sarir ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Emacs changed indenting on me 2004-09-29 18:33 Sarir Khamsi @ 2004-09-29 19:16 ` EScott 2004-09-29 22:31 ` Sarir Khamsi 1 sibling, 0 replies; 8+ messages in thread From: EScott @ 2004-09-29 19:16 UTC (permalink / raw) Cc: help-gnu-emacs, help-gnu-emacs-bounces+escott=nyiso.com [-- Attachment #1.1: Type: text/plain, Size: 762 bytes --] help-gnu-emacs-bounces+escott=nyiso.com@gnu.org wrote on 09/29/2004 02:33:27 PM: > Well, I have no idea what I did but GNU Emacs (21.3.50.1) changed > indenting of C++ code. Now it indents 2 spaces instead of the usual 3 > and moves comment characters ("//") typed in the first column to align > with the indented code...it didn't do that before. > > Any ideas on what I could have done to make this happen or how I can > fix it? (I'm on WinXP, SP1.) Thanks. > > Sarir > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs Try c-set-style When prompted use ? to list available styles. There are 11 under the W2000 install!. I like Ellemtel. Eric. [-- Attachment #1.2: Type: text/html, Size: 1025 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Emacs changed indenting on me 2004-09-29 18:33 Sarir Khamsi 2004-09-29 19:16 ` EScott @ 2004-09-29 22:31 ` Sarir Khamsi 2004-09-30 12:38 ` J. David Boyd [not found] ` <mailman.513.1096548315.2017.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 8+ messages in thread From: Sarir Khamsi @ 2004-09-29 22:31 UTC (permalink / raw) Never mind...I did a diff between previous versions and found my problem. Sorry. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Emacs changed indenting on me 2004-09-29 22:31 ` Sarir Khamsi @ 2004-09-30 12:38 ` J. David Boyd [not found] ` <mailman.513.1096548315.2017.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 8+ messages in thread From: J. David Boyd @ 2004-09-30 12:38 UTC (permalink / raw) 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! Dave ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.513.1096548315.2017.help-gnu-emacs@gnu.org>]
* Re: Emacs changed indenting on me [not found] ` <mailman.513.1096548315.2017.help-gnu-emacs@gnu.org> @ 2004-10-01 18:13 ` Sarir Khamsi 2004-10-01 19:44 ` EScott 0 siblings, 1 reply; 8+ messages in thread From: Sarir Khamsi @ 2004-10-01 18:13 UTC (permalink / raw) 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")))) (c-add-style "local" '((c-basic-offset . 3) (c-comment-only-line-offset . 0) (c-hanging-braces-alist . ((substatement-open before after))) (c-offsets-alist . ((topmost-intro . 0) (topmost-intro-cont . 0) (substatement . 3) (substatement-open . 0) (statement-case-open . 3) (statement-cont . 3) (access-label . -3) (inclass . 3) (inline-open . 0) )))) I didn't think I needed it. After I got the initial reply, it all made sense when I did the diff. Sari ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Emacs changed indenting on me 2004-10-01 18:13 ` Sarir Khamsi @ 2004-10-01 19:44 ` EScott 0 siblings, 0 replies; 8+ messages in thread From: EScott @ 2004-10-01 19:44 UTC (permalink / raw) Cc: help-gnu-emacs, help-gnu-emacs-bounces+escott=nyiso.com [-- Attachment #1.1: Type: text/plain, Size: 1197 bytes --] 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 [-- Attachment #1.2: Type: text/html, Size: 2138 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-01 19:44 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <mailman.370.1096485805.2017.help-gnu-emacs@gnu.org> 2004-09-29 21:09 ` Emacs changed indenting on me Sarir Khamsi 2004-09-30 12:48 ` Greg Rowe 2004-09-29 18:33 Sarir Khamsi 2004-09-29 19:16 ` EScott 2004-09-29 22:31 ` Sarir Khamsi 2004-09-30 12:38 ` J. David Boyd [not found] ` <mailman.513.1096548315.2017.help-gnu-emacs@gnu.org> 2004-10-01 18:13 ` Sarir Khamsi 2004-10-01 19:44 ` EScott
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.