[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117443: Don't call c-parse-state when c++-template-
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] trunk r117443: Don't call c-parse-state when c++-template-syntax-table is active. |
Date: |
Sun, 29 Jun 2014 11:32:16 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117443
revision-id: address@hidden
parent: address@hidden
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sun 2014-06-29 11:26:47 +0000
message:
Don't call c-parse-state when c++-template-syntax-table is active.
* progmodes/cc-engine.el (c-guess-continued-construct CASE G)
(c-guess-basic-syntax CASE 5D.3): Rearrange so that
c-syntactic-skip-backwards isn't called with the pertinent syntax
table.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/cc-defs.el ccdefs.el-20091113204419-o5vbwnq5f7feedwu-1226
lisp/progmodes/cc-engine.el
ccengine.el-20091113204419-o5vbwnq5f7feedwu-1227
lisp/progmodes/cc-langs.el cclangs.el-20091113204419-o5vbwnq5f7feedwu-1228
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-28 17:27:29 +0000
+++ b/lisp/ChangeLog 2014-06-29 11:26:47 +0000
@@ -1,3 +1,11 @@
+2014-06-29 Alan Mackenzie <address@hidden>
+
+ Don't call c-parse-state when c++-template-syntax-table is active.
+ * progmodes/cc-engine.el (c-guess-continued-construct CASE G)
+ (c-guess-basic-syntax CASE 5D.3): Rearrange so that
+ c-syntactic-skip-backwards isn't called with the pertinent syntax
+ table.
+
2014-06-28 Stephen Berman <address@hidden>
* calendar/todo-mode.el (todo-set-top-priorities): Fix logic to
=== modified file 'lisp/progmodes/cc-defs.el'
--- a/lisp/progmodes/cc-defs.el 2014-02-09 12:34:25 +0000
+++ b/lisp/progmodes/cc-defs.el 2014-06-29 11:26:47 +0000
@@ -823,6 +823,8 @@
(defmacro c-with-syntax-table (table &rest code)
;; Temporarily switches to the specified syntax table in a failsafe
;; way to execute code.
+ ;; Maintainers' note: If TABLE is `c++-template-syntax-table', DON'T call
+ ;; any forms inside this that call `c-parse-state'. !!!!
`(let ((c-with-syntax-table-orig-table (syntax-table)))
(unwind-protect
(progn
=== modified file 'lisp/progmodes/cc-engine.el'
--- a/lisp/progmodes/cc-engine.el 2014-05-30 17:06:53 +0000
+++ b/lisp/progmodes/cc-engine.el 2014-06-29 11:26:47 +0000
@@ -9355,16 +9355,16 @@
(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)))
+ (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))
@@ -10022,16 +10022,16 @@
(eq (char-after placeholder) ?<))))))
(c-with-syntax-table c++-template-syntax-table
(goto-char placeholder)
- (c-beginning-of-statement-1 lim t)
- (if (save-excursion
- (c-backward-syntactic-ws lim)
- (eq (char-before) ?<))
- ;; In a nested template arglist.
- (progn
- (goto-char placeholder)
- (c-syntactic-skip-backward "^,;" lim t)
- (c-forward-syntactic-ws))
- (back-to-indentation)))
+ (c-beginning-of-statement-1 lim t))
+ (if (save-excursion
+ (c-backward-syntactic-ws lim)
+ (eq (char-before) ?<))
+ ;; In a nested template arglist.
+ (progn
+ (goto-char placeholder)
+ (c-syntactic-skip-backward "^,;" lim 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))
=== modified file 'lisp/progmodes/cc-langs.el'
--- a/lisp/progmodes/cc-langs.el 2014-06-14 23:54:39 +0000
+++ b/lisp/progmodes/cc-langs.el 2014-06-29 11:26:47 +0000
@@ -394,7 +394,9 @@
;; lists are parsed. Note that this encourages incorrect parsing of
;; templates since they might contain normal operators that uses the
;; '<' and '>' characters. Therefore this syntax table might go
- ;; away when CC Mode handles templates correctly everywhere.
+ ;; away when CC Mode handles templates correctly everywhere. WHILE
+ ;; THIS SYNTAX TABLE IS CURRENT, `c-parse-state' MUST _NOT_ BE
+ ;; CALLED!!!
t nil
(java c++) `(lambda ()
(let ((table (funcall ,(c-lang-const c-make-mode-syntax-table))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117443: Don't call c-parse-state when c++-template-syntax-table is active.,
Alan Mackenzie <=