all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: emacs-devel@gnu.org
Subject: Re: [handa@m17n.org: C indentation problem]
Date: Tue, 21 May 2019 12:00:22 +0000	[thread overview]
Message-ID: <20190521120021.GB4706@ACM> (raw)
In-Reply-To: <877eak2hy1.fsf@tcd.ie>

Hello, Basil.

On Tue, May 21, 2019 at 11:57:42 +0100, Basil L. Contovounesios wrote:
> Alan Mackenzie <acm@muc.de> writes:

> >> CC Mode 5.33.2 also indents "Emacs 22-style", i.e. to 5 columns, but the
> >> current sources, AFAICS, are indented to 2 columns, "Emacs 21-style".

> > More to the point, we no longer have knr declarations.

> >> Shouldn't the now-existing c-lineup-gnu-DEFUN-intro-cont be changed
> >> accordingly, to indent to 2 columns instead of 5?

> > Seeing as how we don't have knr declarations any more, it seems senseless
> > now to indent with the CC Mode syntactic symbol knr-argdecl-intro, i.e.
> > 5.  Instead c-basic-offset (2) seems right.

> > How about the following patch?

> > diff -r f9e4e46ed54d cc-align.el
> > --- a/cc-align.el	Mon May 20 12:34:51 2019 +0000
> > +++ b/cc-align.el	Tue May 21 10:24:11 2019 +0000
> > @@ -112,7 +112,7 @@
> >      (let (case-fold-search)
> >        (goto-char (c-langelem-pos langelem))
> >        (if (looking-at "\\<DEFUN\\>")
> > -	  (c-calc-offset '(knr-argdecl-intro))))))
> > +	  c-basic-offset))))

> >  (defun c-block-in-arglist-dwim (arglist-start)
> >    ;; This function implements the DWIM to avoid far indentation of

> LGTM, thanks.

Thanks, I've committed it (with amendments to the doc string).

> -- 
> Basil

-- 
Alan Mackenzie (Nuremberg, Germany).



      reply	other threads:[~2019-05-21 12:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1FTnAc-0004Fk-15@fencepost.gnu.org>
2006-04-18 22:15 ` [handa@m17n.org: C indentation problem] Alan Mackenzie
2006-04-19  1:30   ` Kenichi Handa
2019-04-30 13:11     ` Basil L. Contovounesios
2019-05-20 13:51       ` Basil L. Contovounesios
2019-05-21 10:32       ` Alan Mackenzie
2019-05-21 10:57         ` Basil L. Contovounesios
2019-05-21 12:00           ` Alan Mackenzie [this message]

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=20190521120021.GB4706@ACM \
    --to=acm@muc.de \
    --cc=contovob@tcd.ie \
    --cc=emacs-devel@gnu.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.