From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Patches for Emacs 25.2 Date: Fri, 16 Dec 2016 02:05:19 +0200 Message-ID: References: <877f96t9oc.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1481846769 19770 195.159.176.226 (16 Dec 2016 00:06:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2016 00:06:09 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 To: Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 16 01:06:03 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHg2E-00042d-Cs for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2016 01:06:02 +0100 Original-Received: from localhost ([::1]:57504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHg2I-0005Jj-DR for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2016 19:06:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHg1f-0005FZ-8t for emacs-devel@gnu.org; Thu, 15 Dec 2016 19:05:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHg1c-0001Kk-2G for emacs-devel@gnu.org; Thu, 15 Dec 2016 19:05:27 -0500 Original-Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36266) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHg1b-0001JT-RS; Thu, 15 Dec 2016 19:05:24 -0500 Original-Received: by mail-wm0-x244.google.com with SMTP id m203so1442780wma.3; Thu, 15 Dec 2016 16:05:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tJ6WneKlv2/OPgEuZHuX4vXbm4tqdFmIuanoYICE0U0=; b=THaia/mqo6l6jmRVqCzv0htrDrQuTPPrN2uTYe5Fc2wssGVc+7OG2GhD/AhpKGtjRd e3Expx+XPLUC5kk2WfmZU0RAKquEtbCwg+jR1wlc2FJFe0D6YqNBNXYw3F6VDeXPhpeJ dYXYIRq4C7cGE7sv+fiEk1GazLlKVxbmuBHW6mtQHEGe0ZL4w7Ueo/rLja+b41KcznoO c00aC+R2YXTb/WlOsFXc5ZclZnzmj/MMODhbj1g2lUByA1SbvtYrDBxK41HWcFfSLejC hbcd9aTKx88Fw51sOQ4hPrwb3+A0VD+VMsHvpuU4//jLMrqcQjLuTMRzjoLVbY8DJHHK JB+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tJ6WneKlv2/OPgEuZHuX4vXbm4tqdFmIuanoYICE0U0=; b=Xc5XpAowl/I8THDXm8tmK9nKs8Z5U/7LVYudMYbyw2hIfwSb8+dfrygKMj0+NQhGTa OSO6vyzicXUe4AYV/t6p8+/Nt2YB++UbSZnXZCjo4Md2iLVIFVNpMW0WeU2AAp0GvXNu sqCA6MzDITaJi+vIEhBirDz59nsZctPf3GAzDRllgVIBDa+mut3bg7+ynjC9zjy+QOf4 /ffDNkcKoD+7aDge7C1e/1i/Fsr0V5eX3cAoUIK61QkxJL5OmnqrL2627YJ+sawMoz7A v8jnsT9sJo5I3Wbjj5tUOMNbe5VCBZ+w7YhS1an044lcSIM2GKoCLKNavnpWWWGvlFhE oWxw== X-Gm-Message-State: AIkVDXJLPufVE9/tQUQZmuHk+k4iGLvSM/lZr4vZ3rr/R9URVmrHAW/5MAbnvoY+ZmiVVA== X-Received: by 10.28.54.97 with SMTP id d94mr224468wma.28.1481846721111; Thu, 15 Dec 2016 16:05:21 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.173.41]) by smtp.googlemail.com with ESMTPSA id w197sm805076wmd.11.2016.12.15.16.05.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 16:05:20 -0800 (PST) In-Reply-To: <877f96t9oc.fsf@gmx.de> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210491 Archived-At: 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))