GNU bug report logs - #10590
c++-mode closing nested template angle braces breaks font-lock, indentation and show-paren-mode.

Previous Next

Packages: cc-mode, emacs;

Reported by: Matt Renaud <mrenaud92 <at> gmail.com>

Date: Tue, 24 Jan 2012 02:56:02 UTC

Severity: normal

Fixed in version 25.1

Done: Alex <agrambot <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matt Renaud <mrenaud92 <at> gmail.com>
To: 10590 <at> debbugs.gnu.org
Subject: bug#10590: c++-mode closing nested template angle braces breaks font-lock, indentation and show-paren-mode.
Date: Mon, 23 Jan 2012 21:46:01 -0500
[Message part 1 (text/plain, inline)]
*Emacs Version: *24.0.92.2

When writing C++ code with nested templates, putting two (or more) closing
angle braces together causes the font-lock, show-paren-mode and indentation
to break.  Positioning point on any of the closing parentheses fails to
show the matching opening brace which makes template meta-programs
difficult to read.  Any nested templates will cause this.  The following is
a simple example showing the 2 cases:


template <typename T = std::vector<int>>
  struct foo    // Indentation broken here...
  {
  };


int main()
{
  std::vector<std::vector<int>> vv_int; // Font-lock broken here...

  return 0;
}
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.