diff options
| author | Alan Mackenzie | 2020-11-09 21:19:19 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2020-11-09 21:19:19 +0000 |
| commit | ae3904bb5df1136cd6e8fb9d53cc2e081cf2fd01 (patch) | |
| tree | ac25a50676f1a6430d44bebbbf4a32503dd9c089 | |
| parent | 8ece715af613d238a86092abf62db57ded6c55b3 (diff) | |
| download | emacs-ae3904bb5df1136cd6e8fb9d53cc2e081cf2fd01.tar.gz emacs-ae3904bb5df1136cd6e8fb9d53cc2e081cf2fd01.zip | |
CC Mode: fix many compiler warnings which would appear with lexical binding
* lisp/progmodes/cc-align.el (three places) prefix langelem with a _.
* lisp/progmodes/cc-{cmds,engine}.el: Remove superfluous local variables.
* lisp/progmodes/cc-defs.el (c-will-be-unescaped): Remove unused parameter
end.
* lisp/progmodes/cc-engine.el (c-looking-at-decl-block): Remove unused
parameter containing-sexp.
(c-looking-at-special-brace-list); Remove unused parameter lim.
(c-add-class-syntax): Remove unused parameter paren-state.
| -rw-r--r-- | lisp/progmodes/cc-align.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/cc-defs.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 71 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 2 |
5 files changed, 33 insertions, 54 deletions
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el index 6172afecbcf..7884d4bd2ec 100644 --- a/lisp/progmodes/cc-align.el +++ b/lisp/progmodes/cc-align.el | |||
| @@ -1115,7 +1115,7 @@ arglist-cont." | |||
| 1115 | (vector (+ (current-column) c-basic-offset)))) | 1115 | (vector (+ (current-column) c-basic-offset)))) |
| 1116 | (vector 0))))) | 1116 | (vector 0))))) |
| 1117 | 1117 | ||
| 1118 | (defun c-lineup-2nd-brace-entry-in-arglist (langelem) | 1118 | (defun c-lineup-2nd-brace-entry-in-arglist (_langelem) |
| 1119 | "Lineup the second entry of a brace block under the first, when the first | 1119 | "Lineup the second entry of a brace block under the first, when the first |
| 1120 | line is also contained in an arglist or an enclosing brace ON THAT LINE. | 1120 | line is also contained in an arglist or an enclosing brace ON THAT LINE. |
| 1121 | 1121 | ||
| @@ -1156,7 +1156,7 @@ Works with brace-list-intro." | |||
| 1156 | (eq (char-after) ?{)))) | 1156 | (eq (char-after) ?{)))) |
| 1157 | 'c-lineup-arglist-intro-after-paren)) | 1157 | 'c-lineup-arglist-intro-after-paren)) |
| 1158 | 1158 | ||
| 1159 | (defun c-lineup-class-decl-init-+ (langelem) | 1159 | (defun c-lineup-class-decl-init-+ (_langelem) |
| 1160 | "Line up the second entry of a class (etc.) initializer c-basic-offset | 1160 | "Line up the second entry of a class (etc.) initializer c-basic-offset |
| 1161 | characters in from the identifier when: | 1161 | characters in from the identifier when: |
| 1162 | \(i) The type is a class, struct, union, etc. (but not an enum); | 1162 | \(i) The type is a class, struct, union, etc. (but not an enum); |
| @@ -1197,7 +1197,7 @@ Works with: brace-list-intro." | |||
| 1197 | (eq (point) init-pos) | 1197 | (eq (point) init-pos) |
| 1198 | (vector (+ (current-column) c-basic-offset))))))) | 1198 | (vector (+ (current-column) c-basic-offset))))))) |
| 1199 | 1199 | ||
| 1200 | (defun c-lineup-class-decl-init-after-brace (langelem) | 1200 | (defun c-lineup-class-decl-init-after-brace (_langelem) |
| 1201 | "Line up the second entry of a class (etc.) initializer after its opening | 1201 | "Line up the second entry of a class (etc.) initializer after its opening |
| 1202 | brace when: | 1202 | brace when: |
| 1203 | \(i) The type is a class, struct, union, etc. (but not an enum); | 1203 | \(i) The type is a class, struct, union, etc. (but not an enum); |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 4425e275ac9..0ce3b3f6edd 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -907,7 +907,6 @@ settings of `c-cleanup-list' are done." | |||
| 907 | (when (and (boundp 'electric-pair-mode) | 907 | (when (and (boundp 'electric-pair-mode) |
| 908 | electric-pair-mode) | 908 | electric-pair-mode) |
| 909 | (let ((size (buffer-size)) | 909 | (let ((size (buffer-size)) |
| 910 | (c-in-electric-pair-functionality t) | ||
| 911 | post-self-insert-hook) | 910 | post-self-insert-hook) |
| 912 | (electric-pair-post-self-insert-function) | 911 | (electric-pair-post-self-insert-function) |
| 913 | (setq got-pair-} (and at-eol | 912 | (setq got-pair-} (and at-eol |
| @@ -2327,7 +2326,7 @@ with a brace block, at the outermost level of nesting." | |||
| 2327 | (c-save-buffer-state ((paren-state (c-parse-state)) | 2326 | (c-save-buffer-state ((paren-state (c-parse-state)) |
| 2328 | (orig-point-min (point-min)) | 2327 | (orig-point-min (point-min)) |
| 2329 | (orig-point-max (point-max)) | 2328 | (orig-point-max (point-max)) |
| 2330 | lim name where limits fdoc) | 2329 | lim name limits where) |
| 2331 | (setq lim (c-widen-to-enclosing-decl-scope | 2330 | (setq lim (c-widen-to-enclosing-decl-scope |
| 2332 | paren-state orig-point-min orig-point-max)) | 2331 | paren-state orig-point-min orig-point-max)) |
| 2333 | (and lim (setq lim (1- lim))) | 2332 | (and lim (setq lim (1- lim))) |
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 77e263f1aad..c82b3a34e33 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el | |||
| @@ -434,9 +434,8 @@ to it is returned. This function does not modify the point or the mark." | |||
| 434 | (setq count (+ count (skip-chars-backward "\\\\")))) | 434 | (setq count (+ count (skip-chars-backward "\\\\")))) |
| 435 | (not (zerop (logand count 1)))))) | 435 | (not (zerop (logand count 1)))))) |
| 436 | 436 | ||
| 437 | (defmacro c-will-be-unescaped (beg end) | 437 | (defmacro c-will-be-unescaped (beg) |
| 438 | ;; Would the character after END be unescaped after the removal of (BEG END)? | 438 | ;; Would the character after BEG be unescaped? |
| 439 | ;; This is regardless of its current status. It is assumed that (>= POS END). | ||
| 440 | `(save-excursion | 439 | `(save-excursion |
| 441 | (let (count) | 440 | (let (count) |
| 442 | (goto-char ,beg) | 441 | (goto-char ,beg) |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 75e2f0d21f5..252eec138c1 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -2705,7 +2705,7 @@ comment at the start of cc-engine.el for more info." | |||
| 2705 | (if (and (consp elt) (>= (length elt) 3)) | 2705 | (if (and (consp elt) (>= (length elt) 3)) |
| 2706 | ;; Inside a string or comment | 2706 | ;; Inside a string or comment |
| 2707 | (let ((depth 0) (containing nil) (last nil) | 2707 | (let ((depth 0) (containing nil) (last nil) |
| 2708 | in-string in-comment (after-quote nil) | 2708 | in-string in-comment |
| 2709 | (min-depth 0) com-style com-str-start (intermediate nil) | 2709 | (min-depth 0) com-style com-str-start (intermediate nil) |
| 2710 | (char-1 (nth 3 elt)) ; first char of poss. 2-char construct | 2710 | (char-1 (nth 3 elt)) ; first char of poss. 2-char construct |
| 2711 | (pos (car elt)) | 2711 | (pos (car elt)) |
| @@ -3024,7 +3024,7 @@ comment at the start of cc-engine.el for more info." | |||
| 3024 | (defun c-full-trim-near-cache () | 3024 | (defun c-full-trim-near-cache () |
| 3025 | ;; Remove stale entries in `c-full-lit-near-cache', i.e. those whose END | 3025 | ;; Remove stale entries in `c-full-lit-near-cache', i.e. those whose END |
| 3026 | ;; entries, or positions, are above `c-full-near-cache-limit'. | 3026 | ;; entries, or positions, are above `c-full-near-cache-limit'. |
| 3027 | (let ((nc-list c-full-lit-near-cache) elt) | 3027 | (let ((nc-list c-full-lit-near-cache)) |
| 3028 | (while nc-list | 3028 | (while nc-list |
| 3029 | (let ((elt (car nc-list))) | 3029 | (let ((elt (car nc-list))) |
| 3030 | (if (if (car (cddr elt)) | 3030 | (if (if (car (cddr elt)) |
| @@ -7625,8 +7625,7 @@ comment at the start of cc-engine.el for more info." | |||
| 7625 | ;; entire raw string (when properly terminated) or just the delimiter | 7625 | ;; entire raw string (when properly terminated) or just the delimiter |
| 7626 | ;; (otherwise). In either of these cases, return t, otherwise return nil. | 7626 | ;; (otherwise). In either of these cases, return t, otherwise return nil. |
| 7627 | ;; | 7627 | ;; |
| 7628 | (let ((here (point)) | 7628 | (let (in-macro macro-end) |
| 7629 | in-macro macro-end id Rquote found) | ||
| 7630 | (when | 7629 | (when |
| 7631 | (and | 7630 | (and |
| 7632 | (eq (char-before (1- (point))) ?R) | 7631 | (eq (char-before (1- (point))) ?R) |
| @@ -9377,8 +9376,8 @@ This function might do hidden buffer changes." | |||
| 9377 | maybe-typeless | 9376 | maybe-typeless |
| 9378 | ;; Save the value of kwd-sym between loops of the "Check for a | 9377 | ;; Save the value of kwd-sym between loops of the "Check for a |
| 9379 | ;; type" loop. Needed to distinguish a C++11 "auto" from a pre | 9378 | ;; type" loop. Needed to distinguish a C++11 "auto" from a pre |
| 9380 | ;; C++11 one. | 9379 | ;; C++11 one. (Commented out, 2020-11-01). |
| 9381 | prev-kwd-sym | 9380 | ;; prev-kwd-sym |
| 9382 | ;; If a specifier is found that also can be a type prefix, | 9381 | ;; If a specifier is found that also can be a type prefix, |
| 9383 | ;; these flags are set instead of those above. If we need to | 9382 | ;; these flags are set instead of those above. If we need to |
| 9384 | ;; back up an identifier, they are copied to the real flag | 9383 | ;; back up an identifier, they are copied to the real flag |
| @@ -9537,7 +9536,7 @@ This function might do hidden buffer changes." | |||
| 9537 | ;; specifier keyword and we know we're in a | 9536 | ;; specifier keyword and we know we're in a |
| 9538 | ;; declaration. | 9537 | ;; declaration. |
| 9539 | (setq at-decl-or-cast t) | 9538 | (setq at-decl-or-cast t) |
| 9540 | (setq prev-kwd-sym kwd-sym) | 9539 | ;; (setq prev-kwd-sym kwd-sym) |
| 9541 | 9540 | ||
| 9542 | (goto-char kwd-clause-end)))) | 9541 | (goto-char kwd-clause-end)))) |
| 9543 | 9542 | ||
| @@ -11252,7 +11251,7 @@ comment at the start of cc-engine.el for more info." | |||
| 11252 | (c-syntactic-re-search-forward ";" nil 'move t))) | 11251 | (c-syntactic-re-search-forward ";" nil 'move t))) |
| 11253 | nil))) | 11252 | nil))) |
| 11254 | 11253 | ||
| 11255 | (defun c-looking-at-decl-block (_containing-sexp goto-start &optional limit) | 11254 | (defun c-looking-at-decl-block (goto-start &optional limit) |
| 11256 | ;; Assuming the point is at an open brace, check if it starts a | 11255 | ;; Assuming the point is at an open brace, check if it starts a |
| 11257 | ;; block that contains another declaration level, i.e. that isn't a | 11256 | ;; block that contains another declaration level, i.e. that isn't a |
| 11258 | ;; statement block or a brace list, and if so return non-nil. | 11257 | ;; statement block or a brace list, and if so return non-nil. |
| @@ -11432,9 +11431,7 @@ comment at the start of cc-engine.el for more info." | |||
| 11432 | ; *c-looking-at-decl-block | 11431 | ; *c-looking-at-decl-block |
| 11433 | ; containing-sexp goto-start &optional | 11432 | ; containing-sexp goto-start &optional |
| 11434 | ; limit) | 11433 | ; limit) |
| 11435 | (when (and (c-looking-at-decl-block | 11434 | (when (and (c-looking-at-decl-block nil) |
| 11436 | (c-pull-open-brace paren-state) | ||
| 11437 | nil) | ||
| 11438 | (looking-at c-class-key)) | 11435 | (looking-at c-class-key)) |
| 11439 | (goto-char (match-end 1)) | 11436 | (goto-char (match-end 1)) |
| 11440 | (c-forward-syntactic-ws) | 11437 | (c-forward-syntactic-ws) |
| @@ -11453,9 +11450,7 @@ comment at the start of cc-engine.el for more info." | |||
| 11453 | (save-excursion | 11450 | (save-excursion |
| 11454 | (goto-char open-paren-pos) | 11451 | (goto-char open-paren-pos) |
| 11455 | (when (and (eq (char-after) ?{) | 11452 | (when (and (eq (char-after) ?{) |
| 11456 | (c-looking-at-decl-block | 11453 | (c-looking-at-decl-block nil)) |
| 11457 | (c-safe-position open-paren-pos paren-state) | ||
| 11458 | nil)) | ||
| 11459 | (back-to-indentation) | 11454 | (back-to-indentation) |
| 11460 | (vector (point) open-paren-pos)))))) | 11455 | (vector (point) open-paren-pos)))))) |
| 11461 | 11456 | ||
| @@ -11468,7 +11463,7 @@ comment at the start of cc-engine.el for more info." | |||
| 11468 | (while (and open-brace | 11463 | (while (and open-brace |
| 11469 | (save-excursion | 11464 | (save-excursion |
| 11470 | (goto-char open-brace) | 11465 | (goto-char open-brace) |
| 11471 | (not (c-looking-at-decl-block next-open-brace nil)))) | 11466 | (not (c-looking-at-decl-block nil)))) |
| 11472 | (setq open-brace next-open-brace | 11467 | (setq open-brace next-open-brace |
| 11473 | next-open-brace (c-pull-open-brace paren-state))) | 11468 | next-open-brace (c-pull-open-brace paren-state))) |
| 11474 | open-brace)) | 11469 | open-brace)) |
| @@ -11786,7 +11781,7 @@ comment at the start of cc-engine.el for more info." | |||
| 11786 | (goto-char (car res)) | 11781 | (goto-char (car res)) |
| 11787 | (c-do-declarators | 11782 | (c-do-declarators |
| 11788 | (point-max) t nil nil | 11783 | (point-max) t nil nil |
| 11789 | (lambda (id-start id-end tok not-top func init) | 11784 | (lambda (id-start _id-end _tok _not-top _func _init) |
| 11790 | (cond | 11785 | (cond |
| 11791 | ((> id-start after-type-id-pos) | 11786 | ((> id-start after-type-id-pos) |
| 11792 | (throw 'find-decl nil)) | 11787 | (throw 'find-decl nil)) |
| @@ -11876,7 +11871,7 @@ comment at the start of cc-engine.el for more info." | |||
| 11876 | (or accept-in-paren (not (eq (cdr bufpos) 'in-paren))) | 11871 | (or accept-in-paren (not (eq (cdr bufpos) 'in-paren))) |
| 11877 | (car bufpos)))))) | 11872 | (car bufpos)))))) |
| 11878 | 11873 | ||
| 11879 | (defun c-looking-at-special-brace-list (&optional _lim) | 11874 | (defun c-looking-at-special-brace-list () |
| 11880 | ;; If we're looking at the start of a pike-style list, i.e., `({ })', | 11875 | ;; If we're looking at the start of a pike-style list, i.e., `({ })', |
| 11881 | ;; `([ ])', `(< >)', etc., a cons of a cons of its starting and ending | 11876 | ;; `([ ])', `(< >)', etc., a cons of a cons of its starting and ending |
| 11882 | ;; positions and its entry in c-special-brace-lists is returned, nil | 11877 | ;; positions and its entry in c-special-brace-lists is returned, nil |
| @@ -12506,8 +12501,7 @@ comment at the start of cc-engine.el for more info." | |||
| 12506 | (defun c-add-class-syntax (symbol | 12501 | (defun c-add-class-syntax (symbol |
| 12507 | containing-decl-open | 12502 | containing-decl-open |
| 12508 | containing-decl-start | 12503 | containing-decl-start |
| 12509 | containing-decl-kwd | 12504 | containing-decl-kwd) |
| 12510 | _paren-state) | ||
| 12511 | ;; The inclass and class-close syntactic symbols are added in | 12505 | ;; The inclass and class-close syntactic symbols are added in |
| 12512 | ;; several places and some work is needed to fix everything. | 12506 | ;; several places and some work is needed to fix everything. |
| 12513 | ;; Therefore it's collected here. | 12507 | ;; Therefore it's collected here. |
| @@ -12556,7 +12550,7 @@ comment at the start of cc-engine.el for more info." | |||
| 12556 | ;; CASE B.1: class-open | 12550 | ;; CASE B.1: class-open |
| 12557 | ((save-excursion | 12551 | ((save-excursion |
| 12558 | (and (eq (char-after) ?{) | 12552 | (and (eq (char-after) ?{) |
| 12559 | (c-looking-at-decl-block containing-sexp t) | 12553 | (c-looking-at-decl-block t) |
| 12560 | (setq beg-of-same-or-containing-stmt (point)))) | 12554 | (setq beg-of-same-or-containing-stmt (point)))) |
| 12561 | (c-add-syntax 'class-open beg-of-same-or-containing-stmt)) | 12555 | (c-add-syntax 'class-open beg-of-same-or-containing-stmt)) |
| 12562 | 12556 | ||
| @@ -12759,10 +12753,7 @@ comment at the start of cc-engine.el for more info." | |||
| 12759 | (goto-char containing-sexp) | 12753 | (goto-char containing-sexp) |
| 12760 | (eq (char-after) ?{)) | 12754 | (eq (char-after) ?{)) |
| 12761 | (setq placeholder | 12755 | (setq placeholder |
| 12762 | (c-looking-at-decl-block | 12756 | (c-looking-at-decl-block t))) |
| 12763 | (c-most-enclosing-brace paren-state | ||
| 12764 | containing-sexp) | ||
| 12765 | t))) | ||
| 12766 | (setq containing-decl-open containing-sexp | 12757 | (setq containing-decl-open containing-sexp |
| 12767 | containing-decl-start (point) | 12758 | containing-decl-start (point) |
| 12768 | containing-sexp nil) | 12759 | containing-sexp nil) |
| @@ -13004,8 +12995,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13004 | (setq placeholder (c-add-class-syntax 'inclass | 12995 | (setq placeholder (c-add-class-syntax 'inclass |
| 13005 | containing-decl-open | 12996 | containing-decl-open |
| 13006 | containing-decl-start | 12997 | containing-decl-start |
| 13007 | containing-decl-kwd | 12998 | containing-decl-kwd)) |
| 13008 | paren-state)) | ||
| 13009 | ;; Append access-label with the same anchor point as | 12999 | ;; Append access-label with the same anchor point as |
| 13010 | ;; inclass gets. | 13000 | ;; inclass gets. |
| 13011 | (c-append-syntax 'access-label placeholder)) | 13001 | (c-append-syntax 'access-label placeholder)) |
| @@ -13077,7 +13067,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13077 | ((save-excursion | 13067 | ((save-excursion |
| 13078 | (let (tmp) | 13068 | (let (tmp) |
| 13079 | (and (eq char-after-ip ?{) | 13069 | (and (eq char-after-ip ?{) |
| 13080 | (setq tmp (c-looking-at-decl-block containing-sexp t)) | 13070 | (setq tmp (c-looking-at-decl-block t)) |
| 13081 | (progn | 13071 | (progn |
| 13082 | (setq placeholder (point)) | 13072 | (setq placeholder (point)) |
| 13083 | (goto-char tmp) | 13073 | (goto-char tmp) |
| @@ -13098,7 +13088,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13098 | (goto-char indent-point) | 13088 | (goto-char indent-point) |
| 13099 | (skip-chars-forward " \t") | 13089 | (skip-chars-forward " \t") |
| 13100 | (and (eq (char-after) ?{) | 13090 | (and (eq (char-after) ?{) |
| 13101 | (c-looking-at-decl-block containing-sexp t) | 13091 | (c-looking-at-decl-block t) |
| 13102 | (setq placeholder (point)))) | 13092 | (setq placeholder (point)))) |
| 13103 | (c-add-syntax 'class-open placeholder)) | 13093 | (c-add-syntax 'class-open placeholder)) |
| 13104 | 13094 | ||
| @@ -13138,8 +13128,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13138 | (c-add-class-syntax 'inclass | 13128 | (c-add-class-syntax 'inclass |
| 13139 | containing-decl-open | 13129 | containing-decl-open |
| 13140 | containing-decl-start | 13130 | containing-decl-start |
| 13141 | containing-decl-kwd | 13131 | containing-decl-kwd)) |
| 13142 | paren-state)) | ||
| 13143 | 13132 | ||
| 13144 | ;; CASE 5A.5: ordinary defun open | 13133 | ;; CASE 5A.5: ordinary defun open |
| 13145 | (t | 13134 | (t |
| @@ -13202,8 +13191,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13202 | (c-add-class-syntax 'inclass | 13191 | (c-add-class-syntax 'inclass |
| 13203 | containing-decl-open | 13192 | containing-decl-open |
| 13204 | containing-decl-start | 13193 | containing-decl-start |
| 13205 | containing-decl-kwd | 13194 | containing-decl-kwd))) |
| 13206 | paren-state))) | ||
| 13207 | 13195 | ||
| 13208 | ;; CASE 5B.4: Nether region after a C++ or Java func | 13196 | ;; CASE 5B.4: Nether region after a C++ or Java func |
| 13209 | ;; decl, which could include a `throws' declaration. | 13197 | ;; decl, which could include a `throws' declaration. |
| @@ -13273,8 +13261,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13273 | (c-add-class-syntax 'inclass | 13261 | (c-add-class-syntax 'inclass |
| 13274 | containing-decl-open | 13262 | containing-decl-open |
| 13275 | containing-decl-start | 13263 | containing-decl-start |
| 13276 | containing-decl-kwd | 13264 | containing-decl-kwd))) |
| 13277 | paren-state))) | ||
| 13278 | 13265 | ||
| 13279 | ;; CASE 5C.3: in a Java implements/extends | 13266 | ;; CASE 5C.3: in a Java implements/extends |
| 13280 | (injava-inher | 13267 | (injava-inher |
| @@ -13460,8 +13447,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13460 | (c-add-class-syntax 'class-close | 13447 | (c-add-class-syntax 'class-close |
| 13461 | containing-decl-open | 13448 | containing-decl-open |
| 13462 | containing-decl-start | 13449 | containing-decl-start |
| 13463 | containing-decl-kwd | 13450 | containing-decl-kwd)) |
| 13464 | paren-state)) | ||
| 13465 | 13451 | ||
| 13466 | ;; CASE 5H: we could be looking at subsequent knr-argdecls | 13452 | ;; CASE 5H: we could be looking at subsequent knr-argdecls |
| 13467 | ((and c-recognize-knr-p | 13453 | ((and c-recognize-knr-p |
| @@ -13582,8 +13568,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13582 | (c-add-class-syntax 'inclass | 13568 | (c-add-class-syntax 'inclass |
| 13583 | containing-decl-open | 13569 | containing-decl-open |
| 13584 | containing-decl-start | 13570 | containing-decl-start |
| 13585 | containing-decl-kwd | 13571 | containing-decl-kwd))) |
| 13586 | paren-state))) | ||
| 13587 | (when (and c-syntactic-indentation-in-macros | 13572 | (when (and c-syntactic-indentation-in-macros |
| 13588 | macro-start | 13573 | macro-start |
| 13589 | (/= macro-start (c-point 'boi indent-point))) | 13574 | (/= macro-start (c-point 'boi indent-point))) |
| @@ -13899,7 +13884,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13899 | (save-excursion | 13884 | (save-excursion |
| 13900 | (goto-char indent-point) | 13885 | (goto-char indent-point) |
| 13901 | (c-forward-syntactic-ws (c-point 'eol)) | 13886 | (c-forward-syntactic-ws (c-point 'eol)) |
| 13902 | (c-looking-at-special-brace-list (point))))) | 13887 | (c-looking-at-special-brace-list)))) |
| 13903 | (c-add-syntax 'brace-entry-open (point)) | 13888 | (c-add-syntax 'brace-entry-open (point)) |
| 13904 | (c-add-stmt-syntax 'brace-list-entry nil t containing-sexp | 13889 | (c-add-stmt-syntax 'brace-list-entry nil t containing-sexp |
| 13905 | paren-state (point)) | 13890 | paren-state (point)) |
| @@ -13965,9 +13950,7 @@ comment at the start of cc-engine.el for more info." | |||
| 13965 | (and lim | 13950 | (and lim |
| 13966 | (progn | 13951 | (progn |
| 13967 | (goto-char lim) | 13952 | (goto-char lim) |
| 13968 | (c-looking-at-decl-block | 13953 | (c-looking-at-decl-block nil)) |
| 13969 | (c-most-enclosing-brace paren-state lim) | ||
| 13970 | nil)) | ||
| 13971 | (setq placeholder (point)))) | 13954 | (setq placeholder (point)))) |
| 13972 | (c-backward-to-decl-anchor lim) | 13955 | (c-backward-to-decl-anchor lim) |
| 13973 | (back-to-indentation) | 13956 | (back-to-indentation) |
| @@ -14135,9 +14118,7 @@ comment at the start of cc-engine.el for more info." | |||
| 14135 | (and (progn | 14118 | (and (progn |
| 14136 | (goto-char placeholder) | 14119 | (goto-char placeholder) |
| 14137 | (eq (char-after) ?{)) | 14120 | (eq (char-after) ?{)) |
| 14138 | (c-looking-at-decl-block (c-most-enclosing-brace | 14121 | (c-looking-at-decl-block nil)))) |
| 14139 | paren-state (point)) | ||
| 14140 | nil)))) | ||
| 14141 | (c-backward-to-decl-anchor lim) | 14122 | (c-backward-to-decl-anchor lim) |
| 14142 | (back-to-indentation) | 14123 | (back-to-indentation) |
| 14143 | (c-add-syntax 'defun-block-intro (point))) | 14124 | (c-add-syntax 'defun-block-intro (point))) |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index c6dd671051d..c5201d1af54 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1482,7 +1482,7 @@ Note that the style variables are always made local to the buffer." | |||
| 1482 | ((and | 1482 | ((and |
| 1483 | (c-is-escaped end) | 1483 | (c-is-escaped end) |
| 1484 | (or (eq beg end) ; .... by inserting stuff between \ and \n? | 1484 | (or (eq beg end) ; .... by inserting stuff between \ and \n? |
| 1485 | (c-will-be-unescaped beg end))) ; ... by removing an odd number of \s? | 1485 | (c-will-be-unescaped beg))) ; ... by removing an odd number of \s? |
| 1486 | (goto-char (1+ end))) ; To after the NL which is being unescaped. | 1486 | (goto-char (1+ end))) ; To after the NL which is being unescaped. |
| 1487 | (t | 1487 | (t |
| 1488 | (goto-char end))) | 1488 | (goto-char end))) |