(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))
(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))
;; 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)
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
;; 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))))
(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.
; *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)
(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))))))
(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))
(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))
(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
(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.
;; 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))
(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)
(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))
((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)
(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))
(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
(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.
(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
(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
(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)))
(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))
(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)
(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)))