🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98517

ugly indentation in C mode

#98517
From: Eric Hanchrow
Date: Fri, 05 Jul 1991 18:19
28 lines
1767 bytes
GNU Emacs 18.57.1 of Wed Feb  6 1991 on ptl (berkeley-unix)

Put the following into a buffer, and put the buffer in C mode:
----------------cut here------------------------------------------------
extern int x;    /* This comment has (some) parentheses in it */
     
     void
       yoo_hoo (void)
{
  shall_we_go_then (you_and_I);
}
----------------cut here------------------------------------------------

Now mark the whole buffer, and run `indent-region'.  You will notice
that the indentation doesn't change.  This i a bug because the name
and return type of the function shouldn't be indented as much as they
are.

Now delete the open paren in the comment, and run `indent-region'
again, and you will see that the function is indented correctly.

Thanks!
       ------------------------------------------------------------------------
       |Eric Hanchrow		sun.com!nosun!yamada-sun!eric		      |
       |Phase III Logic, Inc.	cse.ogi.edu!yamada-sun!eric		      |
       |1600 N.W. 167th Place		Beaverton, OR 97006-4800 USA	      |
       |Voice: (503)-645-0313		Fax: (503)-645-0207     as of 4-Oct-89|
       --------------Crackling-noises-OK--do-not-correct!----------------------
Technical Details
Message-ID: <9107051819.AA08047@>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!yamada-sun.UUCP!eric

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,2d9457aa502c438f,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-07-05 11:19:23 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!yamada-sun.UUCP!eric
From: eric@yamada-sun.UUCP (Eric Hanchrow)
Newsgroups: gnu.emacs.bug
Subject: ugly indentation in C mode
Message-ID: <9107051819.AA08047@>
Date: 5 Jul 91 18:19:23 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 28
Approved: bug-gnu-emacs@prep.ai.mit.edu