# HG changeset patch # User Alan Mackenzie # Date 1201638102 0 # Node ID 8490f9f99fe37c7cfa2da5fcd68694b31741bd23 # Parent 3023e777a4849bcfccd8b09a62778461cd6da1cc (c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function correctly on "template", not the following "<". diff -r 3023e777a484 -r 8490f9f99fe3 lisp/progmodes/cc-engine.el --- a/lisp/progmodes/cc-engine.el Tue Jan 29 20:20:27 2008 +0000 +++ b/lisp/progmodes/cc-engine.el Tue Jan 29 20:21:42 2008 +0000 @@ -8033,12 +8033,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).