# HG changeset patch # User Alan Mackenzie # Date 1201637864 0 # Node ID 6b6540ecfecfb2934c8d0005798c45e3dfc496a3 # Parent efaa1cd7126bc50e17f48f272c5973e2ee40ccb1 (c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function correctly on "template", not the following "<". diff -r efaa1cd7126b -r 6b6540ecfecf lisp/progmodes/cc-engine.el --- 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).