summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-engine.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r--lisp/progmodes/cc-engine.el305
1 files changed, 160 insertions, 145 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index f751e72de47..252eec138c1 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -163,7 +163,9 @@
(defvar c-doc-line-join-re)
(defvar c-doc-bright-comment-start-re)
(defvar c-doc-line-join-end-ch)
-(defvar c-fl-syn-tab-region)
+(cc-bytecomp-defvar c-min-syn-tab-mkr)
+(cc-bytecomp-defvar c-max-syn-tab-mkr)
+(cc-bytecomp-defun c-clear-syn-tab)
(cc-bytecomp-defun c-clear-string-fences)
(cc-bytecomp-defun c-restore-string-fences)
@@ -405,7 +407,7 @@ comment at the start of cc-engine.el for more info."
(when (and (car c-macro-cache)
(> (point) (car c-macro-cache)) ; in case we have a
; zero-sized region.
- (not (eq (char-before (1- (point))) ?\\)))
+ (not lim))
(setcdr c-macro-cache (point))
(setq c-macro-cache-syntactic nil)))))))
@@ -1580,6 +1582,7 @@ comment at the start of cc-engine.el for more info."
(save-excursion (backward-char)
(looking-at "\\s("))
(c-crosses-statement-barrier-p (point) end)))))
+(make-obsolete 'c-at-expression-start-p nil "CC mode 5.35")
;; A set of functions that covers various idiosyncrasies in
@@ -1642,6 +1645,21 @@ comment at the start of cc-engine.el for more info."
(forward-char 2)
t))))
+(defmacro c-forward-comment-minus-1 ()
+ "Call (forward-comment -1), taking care of escaped newlines.
+Return the result of `forward-comment' if it gets called, nil otherwise."
+ `(if (not comment-end-can-be-escaped)
+ (forward-comment -1)
+ (when (and (< (skip-syntax-backward " >") 0)
+ (eq (char-after) ?\n))
+ (forward-char))
+ (cond
+ ((and (eq (char-before) ?\n)
+ (eq (char-before (1- (point))) ?\\))
+ (backward-char)
+ nil)
+ (t (forward-comment -1)))))
+
(defun c-backward-single-comment ()
"Move backward past whitespace and the closest preceding comment, if any.
Return t if a comment was found, nil otherwise. In either case, the
@@ -1675,12 +1693,12 @@ This function does not do any hidden buffer changes."
;; same line.
(re-search-forward "\\=\\s *[\n\r]" start t)
- (if (if (forward-comment -1)
+ (if (if (c-forward-comment-minus-1)
(if (eolp)
;; If forward-comment above succeeded and we're at eol
;; then the newline we moved over above didn't end a
;; line comment, so we give it another go.
- (forward-comment -1)
+ (c-forward-comment-minus-1)
t))
;; Emacs <= 20 and XEmacs move back over the closer of a
@@ -1709,7 +1727,7 @@ comment at the start of cc-engine.el for more info."
(if (let (moved-comment)
(while
- (and (not (setq moved-comment (forward-comment -1)))
+ (and (not (setq moved-comment (c-forward-comment-minus-1)))
;; Cope specifically with ^M^J here -
;; forward-comment sometimes gets stuck after ^Ms,
;; sometimes after ^M^J.
@@ -1895,52 +1913,29 @@ comment at the start of cc-engine.el for more info."
(defun c-enclosing-c++-attribute ()
;; If we're in C++ Mode, and point is within a correctly balanced [[ ... ]]
;; attribute structure, return a cons of its starting and ending positions.
- ;; Otherwise, return nil. We use the c-{in,is}-sws-face text properties for
- ;; this determination, this macro being intended only for use in the *-sws-*
- ;; functions and macros. The match data are NOT preserved over this macro.
- (let (attr-end pos-is-sws)
- (and
- (c-major-mode-is 'c++-mode)
- (> (point) (point-min))
- (setq pos-is-sws
- (if (get-text-property (1- (point)) 'c-is-sws)
- (1- (point))
- (1- (previous-single-property-change
- (point) 'c-is-sws nil (point-min)))))
- (save-excursion
- (goto-char pos-is-sws)
- (setq attr-end (c-looking-at-c++-attribute)))
- (> attr-end (point))
- (cons pos-is-sws attr-end))))
-
-(defun c-slow-enclosing-c++-attribute ()
- ;; Like `c-enclosing-c++-attribute', but does not depend on the c-i[ns]-sws
- ;; properties being set.
+ ;; Otherwise, return nil.
(and
(c-major-mode-is 'c++-mode)
(save-excursion
- (let ((paren-state (c-parse-state))
+ (let ((lim (max (- (point) 200) (point-min)))
cand)
(while
- (progn
- (setq cand
- (catch 'found-cand
- (while (cdr paren-state)
- (when (and (numberp (car paren-state))
- (numberp (cadr paren-state))
- (eq (car paren-state)
- (1+ (cadr paren-state)))
- (eq (char-after (car paren-state)) ?\[)
- (eq (char-after (cadr paren-state)) ?\[))
- (throw 'found-cand (cadr paren-state)))
- (setq paren-state (cdr paren-state)))))
- (and cand
- (not
- (and (c-go-list-forward cand)
- (eq (char-before) ?\])
- (eq (char-before (1- (point))) ?\])))))
- (setq paren-state (cdr paren-state)))
- (and cand (cons cand (point)))))))
+ (and
+ (progn
+ (skip-chars-backward "^[;{}" lim)
+ (eq (char-before) ?\[))
+ (not (eq (char-before (1- (point))) ?\[))
+ (> (point) lim))
+ (backward-char))
+ (and (eq (char-before) ?\[)
+ (eq (char-before (1- (point))) ?\[)
+ (progn (backward-char 2) t)
+ (setq cand (point))
+ (c-go-list-forward nil (min (+ (point) 200) (point-max)))
+ (eq (char-before) ?\])
+ (eq (char-before (1- (point))) ?\])
+ (not (c-literal-limits))
+ (cons cand (point)))))))
(defun c-invalidate-sws-region-before (beg end)
;; Called from c-before-change. BEG and END are the bounds of the change
@@ -2243,7 +2238,7 @@ comment at the start of cc-engine.el for more info."
((and c-opt-cpp-prefix
(looking-at c-noise-macro-name-re))
- ;; Skip over a noise macro.
+ ;; Skip over a noise macro without parens.
(goto-char (match-end 1))
(not (eobp)))
@@ -2702,7 +2697,7 @@ comment at the start of cc-engine.el for more info."
;; or the car of the list is the "position element" of ELT, the position
;; where ELT is valid.
;;
- ;; POINT is left at the postition for which the returned state is valid. It
+ ;; POINT is left at the position for which the returned state is valid. It
;; will be either the position element of ELT, or one character before
;; that. (The latter happens in Emacs <= 25 and XEmacs, when ELT indicates
;; its position element directly follows a potential first character of a
@@ -2710,7 +2705,7 @@ comment at the start of cc-engine.el for more info."
(if (and (consp elt) (>= (length elt) 3))
;; Inside a string or comment
(let ((depth 0) (containing nil) (last nil)
- in-string in-comment (after-quote nil)
+ in-string in-comment
(min-depth 0) com-style com-str-start (intermediate nil)
(char-1 (nth 3 elt)) ; first char of poss. 2-char construct
(pos (car elt))
@@ -2772,7 +2767,7 @@ comment at the start of cc-engine.el for more info."
((nth 3 state) ; A string
(list (point) (nth 3 state) (nth 8 state)))
((and (nth 4 state) ; A comment
- (not (eq (nth 7 state) 'syntax-table))) ; but not a psuedo comment.
+ (not (eq (nth 7 state) 'syntax-table))) ; but not a pseudo comment.
(list (point)
(if (eq (nth 7 state) 1) 'c++ 'c)
(nth 8 state)))
@@ -2899,7 +2894,7 @@ comment at the start of cc-engine.el for more info."
(setq nc-list (cdr nc-list))))))
(defun c-semi-get-near-cache-entry (here)
- ;; Return the near cache entry at the highest postion before HERE, if any,
+ ;; Return the near cache entry at the highest position before HERE, if any,
;; or nil. The near cache entry is of the form (POSITION . STATE), where
;; STATE has the form of a result of `parse-partial-sexp'.
(let ((nc-pos-state
@@ -2988,9 +2983,7 @@ comment at the start of cc-engine.el for more info."
c-block-comment-awkward-chars)))
(and (nth 4 s) (nth 7 s) ; Line comment
(not (memq (char-before here) '(?\\ ?\n)))))))
- (c-with-extended-string-fences
- pos here
- (setq s (parse-partial-sexp pos here nil nil s))))
+ (setq s (parse-partial-sexp pos here nil nil s)))
(when (not (eq near-pos here))
(c-semi-put-near-cache-entry here s))
(cond
@@ -3031,7 +3024,7 @@ comment at the start of cc-engine.el for more info."
(defun c-full-trim-near-cache ()
;; Remove stale entries in `c-full-lit-near-cache', i.e. those whose END
;; entries, or positions, are above `c-full-near-cache-limit'.
- (let ((nc-list c-full-lit-near-cache) elt)
+ (let ((nc-list c-full-lit-near-cache))
(while nc-list
(let ((elt (car nc-list)))
(if (if (car (cddr elt))
@@ -3122,7 +3115,7 @@ comment at the start of cc-engine.el for more info."
(not base) ; FIXME!!! Compare base and far-base??
; (2019-05-21)
(not end)
- (> here end))
+ (>= here end))
(progn
(setq far-base-and-state (c-parse-ps-state-below here)
far-base (car far-base-and-state)
@@ -3135,7 +3128,7 @@ comment at the start of cc-engine.el for more info."
(or
(and (> here base) (null end))
(null (nth 8 s))
- (and end (> here end))
+ (and end (>= here end))
(not
(or
(and (nth 3 s) ; string
@@ -3194,6 +3187,24 @@ comment at the start of cc-engine.el for more info."
c-semi-near-cache-limit (min c-semi-near-cache-limit pos)
c-full-near-cache-limit (min c-full-near-cache-limit pos)))
+(defun c-foreign-truncate-lit-pos-cache (beg _end)
+ "Truncate CC Mode's literal cache.
+
+This function should be added to the `before-change-functions'
+hook by major modes that use CC Mode's filling functionality
+without initializing CC Mode. Currently (2020-06) these are
+js-mode and mhtml-mode."
+ (c-truncate-lit-pos-cache beg))
+
+(defun c-foreign-init-lit-pos-cache ()
+ "Initialize CC Mode's literal cache.
+
+This function should be called from the mode functions of major
+modes which use CC Mode's filling functionality without
+initializing CC Mode. Currently (2020-06) these are js-mode and
+mhtml-mode."
+ (c-truncate-lit-pos-cache 1))
+
;; A system for finding noteworthy parens before the point.
@@ -7159,7 +7170,7 @@ comment at the start of cc-engine.el for more info."
;; characters.) If the raw string is not terminated, E\) and E\" are set to
;; nil.
;;
- ;; Note: this function is dependant upon the correct syntax-table text
+ ;; Note: this function is dependent upon the correct syntax-table text
;; properties being set.
(let ((state (c-semi-pp-to-literal (point)))
open-quote-pos open-paren-pos close-paren-pos close-quote-pos id)
@@ -7614,8 +7625,7 @@ comment at the start of cc-engine.el for more info."
;; entire raw string (when properly terminated) or just the delimiter
;; (otherwise). In either of these cases, return t, otherwise return nil.
;;
- (let ((here (point))
- in-macro macro-end id Rquote found)
+ (let (in-macro macro-end)
(when
(and
(eq (char-before (1- (point))) ?R)
@@ -8415,6 +8425,7 @@ comment at the start of cc-engine.el for more info."
;; o - 'found if it's a type that matches one in `c-found-types';
;; o - 'maybe if it's an identifier that might be a type;
;; o - 'decltype if it's a decltype(variable) declaration; - or
+ ;; o - 'no-id if "auto" precluded parsing a type identifier.
;; o - nil if it can't be a type (the point isn't moved then).
;;
;; The point is assumed to be at the beginning of a token.
@@ -8439,9 +8450,12 @@ comment at the start of cc-engine.el for more info."
;; prefix of a type.
(when c-opt-type-modifier-prefix-key ; e.g. "const" "volatile", but NOT "typedef"
(while (looking-at c-opt-type-modifier-prefix-key)
+ (when (looking-at c-no-type-key)
+ (setq res 'no-id))
(goto-char (match-end 1))
(c-forward-syntactic-ws)
- (setq res 'prefix)))
+ (or (eq res 'no-id)
+ (setq res 'prefix))))
(cond
((looking-at c-typeof-key) ; e.g. C++'s "decltype".
@@ -8492,28 +8506,30 @@ comment at the start of cc-engine.el for more info."
(setq res t))
(unless res (goto-char start))) ; invalid syntax
- ((progn
- (setq pos nil)
- (if (looking-at c-identifier-start)
- (save-excursion
- (setq id-start (point)
- name-res (c-forward-name))
- (when name-res
- (setq id-end (point)
- id-range c-last-identifier-range))))
- (and (cond ((looking-at c-primitive-type-key)
- (setq res t))
- ((c-with-syntax-table c-identifier-syntax-table
- (looking-at c-known-type-key))
- (setq res 'known)))
- (or (not id-end)
- (>= (save-excursion
- (save-match-data
- (goto-char (match-end 1))
- (c-forward-syntactic-ws)
- (setq pos (point))))
- id-end)
- (setq res nil))))
+ ((and
+ (not (eq res 'no-id))
+ (progn
+ (setq pos nil)
+ (if (looking-at c-identifier-start)
+ (save-excursion
+ (setq id-start (point)
+ name-res (c-forward-name))
+ (when name-res
+ (setq id-end (point)
+ id-range c-last-identifier-range))))
+ (and (cond ((looking-at c-primitive-type-key)
+ (setq res t))
+ ((c-with-syntax-table c-identifier-syntax-table
+ (looking-at c-known-type-key))
+ (setq res 'known)))
+ (or (not id-end)
+ (>= (save-excursion
+ (save-match-data
+ (goto-char (match-end 1))
+ (c-forward-syntactic-ws)
+ (setq pos (point))))
+ id-end)
+ (setq res nil)))))
;; Looking at a primitive or known type identifier. We've
;; checked for a name first so that we don't go here if the
;; known type match only is a prefix of another name.
@@ -8588,7 +8604,7 @@ comment at the start of cc-engine.el for more info."
(goto-char start)
(setq res nil)))))
- (when res
+ (when (not (memq res '(nil no-id)))
;; Skip trailing type modifiers. If any are found we know it's
;; a type.
(when c-opt-type-modifier-key
@@ -9119,6 +9135,12 @@ This function might do hidden buffer changes."
(catch 'is-function
(while
(progn
+ (while
+ (cond
+ ((looking-at c-decl-hangon-key)
+ (c-forward-keyword-clause 1))
+ ((looking-at c-noise-macro-with-parens-name-re)
+ (c-forward-noise-clause))))
(if (eq (char-after) ?\))
(throw 'is-function t))
(setq cdd-got-type (c-forward-type))
@@ -9354,8 +9376,8 @@ This function might do hidden buffer changes."
maybe-typeless
;; Save the value of kwd-sym between loops of the "Check for a
;; type" loop. Needed to distinguish a C++11 "auto" from a pre
- ;; C++11 one.
- prev-kwd-sym
+ ;; C++11 one. (Commented out, 2020-11-01).
+ ;; prev-kwd-sym
;; If a specifier is found that also can be a type prefix,
;; these flags are set instead of those above. If we need to
;; back up an identifier, they are copied to the real flag
@@ -9435,12 +9457,11 @@ This function might do hidden buffer changes."
(when (setq found-type (c-forward-type t)) ; brace-block-too
;; Found a known or possible type or a prefix of a known type.
- (when (and (c-major-mode-is 'c++-mode) ; C++11 style "auto"?
- (eq prev-kwd-sym (c-keyword-sym "auto"))
- (looking-at "[=(]")) ; FIXME!!! proper regexp.
- (setq new-style-auto t)
- (setq found-type nil)
- (goto-char start)) ; position of foo in "auto foo"
+ (when (and (eq found-type 'no-id)
+ (save-excursion
+ (and (c-forward-name) ; over the identifier
+ (looking-at "[=(]")))) ; FIXME!!! proper regexp.
+ (setq new-style-auto t)) ; position of foo in "auto foo"
(when at-type
;; Got two identifiers with nothing but whitespace
@@ -9515,7 +9536,7 @@ This function might do hidden buffer changes."
;; specifier keyword and we know we're in a
;; declaration.
(setq at-decl-or-cast t)
- (setq prev-kwd-sym kwd-sym)
+ ;; (setq prev-kwd-sym kwd-sym)
(goto-char kwd-clause-end))))
@@ -9523,7 +9544,7 @@ This function might do hidden buffer changes."
;; over all specifiers and type identifiers. The reason
;; to do this for a known type prefix is to make things
;; like "unsigned INT16" work.
- (and found-type (not (eq found-type t))))))
+ (and found-type (not (memq found-type '(t no-id)))))))
(cond
((eq at-type t)
@@ -9543,6 +9564,10 @@ This function might do hidden buffer changes."
;; followed by another type.
(setq at-type t))
+ ((eq at-type 'no-id)
+ ;; For an auto type, we assume we definitely have a type construct.
+ (setq at-type t))
+
((not at-type)
;; Got no type but set things up to continue anyway to handle
;; the various cases when a declaration doesn't start with a
@@ -9771,6 +9796,16 @@ This function might do hidden buffer changes."
(save-excursion
(goto-char after-paren-pos)
(c-forward-syntactic-ws)
+ (progn
+ (while
+ (cond
+ ((and
+ c-opt-cpp-prefix
+ (looking-at c-noise-macro-with-parens-name-re))
+ (c-forward-noise-clause))
+ ((looking-at c-decl-hangon-key)
+ (c-forward-keyword-clause 1))))
+ t)
(or (c-forward-type)
;; Recognize a top-level typeless
;; function declaration in C.
@@ -11216,7 +11251,7 @@ comment at the start of cc-engine.el for more info."
(c-syntactic-re-search-forward ";" nil 'move t)))
nil)))
-(defun c-looking-at-decl-block (_containing-sexp goto-start &optional limit)
+(defun c-looking-at-decl-block (goto-start &optional limit)
;; Assuming the point is at an open brace, check if it starts a
;; block that contains another declaration level, i.e. that isn't a
;; statement block or a brace list, and if so return non-nil.
@@ -11396,9 +11431,7 @@ comment at the start of cc-engine.el for more info."
; *c-looking-at-decl-block
; containing-sexp goto-start &optional
; limit)
- (when (and (c-looking-at-decl-block
- (c-pull-open-brace paren-state)
- nil)
+ (when (and (c-looking-at-decl-block nil)
(looking-at c-class-key))
(goto-char (match-end 1))
(c-forward-syntactic-ws)
@@ -11417,9 +11450,7 @@ comment at the start of cc-engine.el for more info."
(save-excursion
(goto-char open-paren-pos)
(when (and (eq (char-after) ?{)
- (c-looking-at-decl-block
- (c-safe-position open-paren-pos paren-state)
- nil))
+ (c-looking-at-decl-block nil))
(back-to-indentation)
(vector (point) open-paren-pos))))))
@@ -11432,7 +11463,7 @@ comment at the start of cc-engine.el for more info."
(while (and open-brace
(save-excursion
(goto-char open-brace)
- (not (c-looking-at-decl-block next-open-brace nil))))
+ (not (c-looking-at-decl-block nil))))
(setq open-brace next-open-brace
next-open-brace (c-pull-open-brace paren-state)))
open-brace))
@@ -11688,7 +11719,16 @@ comment at the start of cc-engine.el for more info."
(not (c-in-literal))
))))
nil)
- (t t))))))
+ (t t)))))
+ ((and
+ (c-major-mode-is 'c++-mode)
+ (eq (char-after) ?\[)
+ ;; Be careful of "operator []"
+ (not (save-excursion
+ (c-backward-token-2 1 nil lim)
+ (looking-at c-opt-op-identifier-prefix))))
+ (setq braceassignp t)
+ nil))
(when (eq braceassignp 'dontknow)
(cond ((and
(not (eq (char-after) ?,))
@@ -11741,7 +11781,7 @@ comment at the start of cc-engine.el for more info."
(goto-char (car res))
(c-do-declarators
(point-max) t nil nil
- (lambda (id-start id-end tok not-top func init)
+ (lambda (id-start _id-end _tok _not-top _func _init)
(cond
((> id-start after-type-id-pos)
(throw 'find-decl nil))
@@ -11831,7 +11871,7 @@ comment at the start of cc-engine.el for more info."
(or accept-in-paren (not (eq (cdr bufpos) 'in-paren)))
(car bufpos))))))
-(defun c-looking-at-special-brace-list (&optional _lim)
+(defun c-looking-at-special-brace-list ()
;; If we're looking at the start of a pike-style list, i.e., `({ })',
;; `([ ])', `(< >)', etc., a cons of a cons of its starting and ending
;; positions and its entry in c-special-brace-lists is returned, nil
@@ -11894,17 +11934,6 @@ comment at the start of cc-engine.el for more info."
(cons (list beg) type)))))
(error nil))))
-(defun c-looking-at-bos (&optional _lim)
- ;; Return non-nil if between two statements or declarations, assuming
- ;; point is not inside a literal or comment.
- ;;
- ;; Obsolete - `c-at-statement-start-p' or `c-at-expression-start-p'
- ;; are recommended instead.
- ;;
- ;; This function might do hidden buffer changes.
- (c-at-statement-start-p))
-(make-obsolete 'c-looking-at-bos 'c-at-statement-start-p "22.1")
-
(defun c-looking-at-statement-block ()
;; Point is at an opening brace. If this is a statement block (i.e. the
;; elements in the block are terminated by semicolons, or the block is
@@ -12075,7 +12104,7 @@ comment at the start of cc-engine.el for more info."
(c-backward-token-2 1 nil lim)
(and
(not (and (c-on-identifier)
- (looking-at c-symbol-chars)))
+ (looking-at c-symbol-char-key)))
(not (looking-at c-opt-op-identifier-prefix)))))))
(cons 'inlambda bracket-pos))
((and c-recognize-paren-inexpr-blocks
@@ -12472,8 +12501,7 @@ comment at the start of cc-engine.el for more info."
(defun c-add-class-syntax (symbol
containing-decl-open
containing-decl-start
- containing-decl-kwd
- _paren-state)
+ containing-decl-kwd)
;; The inclass and class-close syntactic symbols are added in
;; several places and some work is needed to fix everything.
;; Therefore it's collected here.
@@ -12522,7 +12550,7 @@ comment at the start of cc-engine.el for more info."
;; CASE B.1: class-open
((save-excursion
(and (eq (char-after) ?{)
- (c-looking-at-decl-block containing-sexp t)
+ (c-looking-at-decl-block t)
(setq beg-of-same-or-containing-stmt (point))))
(c-add-syntax 'class-open beg-of-same-or-containing-stmt))
@@ -12725,10 +12753,7 @@ comment at the start of cc-engine.el for more info."
(goto-char containing-sexp)
(eq (char-after) ?{))
(setq placeholder
- (c-looking-at-decl-block
- (c-most-enclosing-brace paren-state
- containing-sexp)
- t)))
+ (c-looking-at-decl-block t)))
(setq containing-decl-open containing-sexp
containing-decl-start (point)
containing-sexp nil)
@@ -12970,8 +12995,7 @@ comment at the start of cc-engine.el for more info."
(setq placeholder (c-add-class-syntax 'inclass
containing-decl-open
containing-decl-start
- containing-decl-kwd
- paren-state))
+ containing-decl-kwd))
;; Append access-label with the same anchor point as
;; inclass gets.
(c-append-syntax 'access-label placeholder))
@@ -13043,7 +13067,7 @@ comment at the start of cc-engine.el for more info."
((save-excursion
(let (tmp)
(and (eq char-after-ip ?{)
- (setq tmp (c-looking-at-decl-block containing-sexp t))
+ (setq tmp (c-looking-at-decl-block t))
(progn
(setq placeholder (point))
(goto-char tmp)
@@ -13064,7 +13088,7 @@ comment at the start of cc-engine.el for more info."
(goto-char indent-point)
(skip-chars-forward " \t")
(and (eq (char-after) ?{)
- (c-looking-at-decl-block containing-sexp t)
+ (c-looking-at-decl-block t)
(setq placeholder (point))))
(c-add-syntax 'class-open placeholder))
@@ -13104,8 +13128,7 @@ comment at the start of cc-engine.el for more info."
(c-add-class-syntax 'inclass
containing-decl-open
containing-decl-start
- containing-decl-kwd
- paren-state))
+ containing-decl-kwd))
;; CASE 5A.5: ordinary defun open
(t
@@ -13168,8 +13191,7 @@ comment at the start of cc-engine.el for more info."
(c-add-class-syntax 'inclass
containing-decl-open
containing-decl-start
- containing-decl-kwd
- paren-state)))
+ containing-decl-kwd)))
;; CASE 5B.4: Nether region after a C++ or Java func
;; decl, which could include a `throws' declaration.
@@ -13239,8 +13261,7 @@ comment at the start of cc-engine.el for more info."
(c-add-class-syntax 'inclass
containing-decl-open
containing-decl-start
- containing-decl-kwd
- paren-state)))
+ containing-decl-kwd)))
;; CASE 5C.3: in a Java implements/extends
(injava-inher
@@ -13426,8 +13447,7 @@ comment at the start of cc-engine.el for more info."
(c-add-class-syntax 'class-close
containing-decl-open
containing-decl-start
- containing-decl-kwd
- paren-state))
+ containing-decl-kwd))
;; CASE 5H: we could be looking at subsequent knr-argdecls
((and c-recognize-knr-p
@@ -13548,8 +13568,7 @@ comment at the start of cc-engine.el for more info."
(c-add-class-syntax 'inclass
containing-decl-open
containing-decl-start
- containing-decl-kwd
- paren-state)))
+ containing-decl-kwd)))
(when (and c-syntactic-indentation-in-macros
macro-start
(/= macro-start (c-point 'boi indent-point)))
@@ -13865,7 +13884,7 @@ comment at the start of cc-engine.el for more info."
(save-excursion
(goto-char indent-point)
(c-forward-syntactic-ws (c-point 'eol))
- (c-looking-at-special-brace-list (point)))))
+ (c-looking-at-special-brace-list))))
(c-add-syntax 'brace-entry-open (point))
(c-add-stmt-syntax 'brace-list-entry nil t containing-sexp
paren-state (point))
@@ -13931,9 +13950,7 @@ comment at the start of cc-engine.el for more info."
(and lim
(progn
(goto-char lim)
- (c-looking-at-decl-block
- (c-most-enclosing-brace paren-state lim)
- nil))
+ (c-looking-at-decl-block nil))
(setq placeholder (point))))
(c-backward-to-decl-anchor lim)
(back-to-indentation)
@@ -14101,9 +14118,7 @@ comment at the start of cc-engine.el for more info."
(and (progn
(goto-char placeholder)
(eq (char-after) ?{))
- (c-looking-at-decl-block (c-most-enclosing-brace
- paren-state (point))
- nil))))
+ (c-looking-at-decl-block nil))))
(c-backward-to-decl-anchor lim)
(back-to-indentation)
(c-add-syntax 'defun-block-intro (point)))