From: Lars Ingebrigtsen Date: Mon, 28 Dec 2020 01:47:25 +0000 (+0100) Subject: Fix alignment of Java String[] and the like X-Git-Tag: emacs-28.0.90~4536 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66274210687a911e7a9e61e96db908ec9782039e;p=emacs.git Fix alignment of Java String[] and the like * lisp/align.el (align-rules-list): Allow aligning Java String[] etc (bug#19385). Test case: class X { String field1; String[] field2; int field3; int[] field4; X field5; X[] field6; } --- diff --git a/lisp/align.el b/lisp/align.el index a11d834b823..905328b6625 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -411,7 +411,7 @@ The possible settings for `align-region-separate' are: (modes . align-c++-modes)) (c-variable-declaration - (regexp . ,(concat "[*&0-9A-Za-z_]>?[&*]*\\(\\s-+[*&]*\\)" + (regexp . ,(concat "[*&0-9A-Za-z_]>?[][&*]*\\(\\s-+[*&]*\\)" "[A-Za-z_][][0-9A-Za-z:_]*\\s-*\\(\\()\\|" "=[^=\n].*\\|(.*)\\|\\(\\[.*\\]\\)*\\)" "\\s-*[;,]\\|)\\s-*$\\)"))