1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 14:18:32 +00:00

Ignore forward-sexp-function in js-mode indentation code

* lisp/progmodes/js.el (js--multi-line-declaration-indentation)
(js--maybe-goto-declaration-keyword-end):
Bind forward-sexp-function to nil (bug#25215).
This commit is contained in:
Dmitry Gutov 2016-12-17 01:52:12 +02:00
parent b19fb4995e
commit 43022f9860

View File

@ -1851,7 +1851,8 @@ nil."
"Helper function for `js--proper-indentation'. "Helper function for `js--proper-indentation'.
Return the proper indentation of the current line if it belongs to a declaration Return the proper indentation of the current line if it belongs to a declaration
statement spanning multiple lines; otherwise, return nil." statement spanning multiple lines; otherwise, return nil."
(let (at-opening-bracket) (let (forward-sexp-function ; Use Lisp version.
at-opening-bracket)
(save-excursion (save-excursion
(back-to-indentation) (back-to-indentation)
(when (not (looking-at js--declaration-keyword-re)) (when (not (looking-at js--declaration-keyword-re))
@ -1928,6 +1929,7 @@ indentation is aligned to that column."
(let ((bracket (nth 1 parse-status)) (let ((bracket (nth 1 parse-status))
declaration-keyword-end declaration-keyword-end
at-closing-bracket-p at-closing-bracket-p
forward-sexp-function ; Use Lisp version.
comma-p) comma-p)
(when (looking-at js--declaration-keyword-re) (when (looking-at js--declaration-keyword-re)
(setq declaration-keyword-end (match-end 0)) (setq declaration-keyword-end (match-end 0))