Commit e6597158 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

progmodes/cc-engine.el (c-guess-continued-construct): Correct the

handling of template-args-cont, particularly for when font lock is
disabled.  Name this case as "CASE G".
parent 51bb811f
2011-06-30 Alan Mackenzie <acm@muc.de>
* progmodes/cc-engine.el (c-guess-continued-construct): Correct
the handling of template-args-cont, particularly for when font
lock is disabled. Name this case as "CASE G".
2011-06-30 Ken Manheimer <ken.manheimer@gmail.com> 2011-06-30 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el (allout-yank-processing): Fix injection of extra space * allout.el (allout-yank-processing): Fix injection of extra space
......
...@@ -8712,6 +8712,35 @@ comment at the start of cc-engine.el for more info." ...@@ -8712,6 +8712,35 @@ comment at the start of cc-engine.el for more info."
(c-beginning-of-statement-1 containing-sexp) (c-beginning-of-statement-1 containing-sexp)
(c-add-syntax 'annotation-var-cont (point))) (c-add-syntax 'annotation-var-cont (point)))
;; CASE G: a template list continuation?
;; Mostly a duplication of case 5D.3 to fix templates-19:
((and (c-major-mode-is 'c++-mode)
(save-excursion
(goto-char indent-point)
(c-with-syntax-table c++-template-syntax-table
(setq placeholder (c-up-list-backward)))
(and placeholder
(eq (char-after placeholder) ?<)
(/= (char-before placeholder) ?<)
(progn
(goto-char (1+ placeholder))
(not (looking-at c-<-op-cont-regexp))))))
(c-with-syntax-table c++-template-syntax-table
(goto-char placeholder)
(c-beginning-of-statement-1 containing-sexp t)
(if (save-excursion
(c-backward-syntactic-ws containing-sexp)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" containing-sexp t)
(c-forward-syntactic-ws))
(back-to-indentation)))
;; FIXME: Should use c-add-stmt-syntax, but it's not yet
;; template aware.
(c-add-syntax 'template-args-cont (point) placeholder))
;; CASE D: continued statement. ;; CASE D: continued statement.
(t (t
(c-beginning-of-statement-1 containing-sexp) (c-beginning-of-statement-1 containing-sexp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment