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

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

bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue.


From: Bob
Subject: bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue.
Date: Tue, 16 Feb 2010 10:35:37 -0800

Alan,

>> I am now attempting to try your c-state-cache-init and find this is not
>> defined.
>
>That's exactly
>
>    M-: (c-state-cache-init)

Ahh, typed it in wrong.  I have been saving the buffer where the "
SelectInternalConvertableToVectorType" snippet is with the problematic '{'
in column 0.

So I am now able to eval your "(c-state-cache-init)" in the buffer.

The result is no difference, '{' still appears in column 0 when I TAB.
*Messages*
contains "1 (#o1, #x1)" after running it, if that means anything to you.

With regard to being more specific about what I type, that's going to be
really difficult.
Typically, I do a lot of kill - yanks, keyboard entry, and often return to
text to post-insert missing ','s or '>'s and then TAB or C-q C-j.  That's
when I discover a bad indentation case. Sometimes, by TAB-ing on previous
lines then returning to the problematic line, the indentation corrects. I
have done what you did with the snippet also - put it into a separate file,
start a separate emacs session. Each time I do that, the indentation
corrects ('{' is not in col 0) and doesn't get out of whack as I fiddle in
it. Makes me think the problem occurs with more than 1 file visited.

I am preserving the emacs session with the bad '{' indentation (col 0). Is
there any way we can narrow the issue by probing the buffer, such as with
your (c-state-cache-init) ?

Attached is the "c-submit-bug-report" run from the problematic buffer.

Bob

-----Original Message-----
From: Alan Mackenzie [mailto:acm@muc.de] 
Sent: Tuesday, February 16, 2010 8:39 AM
To: Bob
Cc: 'Chong Yidong'; 5570@debbugs.gnu.org
Subject: Re: bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting
issue.

Hi, Bob,

On Mon, Feb 15, 2010 at 09:14:52AM -0800, Bob wrote:
> Alan,

> I am now running two emacs 23.1.91.1, one I started last week with many
> files open in which I "work" etc., and one I just started with dribbling
> "on" to edit a file I have seen the issue in. After half-hours editing in
> this one, nothing bad has happened. I temporarily jumped back to the
"work"
> session to add a few needed lines and wammy! the problem appeared after
> adding 7 lines:

Could you be a little bit more exact in exactly what you did here.  I
have just fired up emacs 23.1.91, typed in 

    namespace foo
    {

(in column 0), then typed in the the lines that you've identified as
causing the error:

>   template<class _DataType>
>   struct SelectInternalConvertableToVectorType
>   {
>     typedef typename DataTypeTrait<_DataType>::TAbout TAbout;
>
>     typedef TL::IF<TL::MemberOf<TAbout,EnumDTP::Internal>::value>
> TInternal;
>     typedef TL::IF<
>       TL::MemberOf<TAbout,EnumDTP::HasVectorType>::value
>       >                                          TConvertableToVectorType;
>       
>     typedef TL::IF<
>       (TInternal::value &&
> TConvertableToVectorType::value),_DataType,TL::False
>       >::Result                                               Result;
> };   <------------------------ Appears in column 1

However, that "};" for me appeared in the correct column, not in column
0.

> I wrote the buffer, started a 3rd emacs, went to the line, hit TAB and the
> indentation
> corrected:

That, at least, is refreshing.

>   };   <------------------------ Correct.

> Back in the original session TAB still places the '{' in column 1.

It doesn't for me.  But I _have_ seen this error happening.

So, could you please try and give me a precise recipe for how to
reproduce the error, down at the level of what the buffer should look
like before inserting these lines, and which keys to press to insert
them.  Was I correct in guessing that you typed in the lines when you
said you "added" them, as opposed to, say, C-y?

> I am now attempting to try your c-state-cache-init and find this is not
> defined.

That's exactly

    M-: (c-state-cache-init)

, including the parens round the word.  Are you certain you typed it
correctly?  It should be there in Emacs 23.1.91.

> Please advise what to do. I've attached "describe-bindings" if that helps.


> Thanks,
> Bob

> PS "C-c C-b" runs "c-submit-bug-report" - is that what you expect?

Yes.  It produces a dump of CC Mode's config as part of a mail buffer.
Cut and paste it into your own mail client.

-- 
Alan Mackenzie (Nuremberg, Germany).

Attachment: Mail
Description: Binary data


reply via email to

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