Mercurial > emacs
changeset 88068:8490f9f99fe3
(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:21:42 +0000 |
parents | 3023e777a484 |
children | e1f1480a05d6 |
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: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).