GNU bug report logs - #61436
Emacs Freezing With Java Files

Previous Next

Package: emacs;

Reported by: Hank Greenburg <hank.greenburg <at> protonmail.com>

Date: Sat, 11 Feb 2023 20:47:02 UTC

Severity: normal

Found in versions 30.0.50, 29.1.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mats Lidell <mats.lidell <at> lidells.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: Robert Weiner <rsw <at> gnu.org>, Hank Greenburg <hank.greenburg <at> protonmail.com>, 61436-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Robert Weiner <rswgnu <at> gmail.com>, Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Subject: bug#61436: Emacs Freezing With Java Files
Date: Sun, 22 Oct 2023 00:14:43 +0200
Hi Alan,

Sorry for coming back late to this issue but today I tried to use the
suggested regexp and got into some problems doing that.

> Alan Mackenzie writes:
> Here's the regexp.  Would people please try it out and let me know how
> well it works.  
>
> (defconst java-defun-prompt-regexp
>   (let ((space* "[ \t\n\r\f]*")
>         (space+ "[ \t\n\r\f]+")
>         (modifier*
>          (concat "\\(?:"
>                  (regexp-opt '("abstract" "const" "default" "final" "native"
>                                "private" "protected" "public" "static"
>                                "strictfp" "synchronized" "threadsafe"
>                                "transient" "volatile")
>                              'words)    ; Compatible with XEmacs
>                  space+ "\\)*"))
>         (ids-with-dots "[_$a-zA-Z][_$.a-zA-Z0-9]*")
>         (ids-with-dot-\[\] "[[_$a-zA-Z][][_$.a-zA-Z0-9]*")
>         (paren-exp "([^);{}]*)")
>         (generic-exp "<[^(){};]*>"))
>     (concat "^[ \t]*"
>             modifier*
>             "\\(?:" generic-exp space* "\\)?"
>             ids-with-dot-\[\] space+                ; first part of type
>             "\\(?:" ids-with-dot-\[\] space+ "\\)?" ; optional second part of type.
>             "\\(?:[_a-zA-Z][^][ \t:;.,{}()=<>]*"    ; defun name
>                 "\\|" ids-with-dot*
>             "\\)" space*
>             paren-exp
>             "\\(?:" space* "]\\)*"      ; What's this for?
>             "\\(?:" space* "\\<throws\\>" space* ids-with-dot-\[\]s*
>                   "\\(?:," space* ids-with-dot-\[\]s* "\\)*"
>             "\\)?"
>             space*)))

Can there be some typos in there or missing lines? I get a compiler warning
for space+ being used in the let, should it be a let*? ids-with-dots is
reported as not used. Can it be meant to be ids-with-dot*?
ids-with-dot-\[\]s* is undefined!?

Yours
-- 
%% Mats




This bug report was last modified 1 year and 115 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.