all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#11386: C++11 support: C++ mode gets (temporarily) confused by edits to convert "> >" to ">>" in templates
@ 2012-04-30 21:05 James Dennett
  2014-11-18 17:00 ` Rüdiger Sonderfeld
       [not found] ` <mailman.13959.1416330148.1147.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: James Dennett @ 2012-04-30 21:05 UTC (permalink / raw)
  To: 11386

C++ mode gets confused if C++98 code is updated to omit the (now
unnecessary) space between the closing ">" angle brackets in template
argument lists.

To reproduce:

Start by typing the following (C++98) code:

int foo() {
  vector<vector<string> > temp;
}

So far, so good. Now go back and remove the extra space between the
closing angle brackets.  This will cause the closing } to not match
the opening { (according to emacs), so if you then add another
function below foo, you'll get something like:

int foo() {
  vector<vector<string>> temp;
  return 0;
}

      int bar() {
  }

where the indentation of everything after the function foo() is
broken.  Matching of the angle brackets is also broken.

The buffer can be restored to a good state by erasing and retyping the
inner "<" in the type.  Adding the extra space and removing it will
put the buffer back in a bad state.  Reading the code from file (with
or without the extra space) also leaves the buffer in a good state.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-18 21:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30 21:05 bug#11386: C++11 support: C++ mode gets (temporarily) confused by edits to convert "> >" to ">>" in templates James Dennett
2014-11-18 17:00 ` Rüdiger Sonderfeld
     [not found] ` <mailman.13959.1416330148.1147.bug-gnu-emacs@gnu.org>
2014-11-18 21:15   ` Alan Mackenzie

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.