unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* C Mode possibility: optionally disabling K&R function headers. WDYT?
@ 2011-12-08 11:25 Alan Mackenzie
  2011-12-08 13:40 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Mackenzie @ 2011-12-08 11:25 UTC (permalink / raw)
  To: emacs-devel, xemacs-beta

Hello Emacs and XEmacs.

I've got a knotty problem with a C Mode bug report: The use of a macro
in a typedef definition causes the following line to be parsed as a K&R
parameter.  The actual code is this:

    #ifndef G
    #define G(symbol) pieni_ ## symbol
    #endif

    typedef struct G(foobar) *G(foobar_t);
                             typedef int lahna;  <=========== K&R

Solving this bug is difficult.  One way would be just to disable K&R in
C Mode, except when explicitly enabled by the user.  After all, K&R
parameters have been obsolete for over 10 years now.

The key sequnce to toggle it would be C-c C-k.

Can anybody think up any reasons why this would be a Bad Thing.  Does
anybody feel particularly strongly about this?

-- 
Alan Mackenzie (Nuremberg, Germany).



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

end of thread, other threads:[~2011-12-09 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 11:25 C Mode possibility: optionally disabling K&R function headers. WDYT? Alan Mackenzie
2011-12-08 13:40 ` Stefan Monnier
2011-12-09  4:55   ` Stephen J. Turnbull
2011-12-09 14:00     ` Alan Mackenzie
2011-12-09 13:53   ` Alan Mackenzie
2011-12-09 21:11     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).