emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patches for Emacs 25.2


From: Dmitry Gutov
Subject: Re: Patches for Emacs 25.2
Date: Fri, 16 Dec 2016 02:05:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0

Hi Eli,

Here's a patch I'd like to install into the release branch.

It should be "obviously safe" (js-mode doesn't set a forward-sexp-function), and will improve performance for js2-mode users.

Some backstory: https://github.com/mooz/js2-mode/issues/369

Is it OK?

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 6d995a0..0ba7aac 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 even in js2-mode
+        at-opening-bracket)
     (save-excursion
       (back-to-indentation)
       (when (not (looking-at js--declaration-keyword-re))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]