;; Either nil, or the last character of the macro currently represented by
;; `c-macro-cache' which isn't in a comment. */
-(defun c-invalidate-macro-cache (beg end)
+(defun c-invalidate-macro-cache (beg _end)
;; Called from a before-change function. If the change region is before or
;; in the macro characterized by `c-macro-cache' etc., nullify it
;; appropriately. BEG and END are the standard before-change-functions
(c-stmt-delim-chars (if comma-delim
c-stmt-delim-chars-with-comma
c-stmt-delim-chars))
- c-in-literal-cache c-maybe-labelp after-case:-pos saved
+ c-maybe-labelp after-case:-pos saved
;; Current position.
pos
;; Position of last stmt boundary character (e.g. ;).
; (not (eobp)))))))
(defmacro c-debug-sws-msg (&rest args)
+ (ignore args)
;;`(message ,@args)
)
paren+1s ; A list of `paren+1's; used to determine a
; good-pos.
bra+1 ; just after L bra-ce.
- bra+1s ; list of OLD values of bra+1.
mstart) ; start of a macro.
(save-excursion
;; Insert the opening brace/bracket/paren position.
(setq c-state-cache (cons (1- pa+1) c-state-cache))
;; Clear admin stuff for the next more nested part of the scan.
- (setq ren+1 pa+1 pa+1 nil bra+1 nil bra+1s nil)
+ (setq ren+1 pa+1 pa+1 nil bra+1 nil)
t) ; Carry on the loop
;; All open p/b/b's at this nesting level, if any, have probably
upper-lim ; ,beyond which `c-state-cache' entries are removed
scan-back-pos
cons-separated
- pair-beg pps-point-state target-depth)
+ pair-beg target-depth)
;; Remove entries beyond HERE. Also remove any entries inside
;; a macro, unless HERE is in the same macro.
target-depth
nil pps-state))
- (if (= (point) pps-point)
- (setq pps-point-state pps-state))
-
(when (eq (car pps-state) target-depth)
(setq pos (point)) ; POS is now just after an R-paren/brace.
(cond
;; brace pair.
(let ((here-bol (c-point 'bol here))
too-high-pa ; recorded {/(/[ next above or just below here, or nil.
- dropped-cons ; was the last removed element a brace pair?
- pa)
+ dropped-cons) ; was the last removed element a brace pair?
;; The easy bit - knock over-the-top bits off `c-state-cache'.
(while (and c-state-cache
- (>= (setq pa (c-state-cache-top-paren)) here))
+ (>= (c-state-cache-top-paren) here))
(setq dropped-cons (consp (car c-state-cache))
too-high-pa (c-state-cache-top-lparen)
c-state-cache (cdr c-state-cache)))
\f
;; Tools for handling comments and string literals.
-(defun c-in-literal (&optional lim detect-cpp)
+(defun c-in-literal (&optional _lim detect-cpp)
"Return the type of literal point is in, if any.
The return value is `c' if in a C-style comment, `c++' if in a C++
style comment, `string' if in a string literal, `pound' if DETECT-CPP
Optional LIM is used as the backward limit of the search. If omitted,
or nil, `c-beginning-of-defun' is used.
-The last point calculated is cached if the cache is enabled, i.e. if
-`c-in-literal-cache' is bound to a two element vector.
-
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
(save-restriction
;; Shut up the byte compiler.
(defvar c-maybe-stale-found-type)
-(defun c-trim-found-types (beg end old-len)
+(defun c-trim-found-types (beg end _old-len)
;; An after change function which, in conjunction with the info in
;; c-maybe-stale-found-type (set in c-before-change), removes a type
;; from `c-found-types', should this type have become stale. For
(c-clear-<>-pair-props)
(forward-char)))))))
+(defvar c-restricted-<>-arglists) ;FIXME: Move definition here?
+(defvar c-parse-and-markup-<>-arglists) ;FIXME: Move definition here?
+
(defun c-restore-<>-properties (_beg _end _old-len)
;; This function is called as an after-change function. It restores the
;; category/syntax-table properties on template/generic <..> pairs between
(c-put-char-property open-paren 'syntax-table '(1)))
(goto-char bound))))
-(defun c-after-change-re-mark-raw-strings (beg end old-len)
+(defun c-after-change-re-mark-raw-strings (_beg _end _old-len)
;; This function applies `syntax-table' text properties to C++ raw strings
;; beginning in the region (c-new-BEG c-new-END). BEG, END, and OLD-LEN are
;; the standard arguments supplied to any after-change function.
;; If `backup-at-type' is nil then the other variables have
;; undefined values.
backup-at-type backup-type-start backup-id-start
- ;; This stores `kwd-sym' of the symbol before the current one.
- ;; This is needed to distinguish the C++11 version of "auto" from
- ;; the pre C++11 meaning.
- backup-kwd-sym
;; Set if we've found a specifier (apart from "typedef") that makes
;; the defined identifier(s) types.
at-type-decl
(setq backup-at-type at-type
backup-type-start type-start
backup-id-start id-start
- backup-kwd-sym kwd-sym
at-type found-type
type-start start
id-start (point)
;; uncommon (e.g. some placements of "const" in C++) it's not worth
;; the effort to look for them.)
-;;; 2008-04-16: commented out the next form, to allow the function to recognize
-;;; "foo (int bar)" in CC (an implicit type (in class foo) without a semicolon)
-;;; as a(n almost complete) declaration, enabling it to be fontified.
+;;; 2008-04-16: commented out the next form, to allow the function to recognize
+;;; "foo (int bar)" in CC (an implicit type (in class foo) without a semicolon)
+;;; as a(n almost complete) declaration, enabling it to be fontified.
;; CASE 13
;; (unless (or at-decl-end (looking-at "=[^=]"))
;; If this is a declaration it should end here or its initializer(*)
(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 (_containing-sexp 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.
;; We're at a "{". Move back to the enum-like keyword that starts this
;; declaration and return t, otherwise don't move and return nil.
(let ((here (point))
- up-sexp-pos before-identifier)
+ before-identifier)
(when c-recognize-post-brace-list-type-p
(c-backward-typed-enum-colon))
(while
next-containing nil))))
(and (consp bufpos) (car bufpos))))))
-(defun c-looking-at-special-brace-list (&optional lim)
+(defun c-looking-at-special-brace-list (&optional _lim)
;; 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
(cons (list beg) type)))))
(error nil))))
-(defun c-looking-at-bos (&optional lim)
+(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.
;;
containing-decl-open
containing-decl-start
containing-decl-kwd
- paren-state)
+ _paren-state)
;; 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.
;; following result clauses, and most of this function is a
;; single gigantic cond. :P
literal char-before-ip before-ws-ip char-after-ip macro-start
- in-macro-expr c-syntactic-context placeholder c-in-literal-cache
+ in-macro-expr c-syntactic-context placeholder
step-type tmpsymbol keyword injava-inher special-brace-list tmp-pos
containing-<
;; The following record some positions for the containing