aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2008-01-29 20:21:42 +0000
committerAlan Mackenzie2008-01-29 20:21:42 +0000
commit86f4a763d44cb450fa2f32bd8443680ae412a70f (patch)
tree36d018cb18be37d35400ad3b4ddfe5ea97c9006a
parent89710739871b6d907a3239de43abbb5073aa598c (diff)
downloademacs-86f4a763d44cb450fa2f32bd8443680ae412a70f.tar.gz
emacs-86f4a763d44cb450fa2f32bd8443680ae412a70f.zip
(c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function
correctly on "template", not the following "<".
-rw-r--r--lisp/progmodes/cc-engine.el15
1 files changed, 9 insertions, 6 deletions
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."
8033 8033
8034 ;; CASE 5A.5: ordinary defun open 8034 ;; CASE 5A.5: ordinary defun open
8035 (t 8035 (t
8036 (goto-char placeholder) 8036 (save-excursion
8037 (if (or containing-decl-open macro-start) 8037 (c-beginning-of-decl-1 lim)
8038 (c-add-syntax 'defun-open (c-point 'boi)) 8038 (while (looking-at c-specifier-key)
8039 ;; Bogus to use bol here, but it's the legacy. 8039 (goto-char (match-end 1))
8040 (c-add-syntax 'defun-open (c-point 'bol))) 8040 (c-forward-syntactic-ws indent-point))
8041 ))) 8041 (c-add-syntax 'defun-open (c-point 'boi))
8042 ;; Bogus to use bol here, but it's the legacy. (Resolved,
8043 ;; 2007-11-09)
8044 ))))
8042 8045
8043 ;; CASE 5B: After a function header but before the body (or 8046 ;; CASE 5B: After a function header but before the body (or
8044 ;; the ending semicolon if there's no body). 8047 ;; the ending semicolon if there's no body).