all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* C++ indentation question
@ 2013-01-10  5:37 Shashank Khanvilkar
  2013-01-10 12:38 ` Doug Lewan
  2013-01-10 14:52 ` jack-mac
  0 siblings, 2 replies; 3+ messages in thread
From: Shashank Khanvilkar @ 2013-01-10  5:37 UTC (permalink / raw)
  To: help-gnu-emacs

I have existing code that looks like:
--SNIP--
void foo() {
  int a;
  doSomething();
}
--SNIP--
I need to change this to:
--SNI--
void foo() 
{
  int a;
  doSomething();
}
--SNIP--

How can i do this?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: C++ indentation question
  2013-01-10  5:37 C++ indentation question Shashank Khanvilkar
@ 2013-01-10 12:38 ` Doug Lewan
  2013-01-10 14:52 ` jack-mac
  1 sibling, 0 replies; 3+ messages in thread
From: Doug Lewan @ 2013-01-10 12:38 UTC (permalink / raw)
  To: Shashank Khanvilkar, help-gnu-emacs@gnu.org

I don't think emacs will just change styles for you. You could use `query-replace' M-%.

GNU's indent(1) command might be a better way to go.

,Douglas
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224

When I do good, I feel good. When I do bad, I feel bad and that's my religion. - Abraham Lincoln


> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of Shashank Khanvilkar
> Sent: Thursday, 2013 January 10 00:38
> To: help-gnu-emacs@gnu.org
> Subject: C++ indentation question
> 
> I have existing code that looks like:
> --SNIP--
> void foo() {
>   int a;
>   doSomething();
> }
> --SNIP--
> I need to change this to:
> --SNI--
> void foo()
> {
>   int a;
>   doSomething();
> }
> --SNIP--
> 
> How can i do this?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: C++ indentation question
  2013-01-10  5:37 C++ indentation question Shashank Khanvilkar
  2013-01-10 12:38 ` Doug Lewan
@ 2013-01-10 14:52 ` jack-mac
  1 sibling, 0 replies; 3+ messages in thread
From: jack-mac @ 2013-01-10 14:52 UTC (permalink / raw)
  To: help-gnu-emacs

Le jeudi 10 janvier 2013 06:37:45 UTC+1, Shashank Khanvilkar a écrit :
> I have existing code that looks like:
> void foo() {
>   int a;
> 
> I need to change this to:
> void foo() 
> {
>   int a;

Type the following sequence:
M-% ) SPACE { C-q RET RET ) C-q RET { RET
and then SPACE or BANG (!)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-10 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10  5:37 C++ indentation question Shashank Khanvilkar
2013-01-10 12:38 ` Doug Lewan
2013-01-10 14:52 ` jack-mac

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.