aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/cc-engine.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 5aa24e67fc0..9fd6d372485 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -7,7 +7,7 @@
7;; 1985 Richard M. Stallman 7;; 1985 Richard M. Stallman
8;; Maintainer: cc-mode-help@python.org 8;; Maintainer: cc-mode-help@python.org
9;; Created: 22-Apr-1997 (split from cc-mode.el) 9;; Created: 22-Apr-1997 (split from cc-mode.el)
10;; Version: 5.16 10;; Version: 5.17
11;; Keywords: c languages oop 11;; Keywords: c languages oop
12 12
13;; This file is part of GNU Emacs. 13;; This file is part of GNU Emacs.
@@ -188,13 +188,13 @@
188 (goto-char end)) 188 (goto-char end))
189 (re-search-backward "[;{}]") 189 (re-search-backward "[;{}]")
190 (forward-char 1)) 190 (forward-char 1))
191 (error 191 (error
192 (let ((beg (point))) 192 (let ((beg (point)))
193 (backward-up-list -1) 193 (c-safe (backward-up-list -1))
194 (let ((end (point))) 194 (let ((end (point)))
195 (goto-char beg) 195 (goto-char beg)
196 (search-forward ";" end 'move)))))) 196 (search-forward ";" end 'move)))
197 197 )))
198 198
199 199
200(defun c-crosses-statement-barrier-p (from to) 200(defun c-crosses-statement-barrier-p (from to)
@@ -750,9 +750,11 @@
750 (save-excursion 750 (save-excursion
751 (goto-char containing-sexp) 751 (goto-char containing-sexp)
752 (forward-sexp -1) 752 (forward-sexp -1)
753 (if (or (looking-at "enum[\t\n ]+") 753 (if (and (or (looking-at "enum[\t\n ]+")
754 (progn (forward-sexp -1) 754 (progn (forward-sexp -1)
755 (looking-at "enum[\t\n ]+"))) 755 (looking-at "enum[\t\n ]+")))
756 (progn (c-end-of-statement-1)
757 (> (point) containing-sexp)))
756 (point))) 758 (point)))
757 (error nil)) 759 (error nil))
758 ;; this will pick up array/aggregate init lists, even if they are nested. 760 ;; this will pick up array/aggregate init lists, even if they are nested.