emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: C indentation problem]


From: Alan Mackenzie
Subject: Re: address@hidden: C indentation problem]
Date: Tue, 21 May 2019 12:00:22 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Basil.

On Tue, May 21, 2019 at 11:57:42 +0100, Basil L. Contovounesios wrote:
> Alan Mackenzie <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]