]> git.eshelyaron.com Git - emacs.git/commitdiff
Java Mode: Fix handling of nested generics ending in >>>.
authorAlan Mackenzie <acm@muc.de>
Sat, 27 Jul 2019 16:28:48 +0000 (16:28 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 27 Jul 2019 16:28:48 +0000 (16:28 +0000)
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.

lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el

index 1ebacb58c7ff9fb220f148e07f1046c3c78ce748..37d4591fc962204ff78397a017fbe9e459b7e59d 100644 (file)
@@ -7983,7 +7983,7 @@ comment at the start of cc-engine.el for more info."
 
                  (if (save-excursion
                        (c-backward-token-2)
-                       (looking-at c-multichar->-op-not->>-regexp))
+                       (looking-at c-multichar->-op-not->>->>>-regexp))
                      (progn
                        (goto-char (match-end 0))
                        t)              ; Continue the loop.
index 72c0fdd0d2d6492d47be079f82617b283b0aeeeb..f3dd0c6c4c9d5337d0641e2d5a68236c66745121 100644 (file)
@@ -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