aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKenichi Handa2014-07-02 00:34:58 +0900
committerKenichi Handa2014-07-02 00:34:58 +0900
commit763a11d0d0dcf543e89a22c98f55ea07c40ceefa (patch)
tree9ecaec1b8a509a799903926ecd961ab905a1b1bd /lisp/progmodes
parent0782685d43f026b2366dbacbebc79021a9df50c6 (diff)
parenta519335cc3a00f3d4d8efac2c08d9b6b17c7fcf0 (diff)
downloademacs-763a11d0d0dcf543e89a22c98f55ea07c40ceefa.tar.gz
emacs-763a11d0d0dcf543e89a22c98f55ea07c40ceefa.zip
merge trunk
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/cc-engine.el40
-rw-r--r--lisp/progmodes/cc-langs.el4
3 files changed, 25 insertions, 21 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 1606cfb3357..594ff053d44 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -823,6 +823,8 @@ be after it."
823(defmacro c-with-syntax-table (table &rest code) 823(defmacro c-with-syntax-table (table &rest code)
824 ;; Temporarily switches to the specified syntax table in a failsafe 824 ;; Temporarily switches to the specified syntax table in a failsafe
825 ;; way to execute code. 825 ;; way to execute code.
826 ;; Maintainers' note: If TABLE is `c++-template-syntax-table', DON'T call
827 ;; any forms inside this that call `c-parse-state'. !!!!
826 `(let ((c-with-syntax-table-orig-table (syntax-table))) 828 `(let ((c-with-syntax-table-orig-table (syntax-table)))
827 (unwind-protect 829 (unwind-protect
828 (progn 830 (progn
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 6b406b0d89c..7404241af9b 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -9355,16 +9355,16 @@ comment at the start of cc-engine.el for more info."
9355 (not (looking-at c-<-op-cont-regexp)))))) 9355 (not (looking-at c-<-op-cont-regexp))))))
9356 (c-with-syntax-table c++-template-syntax-table 9356 (c-with-syntax-table c++-template-syntax-table
9357 (goto-char placeholder) 9357 (goto-char placeholder)
9358 (c-beginning-of-statement-1 containing-sexp t) 9358 (c-beginning-of-statement-1 containing-sexp t))
9359 (if (save-excursion 9359 (if (save-excursion
9360 (c-backward-syntactic-ws containing-sexp) 9360 (c-backward-syntactic-ws containing-sexp)
9361 (eq (char-before) ?<)) 9361 (eq (char-before) ?<))
9362 ;; In a nested template arglist. 9362 ;; In a nested template arglist.
9363 (progn 9363 (progn
9364 (goto-char placeholder) 9364 (goto-char placeholder)
9365 (c-syntactic-skip-backward "^,;" containing-sexp t) 9365 (c-syntactic-skip-backward "^,;" containing-sexp t)
9366 (c-forward-syntactic-ws)) 9366 (c-forward-syntactic-ws))
9367 (back-to-indentation))) 9367 (back-to-indentation))
9368 ;; FIXME: Should use c-add-stmt-syntax, but it's not yet 9368 ;; FIXME: Should use c-add-stmt-syntax, but it's not yet
9369 ;; template aware. 9369 ;; template aware.
9370 (c-add-syntax 'template-args-cont (point) placeholder)) 9370 (c-add-syntax 'template-args-cont (point) placeholder))
@@ -10022,16 +10022,16 @@ comment at the start of cc-engine.el for more info."
10022 (eq (char-after placeholder) ?<)))))) 10022 (eq (char-after placeholder) ?<))))))
10023 (c-with-syntax-table c++-template-syntax-table 10023 (c-with-syntax-table c++-template-syntax-table
10024 (goto-char placeholder) 10024 (goto-char placeholder)
10025 (c-beginning-of-statement-1 lim t) 10025 (c-beginning-of-statement-1 lim t))
10026 (if (save-excursion 10026 (if (save-excursion
10027 (c-backward-syntactic-ws lim) 10027 (c-backward-syntactic-ws lim)
10028 (eq (char-before) ?<)) 10028 (eq (char-before) ?<))
10029 ;; In a nested template arglist. 10029 ;; In a nested template arglist.
10030 (progn 10030 (progn
10031 (goto-char placeholder) 10031 (goto-char placeholder)
10032 (c-syntactic-skip-backward "^,;" lim t) 10032 (c-syntactic-skip-backward "^,;" lim t)
10033 (c-forward-syntactic-ws)) 10033 (c-forward-syntactic-ws))
10034 (back-to-indentation))) 10034 (back-to-indentation))
10035 ;; FIXME: Should use c-add-stmt-syntax, but it's not yet 10035 ;; FIXME: Should use c-add-stmt-syntax, but it's not yet
10036 ;; template aware. 10036 ;; template aware.
10037 (c-add-syntax 'template-args-cont (point) placeholder)) 10037 (c-add-syntax 'template-args-cont (point) placeholder))
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index d2d2de8801a..ee002b7bc7b 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -394,7 +394,9 @@ The syntax tables aren't stored directly since they're quite large."
394 ;; lists are parsed. Note that this encourages incorrect parsing of 394 ;; lists are parsed. Note that this encourages incorrect parsing of
395 ;; templates since they might contain normal operators that uses the 395 ;; templates since they might contain normal operators that uses the
396 ;; '<' and '>' characters. Therefore this syntax table might go 396 ;; '<' and '>' characters. Therefore this syntax table might go
397 ;; away when CC Mode handles templates correctly everywhere. 397 ;; away when CC Mode handles templates correctly everywhere. WHILE
398 ;; THIS SYNTAX TABLE IS CURRENT, `c-parse-state' MUST _NOT_ BE
399 ;; CALLED!!!
398 t nil 400 t nil
399 (java c++) `(lambda () 401 (java c++) `(lambda ()
400 (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table)))) 402 (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table))))