GNU bug report logs -
#15465
CC-mode misaligns enums that implement an interface in Java
Previous Next
Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>
Date: Thu, 26 Sep 2013 08:32:02 UTC
Severity: normal
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 15465 <at> debbugs.gnu.org (full text, mbox):
Hi, Paul.
On Sat, Sep 28, 2013 at 09:15:52PM +0200, Paul Pogonyshev wrote:
> > I've committed a fix, revision #114474, to the bzr trunk. Could you try
> > out the change, please, and either confirm it fixes the bug properly, or
> > tell me what hasn't yet been fixed.
> Thank you. The case I initially mentioned works properly now, also with
> multiple implemented interfaces. However, it seems to not know about
> interfaces with generics:
> public enum X implements Y <Z>
> {
> A,
> B;
> }
OK!
I think the following enhancement should help out here:
diff -r d51d11733869 cc-engine.el
--- a/cc-engine.el Sat Sep 28 16:39:26 2013 +0000
+++ b/cc-engine.el Sat Sep 28 21:27:53 2013 +0000
@@ -8534,6 +8534,10 @@
(setq before-identifier nil)
t)
((looking-at c-brace-list-key) nil)
+ ((and c-recognize-<>-arglists
+ (eq (char-after) ?<)
+ (looking-at "\\s("))
+ t)
(t nil))))
(looking-at c-brace-list-key))))
;; this will pick up array/aggregate init lists, even if they are nested.
diff -r d51d11733869 cc-fonts.el
--- a/cc-fonts.el Sat Sep 28 16:39:26 2013 +0000
+++ b/cc-fonts.el Sat Sep 28 21:27:53 2013 +0000
@@ -1452,6 +1452,10 @@
(setq before-identifier nil)
t)
((looking-at c-brace-list-key) nil) ; "enum"
+ ((and c-recognize-<>-arglists
+ (eq (char-after) ?<)
+ (looking-at "\\s("))
+ t)
(t nil))))
(looking-at c-brace-list-key)))))))
(c-forward-token-2)
@@ -1556,6 +1560,10 @@
(setq before-identifier nil)
t)
((looking-at c-brace-list-key) nil) ; "enum"
+ ((and c-recognize-<>-arglists
+ (eq (char-after) ?<)
+ (looking-at "\\s("))
+ t)
(t nil))))
(looking-at c-brace-list-key)))))
(c-syntactic-skip-backward "^{," nil t)
> Paul
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 11 years and 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.