changeset 79953:6b6540ecfecf

(c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function correctly on "template", not the following "<".
author Alan Mackenzie <acm@muc.de>
date Tue, 29 Jan 2008 20:17:44 +0000
parents efaa1cd7126b
children b46d51e30692
files lisp/progmodes/cc-engine.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-engine.el	Tue Jan 29 20:16:18 2008 +0000
+++ b/lisp/progmodes/cc-engine.el	Tue Jan 29 20:17:44 2008 +0000
@@ -8030,12 +8030,15 @@
 
 	     ;; CASE 5A.5: ordinary defun open
 	     (t
-	      (goto-char placeholder)
-	      (if (or containing-decl-open macro-start)
-		  (c-add-syntax 'defun-open (c-point 'boi))
-		;; Bogus to use bol here, but it's the legacy.
-		(c-add-syntax 'defun-open (c-point 'bol)))
-	      )))
+	      (save-excursion
+		(c-beginning-of-decl-1 lim)
+		(while (looking-at c-specifier-key)
+		  (goto-char (match-end 1))
+		  (c-forward-syntactic-ws indent-point))
+		(c-add-syntax 'defun-open (c-point 'boi))
+		;; Bogus to use bol here, but it's the legacy.  (Resolved,
+		;; 2007-11-09)
+		))))
 
 	   ;; CASE 5B: After a function header but before the body (or
 	   ;; the ending semicolon if there's no body).