aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-02-02 00:17:19 +0000
committerRichard M. Stallman1998-02-02 00:17:19 +0000
commit7ee906030a54e28d2f65e17fdfc7ac5654640ee4 (patch)
tree51388e71d171da3503e8478cb6038060d5b4fbd5
parent3c3d71d93c267ac1ffacddd4e47127fa9e33b11f (diff)
downloademacs-7ee906030a54e28d2f65e17fdfc7ac5654640ee4.tar.gz
emacs-7ee906030a54e28d2f65e17fdfc7ac5654640ee4.zip
(hs-special-modes-alist): Improved the regexp for java.
-rw-r--r--lisp/progmodes/hideshow.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index fd1cb8429e0..0189801ab33 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -159,10 +159,9 @@ Values other than these four will be interpreted as `signal'.")
159(defvar hs-special-modes-alist 159(defvar hs-special-modes-alist
160 '((c-mode "{" "}" nil nil hs-c-like-adjust-block-beginning) 160 '((c-mode "{" "}" nil nil hs-c-like-adjust-block-beginning)
161 (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) 161 (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning)
162 (java-mode "\\(\\(\\([ \t]*\\(\\(abstract\\|final\\|p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|static\\)[ \t\n]+\\)+\\(synchronized[ \t\n]*\\)?[a-zA-Z0-9_:]+[ \t\n]*\\(\\[[ \t\n]*\\][ \t\n]*\\)?\\([a-zA-Z0-9_:]+[ \t\n]*\\)([^)]*)\\([ \n\t]+throws[ \t\n][^{]+\\)?\\)\\|\\([ \t]*static[^{]*\\)\\)[ \t\n]*{\\)" "}" "/[*/]" java-hs-forward-sexp hs-c-like-adjust-block-beginning)) 162 (java-mode "\\(\\(\\([ \t]*\\(\\(abstract\\|final\\|native\\|p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|s\\(tatic\\|ynchronized\\)\\)[ \t\n]+\\)+[.a-zA-Z0-9_:]+[ \t\n]*\\(\\[[ \t\n]*\\][ \t\n]*\\)?\\([a-zA-Z0-9_:]+[ \t\n]*\\)([^)]*)\\([ \n\t]+throws[ \t\n][^{]+\\)?\\)\\|\\([ \t]*static[^{]*\\)\\)[ \t\n]*{\\)" "}" "/[*/]" java-hs-forward-sexp hs-c-like-adjust-block-beginning))
163; I tested the java regexp using the following: 163; I tested the java regexp using the following:
164;(defvar hsj-public) 164;(defvar hsj-public)
165;(defvar hsj-syncronised)
166;(defvar hsj-type) 165;(defvar hsj-type)
167;(defvar hsj-fname) 166;(defvar hsj-fname)
168;(defvar hsj-par) 167;(defvar hsj-par)
@@ -172,11 +171,10 @@ Values other than these four will be interpreted as `signal'.")
172;(setq hsj-public 171;(setq hsj-public
173; (concat "[ \t]*\\(" 172; (concat "[ \t]*\\("
174; (regexp-opt '("public" "private" "protected" "abstract" 173; (regexp-opt '("public" "private" "protected" "abstract"
175; "static" "final") 1) 174; "synchronized" "static" "final" "native") 1)
176; "[ \t\n]+\\)+")) 175; "[ \t\n]+\\)+"))
177 176
178;(setq hsj-syncronised "\\(synchronized[ \t\n]*\\)?") 177;(setq hsj-type "[.a-zA-Z0-9_:]+[ \t\n]*\\(\\[[ \t\n]*\\][ \t\n]*\\)?")
179;(setq hsj-type "[a-zA-Z0-9_:]+[ \t\n]*\\(\\[[ \t\n]*\\][ \t\n]*\\)?")
180;(setq hsj-fname "\\([a-zA-Z0-9_:]+[ \t\n]*\\)") 178;(setq hsj-fname "\\([a-zA-Z0-9_:]+[ \t\n]*\\)")
181;(setq hsj-par "([^)]*)") 179;(setq hsj-par "([^)]*)")
182;(setq hsj-throws "\\([ \n\t]+throws[ \t\n][^{]+\\)?") 180;(setq hsj-throws "\\([ \n\t]+throws[ \t\n][^{]+\\)?")
@@ -189,7 +187,6 @@ Values other than these four will be interpreted as `signal'.")
189; "\\(" 187; "\\("
190; "\\(" 188; "\\("
191; hsj-public 189; hsj-public
192; hsj-syncronised
193; hsj-type 190; hsj-type
194; hsj-fname 191; hsj-fname
195; hsj-par 192; hsj-par