From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:21:42 +0000 (+0000) Subject: (c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function X-Git-Tag: emacs-pretest-23.0.90~8335 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=86f4a763d44cb450fa2f32bd8443680ae412a70f;p=emacs.git (c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function correctly on "template", not the following "<". --- diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 322771f0dab..48bbcaf18cf 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -8033,12 +8033,15 @@ comment at the start of cc-engine.el for more info." ;; 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).