summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-12-17 01:52:12 +0200
committerDmitry Gutov <dgutov@yandex.ru>2016-12-17 01:52:12 +0200
commit43022f9860d00b0f1baad34c6ea7ffd51f3cfc1d (patch)
tree9e3752964c875563415ad0366712ffb43e93c3c0
parentb19fb4995efd7490527400c89becfcf2b6ed4b53 (diff)
downloademacs-43022f9860d00b0f1baad34c6ea7ffd51f3cfc1d.tar.gz
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).
-rw-r--r--lisp/progmodes/js.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 6d995a095e6..9aa459d1bc7 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1851,7 +1851,8 @@ nil."
"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 @@ indentation is aligned to that column."
(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))