summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-02-02 00:17:19 +0000
committerRichard M. Stallman <rms@gnu.org>1998-02-02 00:17:19 +0000
commitc07c58b350546c02317eee1058dcd6d3c5db2862 (patch)
tree5fa04c4fab7faf01e3d7af2dce8becaba0301ad8
parentddcce45ea6dddcf8c86613ba345e6d2a97441de8 (diff)
downloademacs-c07c58b350546c02317eee1058dcd6d3c5db2862.tar.gz
(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'.")
(defvar hs-special-modes-alist
'((c-mode "{" "}" nil nil hs-c-like-adjust-block-beginning)
(c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning)
- (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))
+ (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))
; I tested the java regexp using the following:
;(defvar hsj-public)
-;(defvar hsj-syncronised)
;(defvar hsj-type)
;(defvar hsj-fname)
;(defvar hsj-par)
@@ -172,11 +171,10 @@ Values other than these four will be interpreted as `signal'.")
;(setq hsj-public
; (concat "[ \t]*\\("
; (regexp-opt '("public" "private" "protected" "abstract"
-; "static" "final") 1)
+; "synchronized" "static" "final" "native") 1)
; "[ \t\n]+\\)+"))
-;(setq hsj-syncronised "\\(synchronized[ \t\n]*\\)?")
-;(setq hsj-type "[a-zA-Z0-9_:]+[ \t\n]*\\(\\[[ \t\n]*\\][ \t\n]*\\)?")
+;(setq hsj-type "[.a-zA-Z0-9_:]+[ \t\n]*\\(\\[[ \t\n]*\\][ \t\n]*\\)?")
;(setq hsj-fname "\\([a-zA-Z0-9_:]+[ \t\n]*\\)")
;(setq hsj-par "([^)]*)")
;(setq hsj-throws "\\([ \n\t]+throws[ \t\n][^{]+\\)?")
@@ -189,7 +187,6 @@ Values other than these four will be interpreted as `signal'.")
; "\\("
; "\\("
; hsj-public
-; hsj-syncronised
; hsj-type
; hsj-fname
; hsj-par