Mercurial > emacs
changeset 20811:1e07c8543929
(hs-special-modes-alist): Improved the regexp for java.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 02 Feb 1998 00:17:19 +0000 |
parents | 55e8d6d2c3b1 |
children | d21a1c41800f |
files | lisp/progmodes/hideshow.el |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/hideshow.el Sun Feb 01 23:56:13 1998 +0000 +++ b/lisp/progmodes/hideshow.el Mon Feb 02 00:17:19 1998 +0000 @@ -159,10 +159,9 @@ (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 @@ ;(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 @@ ; "\\(" ; "\\(" ; hsj-public -; hsj-syncronised ; hsj-type ; hsj-fname ; hsj-par