diff options
author | Alan Mackenzie <acm@muc.de> | 2019-07-27 16:28:48 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2019-07-27 16:28:48 +0000 |
commit | a50271e0c39bad630b433e31434ef20f584bfc09 (patch) | |
tree | 7cb31f73b241b708d2859d7ab27d630523002de2 /lisp/progmodes/cc-langs.el | |
parent | 883679dde80700322e5a316102b47812d824bad5 (diff) | |
download | emacs-a50271e0c39bad630b433e31434ef20f584bfc09.tar.gz |
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.
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r-- | lisp/progmodes/cc-langs.el | 18 |
1 files changed, 10 insertions, 8 deletions
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." (c-lang-defvar c->-op-without->-cont-regexp (c-lang-const c->-op-without->-cont-regexp)) -(c-lang-defconst c-multichar->-op-not->>-regexp - ;; Regexp matching multichar tokens containing ">", except ">>" +(c-lang-defconst c-multichar->-op-not->>->>>-regexp + ;; Regexp matching multichar tokens containing ">", except ">>" and ">>>" t (c-make-keywords-re nil - (delete ">>" - (c-filter-ops (c-lang-const c-all-op-syntax-tokens) - t - "\\(.>\\|>.\\)")))) -(c-lang-defvar c-multichar->-op-not->>-regexp - (c-lang-const c-multichar->-op-not->>-regexp)) + (c--set-difference + (c-filter-ops (c-lang-const c-all-op-syntax-tokens) + t + "\\(.>\\|>.\\)") + '(">>" ">>>") + :test 'string-equal))) +(c-lang-defvar c-multichar->-op-not->>->>>-regexp + (c-lang-const c-multichar->-op-not->>->>>-regexp)) (c-lang-defconst c-:-op-cont-tokens ;; A list of second and subsequent characters of all multicharacter tokens |