all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org, xemacs-beta@xemacs.org
Subject: C Mode possibility: optionally disabling K&R function headers. WDYT?
Date: Thu, 8 Dec 2011 11:25:53 +0000	[thread overview]
Message-ID: <20111208112553.GA3205@acm.acm> (raw)

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).



             reply	other threads:[~2011-12-08 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08 11:25 Alan Mackenzie [this message]
2011-12-08 13:40 ` C Mode possibility: optionally disabling K&R function headers. WDYT? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111208112553.GA3205@acm.acm \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=xemacs-beta@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.