diff options
| author | Alan Mackenzie | 2019-07-27 16:28:48 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-07-27 16:28:48 +0000 |
| commit | a50271e0c39bad630b433e31434ef20f584bfc09 (patch) | |
| tree | 7cb31f73b241b708d2859d7ab27d630523002de2 | |
| parent | 883679dde80700322e5a316102b47812d824bad5 (diff) | |
| download | emacs-a50271e0c39bad630b433e31434ef20f584bfc09.tar.gz emacs-a50271e0c39bad630b433e31434ef20f584bfc09.zip | |
Java Mode: Fix handling of nested generics ending in >>>.
This fixes bug #24671.
* lisp/progmodes/cc-langs.el (c-multichar->-op-not->>-regexp): remove,
transforming into ...
(c-multichar->-op-not->>->>>-regexp) New lang const/var.
* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): use the new
c-multichar->-op-not->>->>>-regexp in place of the old
c-multichar->-op-not->>-regexp.
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 1ebacb58c7f..37d4591fc96 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -7983,7 +7983,7 @@ comment at the start of cc-engine.el for more info." | |||
| 7983 | 7983 | ||
| 7984 | (if (save-excursion | 7984 | (if (save-excursion |
| 7985 | (c-backward-token-2) | 7985 | (c-backward-token-2) |
| 7986 | (looking-at c-multichar->-op-not->>-regexp)) | 7986 | (looking-at c-multichar->-op-not->>->>>-regexp)) |
| 7987 | (progn | 7987 | (progn |
| 7988 | (goto-char (match-end 0)) | 7988 | (goto-char (match-end 0)) |
| 7989 | t) ; Continue the loop. | 7989 | t) ; Continue the loop. |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 72c0fdd0d2d..f3dd0c6c4c9 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -1409,15 +1409,17 @@ operators." | |||
| 1409 | (c-lang-defvar c->-op-without->-cont-regexp | 1409 | (c-lang-defvar c->-op-without->-cont-regexp |
| 1410 | (c-lang-const c->-op-without->-cont-regexp)) | 1410 | (c-lang-const c->-op-without->-cont-regexp)) |
| 1411 | 1411 | ||
| 1412 | (c-lang-defconst c-multichar->-op-not->>-regexp | 1412 | (c-lang-defconst c-multichar->-op-not->>->>>-regexp |
| 1413 | ;; Regexp matching multichar tokens containing ">", except ">>" | 1413 | ;; Regexp matching multichar tokens containing ">", except ">>" and ">>>" |
| 1414 | t (c-make-keywords-re nil | 1414 | t (c-make-keywords-re nil |
| 1415 | (delete ">>" | 1415 | (c--set-difference |
| 1416 | (c-filter-ops (c-lang-const c-all-op-syntax-tokens) | 1416 | (c-filter-ops (c-lang-const c-all-op-syntax-tokens) |
| 1417 | t | 1417 | t |
| 1418 | "\\(.>\\|>.\\)")))) | 1418 | "\\(.>\\|>.\\)") |
| 1419 | (c-lang-defvar c-multichar->-op-not->>-regexp | 1419 | '(">>" ">>>") |
| 1420 | (c-lang-const c-multichar->-op-not->>-regexp)) | 1420 | :test 'string-equal))) |
| 1421 | (c-lang-defvar c-multichar->-op-not->>->>>-regexp | ||
| 1422 | (c-lang-const c-multichar->-op-not->>->>>-regexp)) | ||
| 1421 | 1423 | ||
| 1422 | (c-lang-defconst c-:-op-cont-tokens | 1424 | (c-lang-defconst c-:-op-cont-tokens |
| 1423 | ;; A list of second and subsequent characters of all multicharacter tokens | 1425 | ;; A list of second and subsequent characters of all multicharacter tokens |