[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: |
Alan Mackenzie |
Subject: |
bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue. |
Date: |
Wed, 17 Feb 2010 09:46:52 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Bob,
On Tue, Feb 16, 2010 at 10:35:37AM -0800, Bob wrote:
> 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.
Yes, thanks. The "1 .." is just random noise. The fact that
`c-state-cache-init' fixes nothing tells me that the bug's not to do with
a massive overhaul of the "state cache" (a cache of brace/paren/bracket
positions) I committed several months ago.
> With regard to being more specific about what I type, that's going to be
> really difficult.
OK, I understand that.
> 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 have a hyptothesis: noramlly, when you type in a < or > which "looks
like" a template delimiter, CC Mode marks it as an openining/closing
parenthesis. These can, and do, get confused with "proper" parens, { } (
) [ ], sometimes. It seems likely that on certain deletions, these
marked <s and >s become unbalanced, and this confuses the indentation.
I committed a fix for this on 2010-02-04, barely 2 weeks ago. This fix
ensures that these marks only get applied to < and > in balanced pairs,
and when stuff is deleted does the Right Thing. The fix hasn't yet found
its way into a pretest. If you test on the bzr head, could you try it
out, please. Otherwise, please be patient and try it out on the NEXT
pretest version, when that gets released.
> 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) ?
Could you perhaps test the above hypothesis, please? Turn on
`show-paren-mode'. When you next hit this bad state in a buffer, place
point on a < or >, and see if it mismatches with a proper paren/brace.
> Attached is the "c-submit-bug-report" run from the problematic buffer.
Much appreciated.
> Bob
--
Alan Mackenzie (Nuremberg, Germany).
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Bob, 2010/02/12
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Chong Yidong, 2010/02/13
- Message not available
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Chong Yidong, 2010/02/14
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Alan Mackenzie, 2010/02/14
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Bob, 2010/02/15
- Message not available
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Alan Mackenzie, 2010/02/16
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Bob, 2010/02/16
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue.,
Alan Mackenzie <=
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Bob, 2010/02/17
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Alan Mackenzie, 2010/02/18
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Bob, 2010/02/18
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Alan Mackenzie, 2010/02/19
- bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue., Paul Pogonyshev, 2010/02/20