GNU bug report logs - #7477
[PATCH] cc-mode tries to recognize template in non-templated language

Previous Next

Packages: emacs, cc-mode;

Reported by: Daniel Colascione <dan.colascione <at> gmail.com>

Date: Thu, 25 Nov 2010 03:07:01 UTC

Severity: normal

Tags: patch

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Daniel Colascione <dan.colascione <at> gmail.com>
Subject: bug#7477: closed (Re: bug#7477: [PATCH] cc-mode tries to
 recognize template in non-templated language)
Date: Sun, 12 Dec 2010 13:30:04 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#7477: [PATCH] cc-mode tries to recognize template in non-templated language

which was filed against the emacs,cc-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 7477 <at> debbugs.gnu.org.

-- 
7477: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7477
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: Daniel Colascione <dan.colascione <at> gmail.com>
Cc: 7477-done <at> debbugs.gnu.org
Subject: Re: bug#7477: [PATCH] cc-mode tries to recognize template in
	non-templated language
Date: Sun, 12 Dec 2010 13:50:17 +0000
Hi, Daniel.

On Wed, Nov 24, 2010 at 07:12:05PM -0800, Daniel Colascione wrote:
> If a file in c-mode contains constructs that look like C++ templates,
> c-mode will try to use parts of the template-matching infrastructure
> that have not been initialized.
> 
> === modified file 'lisp/progmodes/cc-engine.el'
> --- lisp/progmodes/cc-engine.el	2010-11-15 04:13:16 +0000
> +++ lisp/progmodes/cc-engine.el	2010-11-25 03:09:29 +0000
> @@ -5889,7 +5889,8 @@
>    ;; `c-record-type-identifiers' is non-nil.
>    ;;
>    ;; This function might do hidden buffer changes.
> -  (when (looking-at "<")
> +  (when (and c-recognize-<>-arglists
> +             (looking-at "<"))
>      (c-forward-<>-arglist t)
>      (c-forward-syntactic-ws))

Thanks again for the patch!  I've committed it.

-- 
Alan Mackenzie (Nuremberg, Germany).

[Message part 3 (message/rfc822, inline)]
From: Daniel Colascione <dan.colascione <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] cc-mode tries to recognize template in non-templated language
Date: Wed, 24 Nov 2010 19:12:05 -0800
[Message part 4 (text/plain, inline)]
If a file in c-mode contains constructs that look like C++ templates,
c-mode will try to use parts of the template-matching infrastructure
that have not been initialized.

=== modified file 'lisp/progmodes/cc-engine.el'
--- lisp/progmodes/cc-engine.el	2010-11-15 04:13:16 +0000
+++ lisp/progmodes/cc-engine.el	2010-11-25 03:09:29 +0000
@@ -5889,7 +5889,8 @@
   ;; `c-record-type-identifiers' is non-nil.
   ;;
   ;; This function might do hidden buffer changes.
-  (when (looking-at "<")
+  (when (and c-recognize-<>-arglists
+             (looking-at "<"))
     (c-forward-<>-arglist t)
     (c-forward-syntactic-ws))



[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 14 years and 165 days ago.

Previous Next


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