🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98485

C mode and expressions

#98485
From: Jamie Zawinski
Date: Mon, 24 Jun 1991 23:35
26 lines
1356 bytes
I think C mode needs to know a lot more about the syntax of C.  In lisp mode,
I can have text like

	(blat foop (aref (aref (aref gazorch x) y) z))

place the cursor after "foop", type M-C-t, and have

	(blat (aref (aref (aref gazorch x) y) z) foop)

In C mode, I should be able to do the same with

	blat (foop, gazorch->x->y->z);

but instead of 

	blat (gazorch->x->y->z, foop);
I get
	blat (gazorch, foop->x->y->z);

This is easy in lisp because a lisp "expression" is simple to parse: it's
just parentheses.  For C mode, you have to know a lot more about the syntax,
since the syntax is (well, I was going to be nice but...) so stupid.  

I realize this is pretty hard to do, but it's the Right Thing.

		-- Jamie
Technical Details
Message-ID: <JWZ.91Jun24193541@thalidomide.lucid.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,fc97403a25cac8c2,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-06-25 07:50:04 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage
From: jwz%karoshi@LUCID.COM (Jamie Zawinski)
Newsgroups: gnu.emacs.bug
Subject: C mode and expressions
Message-ID: <JWZ.91Jun24193541@thalidomide.lucid.com>
Date: 24 Jun 91 23:35:41 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: Lucid, Inc., Menlo Park, CA
Lines: 26
Approved: bug-gnu-emacs@prep.ai.mit.edu