[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104813: progmodes/cc-engine.el (c-gu
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104813: progmodes/cc-engine.el (c-guess-continued-construct): Correct the |
Date: |
Thu, 30 Jun 2011 15:12:59 +0000 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104813
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Thu 2011-06-30 15:12:59 +0000
message:
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".
modified:
lisp/ChangeLog
lisp/progmodes/cc-engine.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-06-30 14:38:35 +0000
+++ b/lisp/ChangeLog 2011-06-30 15:12:59 +0000
@@ -1,3 +1,9 @@
+2011-06-30 Alan Mackenzie <address@hidden>
+
+ * 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 <address@hidden>
* allout.el (allout-yank-processing): Fix injection of extra space
=== modified file 'lisp/progmodes/cc-engine.el'
--- a/lisp/progmodes/cc-engine.el 2011-05-05 04:00:38 +0000
+++ b/lisp/progmodes/cc-engine.el 2011-06-30 15:12:59 +0000
@@ -8712,6 +8712,35 @@
(c-beginning-of-statement-1 containing-sexp)
(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.
(t
(c-beginning-of-statement-1 containing-sexp)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104813: progmodes/cc-engine.el (c-guess-continued-construct): Correct the,
Alan Mackenzie <=