🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188811

trouble with backward-sentence in c-mode

#188811
From: Andy Davidson
Date: Thu, 11 Jul 1991 23:52
40 lines
1425 bytes
In text-mode M-a does backward-sentence. (moves to the first character
of the current sentence) In C-mode these same key strokes move to the
begining of the function instead of to the begin of the sentance?

I am trying to write a macro to correct a problem with the code
produced in c-mode. currently my c-mode produce code like

foo()
{
	if (foo)
		{
			this is wrong;
		}
}

what I want is 

foo()
{
	if (foo)
		{
		this is correct;
		}
}


what I want my macro to do is go to the begining of the current
sentence and delete the extra tabs/spaces. what would be even better
is this macro could correct all the formating errors for the current
buffer. 

Any ideas?
thanks in advance Andy

P.s. I am using gnuemacs 18.55 on a sun workstation sunos 4.1
-- 

-----------------------------------------------------------------
                 "bede-bede-bede Thats all Folks"
                            Porky Pig
Technical Details
Message-ID: <1991Jul11.235234.8981@cats.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!fernwood!portal!cats.com!andy

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,b63a58d0e78746c1,start
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-07-11 23:55:55 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!fernwood!portal!cats.com!andy
From: andy@cats.com (Andy Davidson)
Newsgroups: gnu.emacs.help
Subject: trouble with backward-sentence in c-mode
Message-ID: <1991Jul11.235234.8981@cats.com>
Date: 11 Jul 91 23:52:34 GMT
Organization: CATS Software Inc
Lines: 40