GNU bug report logs -
#25215
25.1.90; js--proper-indentation is affected by the value of forward-sexp-function
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Fri, 16 Dec 2016 16:38:02 UTC
Severity: normal
Found in version 25.1.90
Done: Dmitry Gutov <dgutov <at> webzilla.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25215 in the body.
You can then email your comments to 25215 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25215
; Package
emacs
.
(Fri, 16 Dec 2016 16:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dmitry Gutov <dgutov <at> webzilla.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 16 Dec 2016 16:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
js2-mode derives from js-mode and, starting with Emacs 25.1, inherits
its indentation function.
However, forward-sexp-function in js2-mode can be slow because it uses
the AST, and when the current parsing pass had been interrupted by user
input, it's forced to finish. Which is slow in large files.
And its subtleties aren't really needed by the intentation code. So in
the various bits of code we've brought over from js2-mode we have kept
the forward-sexp-function->nil binding.
We've missed it in js--multi-line-declaration-indentation, hovewer. And
in js--maybe-goto-declaration-keyword-end (though that one only comes
into play with a non-default value of js-indent-first-init).
The patch is below.
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 6d995a0..9aa459d 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1851,7 +1851,8 @@ js--multi-line-declaration-indentation
"Helper function for `js--proper-indentation'.
Return the proper indentation of the current line if it belongs to a
declaration
statement spanning multiple lines; otherwise, return nil."
- (let (at-opening-bracket)
+ (let (forward-sexp-function ; Use Lisp version.
+ at-opening-bracket)
(save-excursion
(back-to-indentation)
(when (not (looking-at js--declaration-keyword-re))
@@ -1928,6 +1929,7 @@ js--maybe-goto-declaration-keyword-end
(let ((bracket (nth 1 parse-status))
declaration-keyword-end
at-closing-bracket-p
+ forward-sexp-function ; Use Lisp version.
comma-p)
(when (looking-at js--declaration-keyword-re)
(setq declaration-keyword-end (match-end 0))
Changed bug submitter to 'Dmitry Gutov <dgutov <at> yandex.ru>' from 'Dmitry Gutov <dgutov <at> webzilla.com>'
Request was from
Dmitry Gutov <dgutov <at> yandex.ru>
to
control <at> debbugs.gnu.org
.
(Fri, 16 Dec 2016 18:30:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25215
; Package
emacs
.
(Fri, 16 Dec 2016 21:04:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 25215 <at> debbugs.gnu.org (full text, mbox):
> From: Dmitry Gutov <dgutov <at> webzilla.com>
> Date: Fri, 16 Dec 2016 14:58:35 +0200
>
> js2-mode derives from js-mode and, starting with Emacs 25.1, inherits
> its indentation function.
>
> However, forward-sexp-function in js2-mode can be slow because it uses
> the AST, and when the current parsing pass had been interrupted by user
> input, it's forced to finish. Which is slow in large files.
>
> And its subtleties aren't really needed by the intentation code. So in
> the various bits of code we've brought over from js2-mode we have kept
> the forward-sexp-function->nil binding.
>
> We've missed it in js--multi-line-declaration-indentation, hovewer. And
> in js--maybe-goto-declaration-keyword-end (though that one only comes
> into play with a non-default value of js-indent-first-init).
>
> The patch is below.
Thanks, this is okay for the release branch.
Reply sent
to
Dmitry Gutov <dgutov <at> webzilla.com>
:
You have taken responsibility.
(Sat, 17 Dec 2016 00:01:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
bug acknowledged by developer.
(Sat, 17 Dec 2016 00:01:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 25215-done <at> debbugs.gnu.org (full text, mbox):
On 16.12.2016 23:02, Eli Zaretskii wrote:
> Thanks, this is okay for the release branch.
Thanks, installed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 14 Jan 2017 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 310 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.