Mercurial > emacs
changeset 20820:0507d774e769
(hs-special-modes-alist): Improved the regexp for java.
author | Dan Nicolaescu <done@ece.arizona.edu> |
---|---|
date | Mon, 02 Feb 1998 07:29:59 +0000 |
parents | 735a0243ce6f |
children | 18188475b33b |
files | lisp/progmodes/hideshow.el |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/hideshow.el Mon Feb 02 05:42:02 1998 +0000 +++ b/lisp/progmodes/hideshow.el Mon Feb 02 07:29:59 1998 +0000 @@ -159,7 +159,7 @@ (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\\|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)) + (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-type) @@ -172,7 +172,7 @@ ; (concat "[ \t]*\\(" ; (regexp-opt '("public" "private" "protected" "abstract" ; "synchronized" "static" "final" "native") 1) -; "[ \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]*\\)")