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: Andrew Hyatt
Subject: bug#681: Wrong C++ indentation in batch mode
Date: Mon, 25 Jan 2016 23:46:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin)

Alan Mackenzie <acm@muc.de> writes:

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

Seeing as how there's no response, if you've fixed this bug (thanks,
BTW!), perhaps we should close it now?





reply via email to

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