bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#681: Wrong C++ indentation in batch mode


From: Alan Mackenzie
Subject: bug#681: Wrong C++ indentation in batch mode
Date: Mon, 4 Jan 2016 23:16:42 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello Vivien.

On Mon, Dec 28, 2015 at 08:18:02PM -0500, Andrew Hyatt wrote:

> Bastien <bzg@altern.org> writes:

> > Hi Vivien,

> > Vivien Mallet <Vivien.Mallet@inria.fr> writes:

> >> Now, launch from command line:
> >> \emacs -Q test.cpp --batch --eval="(defun cpp_indent () (c-set-style 
> >> \"gnu\") (c++-mode) (indent-region (point-min) (point-max) ()) 
> >> (save-buffer))" --eval="(cpp_indent)"

> >> You should get:

> >> template <class A, class B>
> >> Derived<A, B>::Derived():
> >>   Base<A,
> >>   B>() // Problem: wrong indentation in batch mode.
> >> {
> >>   int i:
> >> }

> >> In addition, it seems that "c-set-style" is not honored. It may be
> >> "bsd", "k&r", etc. without any difference.

> > Mhh... yes, I see now.

> > I reopend the bug and will let someone more familiar
> > with the code fix it.

> I'm not the one more familiar, but I just want to record that this still
> reproduces on emacs 25.

I've committed what I hope is a fix to the emacs-25 branch at savannah.
Sorry it's taken (a lot) longer than it should have done.

Would you please tell me what version of Emacs you're currently using,
and I will try to adapt the patch for that version.  Then I will ask you
to try out the patch and let me know whether or not there are still
errors.

Then, hopefully, we can close this bug.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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