[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
align.el and java
From: |
Robert Mecklenburg |
Subject: |
align.el and java |
Date: |
Fri, 13 Dec 2002 16:25:34 -0700 |
The align.el package basically works great for java except for
declarations of java arrays:
String[] fooBlat;
int fooBar;
The existing declaration expressions appear to ignore the "String[]"
line because it is not sufficiently similar to C/C++. I've hacked a
fix for this behavior. I don't know if it is the proper way to do
things, but I'm sure someone more knowledgeable can comment on that.
--- align.el 2002-12-13 16:21:26 -0700
+++ /c/usr/emacs-21.2/lisp/align.el 2002-12-04 09:54:16 -0700
@@ -413,7 +413,7 @@
(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-*$\\)"))
I've added "][" to the first character class in the regexp.
I've also noticed another anomaly with align.el and java. Under some
circumstances declaration lines are ignored because (it seems to me)
the variable name contains an embedded "throw" or "delete" word. I've
had trouble reproducing this problem. Anyone else experience that?
Thanks,
Robert Mecklenburg
- align.el and java,
Robert Mecklenburg <=