diff options
| author | Glenn Morris | 2020-02-23 07:50:33 -0800 |
|---|---|---|
| committer | Glenn Morris | 2020-02-23 07:50:33 -0800 |
| commit | eb34c108e234c3195ae75f14ec6c5b0964f022ad (patch) | |
| tree | 7f6d349aa681071783b493bbdfd99d79c1c1b975 /lisp | |
| parent | 4332964861a5a36a7f20daa2eeadab3bb5737193 (diff) | |
| parent | ba7004b2a74c69450114c12ef4521768fc165e8e (diff) | |
| download | emacs-eb34c108e234c3195ae75f14ec6c5b0964f022ad.tar.gz emacs-eb34c108e234c3195ae75f14ec6c5b0964f022ad.zip | |
Merge from origin/emacs-27
ba7004b2a7 (origin/emacs-27) Shorten some ppss struct field names
693749c60f Java Mode: Fix fontification of variable decl inside `for'
884b68ca2c CC Mode: Fontify foo in "const auto foo :" correctly
# Conflicts:
# etc/NEWS
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/syntax.el | 26 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 30 |
2 files changed, 38 insertions, 18 deletions
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 6b464bcb13a..11cc1988b1f 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el | |||
| @@ -89,33 +89,33 @@ Put first the functions more likely to cause a change and cheaper to compute.") | |||
| 89 | (:constructor make-ppss) | 89 | (:constructor make-ppss) |
| 90 | (:copier nil) | 90 | (:copier nil) |
| 91 | (:type list)) | 91 | (:type list)) |
| 92 | (depth nil :documentation "depth in parens") | 92 | (depth nil :documentation "Depth in parens.") |
| 93 | (innermost-start | 93 | (innermost-start |
| 94 | nil :documentation | 94 | nil :documentation |
| 95 | "character address of start of innermost containing list; nil if none.") | 95 | "Character address of start of innermost containing list; nil if none.") |
| 96 | (last-complete-sexp-start | 96 | (last-complete-sexp-start |
| 97 | nil :documentation | 97 | nil :documentation |
| 98 | "character address of start of last complete sexp terminated.") | 98 | "Character address of start of last complete sexp terminated.") |
| 99 | (string-terminator nil :documentation "\ | 99 | (string-terminator nil :documentation "\ |
| 100 | non-nil if inside a string. | 100 | Non-nil if inside a string. |
| 101 | (it is the character that will terminate the string, or t if the | 101 | \(it is the character that will terminate the string, or t if the |
| 102 | string should be terminated by a generic string delimiter.)") | 102 | string should be terminated by a generic string delimiter.)") |
| 103 | (comment-nesting nil :documentation "\ | 103 | (comment-depth nil :documentation "\ |
| 104 | nil if outside a comment, t if inside a non-nestable comment, | 104 | nil if outside a comment, t if inside a non-nestable comment, |
| 105 | else an integer (the current comment nesting).") | 105 | else an integer (the current comment nesting).") |
| 106 | (after-quote-p nil :documentation "t if following a quote character.") | 106 | (quoted-p nil :documentation "t if following a quote character.") |
| 107 | (minimum-paren-depth | 107 | (min-depth |
| 108 | nil :documentation "the minimum paren-depth encountered during this scan.") | 108 | nil :documentation "The minimum depth in parens encountered during this scan.") |
| 109 | (comment-style nil :documentation "style of comment, if any.") | 109 | (comment-style nil :documentation "Style of comment, if any.") |
| 110 | (comment-or-string-start | 110 | (comment-or-string-start |
| 111 | nil :documentation | 111 | nil :documentation |
| 112 | "character address of start of comment or string; nil if not in one.") | 112 | "Character address of start of comment or string; nil if not in one.") |
| 113 | (open-paren-positions | 113 | (open-parens |
| 114 | nil :documentation | 114 | nil :documentation |
| 115 | "List of positions of currently open parens, outermost first.") | 115 | "List of positions of currently open parens, outermost first.") |
| 116 | (two-character-syntax nil :documentation "\ | 116 | (two-character-syntax nil :documentation "\ |
| 117 | When the last position scanned holds the first character of a | 117 | When the last position scanned holds the first character of a |
| 118 | (potential) two character construct, the syntax of that position, | 118 | \(potential) two character construct, the syntax of that position, |
| 119 | otherwise nil. That construct can be a two character comment | 119 | otherwise nil. That construct can be a two character comment |
| 120 | delimiter or an Escaped or Char-quoted character.")) | 120 | delimiter or an Escaped or Char-quoted character.")) |
| 121 | 121 | ||
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 0c338fa3868..bccef6890f8 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -9034,7 +9034,7 @@ point unchanged and return nil." | |||
| 9034 | (if (looking-at c-:-op-cont-regexp) | 9034 | (if (looking-at c-:-op-cont-regexp) |
| 9035 | (progn (goto-char (match-end 0)) t) | 9035 | (progn (goto-char (match-end 0)) t) |
| 9036 | (not | 9036 | (not |
| 9037 | (and (c-major-mode-is 'c++-mode) | 9037 | (and (c-major-mode-is '(c++-mode java-mode)) |
| 9038 | (save-excursion | 9038 | (save-excursion |
| 9039 | (and | 9039 | (and |
| 9040 | (c-go-up-list-backward) | 9040 | (c-go-up-list-backward) |
| @@ -9275,9 +9275,10 @@ This function might do hidden buffer changes." | |||
| 9275 | ;; | 9275 | ;; |
| 9276 | ;; The third element of the return value is non-nil when the declaration | 9276 | ;; The third element of the return value is non-nil when the declaration |
| 9277 | ;; parsed might be an expression. The fourth element is the position of | 9277 | ;; parsed might be an expression. The fourth element is the position of |
| 9278 | ;; the start of the type identifier. The fifth element is t if either | 9278 | ;; the start of the type identifier, or the same as the first element when |
| 9279 | ;; CONTEXT was 'top, or the declaration is detected to be treated as top | 9279 | ;; there is no type identifier. The fifth element is t if either CONTEXT |
| 9280 | ;; level (e.g. with the keyword "extern"). | 9280 | ;; was 'top, or the declaration is detected to be treated as top level |
| 9281 | ;; (e.g. with the keyword "extern"). | ||
| 9281 | ;; | 9282 | ;; |
| 9282 | ;; If a cast is parsed: | 9283 | ;; If a cast is parsed: |
| 9283 | ;; | 9284 | ;; |
| @@ -9680,7 +9681,26 @@ This function might do hidden buffer changes." | |||
| 9680 | (setq got-identifier (c-forward-name)) | 9681 | (setq got-identifier (c-forward-name)) |
| 9681 | (setq name-start pos)) | 9682 | (setq name-start pos)) |
| 9682 | (when (looking-at "[0-9]") | 9683 | (when (looking-at "[0-9]") |
| 9683 | (setq got-number t))) ; We've probably got an arithmetic expression. | 9684 | (setq got-number t)) ; We probably have an arithmetic expression. |
| 9685 | (and maybe-typeless | ||
| 9686 | (or (eq at-type 'maybe) | ||
| 9687 | (when (eq at-type 'found) | ||
| 9688 | ;; Remove the ostensible type from the found types list. | ||
| 9689 | (when type-start | ||
| 9690 | (c-unfind-type | ||
| 9691 | (buffer-substring-no-properties | ||
| 9692 | type-start | ||
| 9693 | (save-excursion | ||
| 9694 | (goto-char type-start) | ||
| 9695 | (c-end-of-token) | ||
| 9696 | (point))))) | ||
| 9697 | t)) | ||
| 9698 | ;; The token which we assumed to be a type is actually the | ||
| 9699 | ;; identifier, and we have no explicit type. | ||
| 9700 | (setq at-type nil | ||
| 9701 | name-start type-start | ||
| 9702 | id-start type-start | ||
| 9703 | got-identifier t))) | ||
| 9684 | 9704 | ||
| 9685 | ;; Skip over type decl suffix operators and trailing noise macros. | 9705 | ;; Skip over type decl suffix operators and trailing noise macros. |
| 9686 | (while | 9706 | (while |