From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 11:37:11 2016 Received: (at submit) by debbugs.gnu.org; 16 Dec 2016 16:37:11 +0000 Received: from localhost ([127.0.0.1]:44483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHvVP-0003HQ-DQ for submit@debbugs.gnu.org; Fri, 16 Dec 2016 11:37:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHs6G-0005rx-Mm for submit@debbugs.gnu.org; Fri, 16 Dec 2016 07:59:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHs6A-0005Ci-Im for submit@debbugs.gnu.org; Fri, 16 Dec 2016 07:58:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47047) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cHs6A-0005CL-F8 for submit@debbugs.gnu.org; Fri, 16 Dec 2016 07:58:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHs68-000131-HP for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2016 07:58:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHs63-00056P-5F for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2016 07:58:52 -0500 Received: from mail.corporatemx.com ([78.140.179.7]:8992) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cHs62-00054G-Uw for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2016 07:58:47 -0500 Received: from [185.105.173.41] (port=60022 helo=[192.168.1.3]) by mail.corporatemx.com with esmtpsa (TLSv1.2:DES-CBC3-SHA:168) (envelope-from ) id 1cHs5w-000MTi-3t for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2016 13:58:40 +0100 To: bug-gnu-emacs@gnu.org From: Dmitry Gutov Subject: 25.1.90; js--proper-indentation is affected by the value of forward-sexp-function Message-ID: Date: Fri, 16 Dec 2016 14:58:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 16 Dec 2016 11:37:10 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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)) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 13:29:36 2016 Received: (at control) by debbugs.gnu.org; 16 Dec 2016 18:29:36 +0000 Received: from localhost ([127.0.0.1]:44531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHxGC-0005yA-3m for submit@debbugs.gnu.org; Fri, 16 Dec 2016 13:29:36 -0500 Received: from mail-wj0-f171.google.com ([209.85.210.171]:36177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHxGA-0005xw-Nz for control@debbugs.gnu.org; Fri, 16 Dec 2016 13:29:35 -0500 Received: by mail-wj0-f171.google.com with SMTP id tk12so99104621wjb.3 for ; Fri, 16 Dec 2016 10:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=uidBZDOyQouZJmWK1t8TpgjDSA22pb4gmIFe1uHAVkU=; b=Desj27dRoLMD0SB0s5qOIhwnTfkTSJalI3uqcajI/0uf/ugEsa14veIeR4xISHE0Bb KaUvyz9MElnpUc4W3N4eG5u2ioju0Y9mrf4AldRDxIWcrYIT5deQ7UarWTf/T9E5eolf 2wwJ+qSH9clyMwCeNsCu4vD/aSNnut5bZxr31WPWExOSY6vxDqV9rljpfyJy2hUbANyC jnUtMftwiocC65tPqsN4hzAMFKgw2FMebS2sj/W9ZXsWdgdzsx4QvLOaF9mMJfDnyWXA awbFTHp+2UPotwGcmfbUiY3hx7cmAVR7sFi/h/vWpVdNciWtKYapQSfQMbjXapuztb3m ZEXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=uidBZDOyQouZJmWK1t8TpgjDSA22pb4gmIFe1uHAVkU=; b=Y+DDZ5hAXWvcQbNfFnjZafutuMNsylI7eb5EfMogVWVrD/ROoD+yuwoOdNfjxZqMQW hhnNhPN8xWxioLw2R1bVpDVm8at/Rgs0oGxPm+A90Yj17sd+gbKezRdYjVwnQn7Og3tv 1otRBL4JI4D18yx05G64qSxgLPZzpiQF4jXYRwlQ4HdEr7KEkhU4feKoVTmJcxfbx/jl IzPZHRMJK6xsYbnW8DPXxNsNwhM2B01Xw0JQNutTEB67VHfSNToLeJRDbuPNt+eZdmKH wnZSz7u5E66hHD6Baeyg0dyuifCDZNviNpuo6W5mLRPHm2a/nSg0lFL9qpXGD+LPVcEM JThw== X-Gm-Message-State: AIkVDXID0ZadFkNHwBIdKzdHaaS53jtQ4IuVh5cyGKGsqN5ZOiBQ0EjGEVqAJN6oymbAow== X-Received: by 10.194.71.228 with SMTP id y4mr4481177wju.136.1481912968646; Fri, 16 Dec 2016 10:29:28 -0800 (PST) Received: from [192.168.1.3] ([185.105.173.41]) by smtp.googlemail.com with ESMTPSA id i10sm7952413wjd.15.2016.12.16.10.29.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Dec 2016 10:29:27 -0800 (PST) To: control@debbugs.gnu.org From: Dmitry Gutov Subject: submitter 25215 ! Message-ID: <07dd5175-4224-8239-eaf1-603a1d11430a@yandex.ru> Date: Fri, 16 Dec 2016 20:29:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) submitter 25215 ! From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 16:03:25 2016 Received: (at 25215) by debbugs.gnu.org; 16 Dec 2016 21:03:26 +0000 Received: from localhost ([127.0.0.1]:44589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHzf3-0004gc-MQ for submit@debbugs.gnu.org; Fri, 16 Dec 2016 16:03:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHzf2-0004gR-3S for 25215@debbugs.gnu.org; Fri, 16 Dec 2016 16:03:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHzev-0006RL-VQ for 25215@debbugs.gnu.org; Fri, 16 Dec 2016 16:03:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHzev-0006RH-Sf; Fri, 16 Dec 2016 16:03:17 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3071 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cHzev-0002z8-8V; Fri, 16 Dec 2016 16:03:17 -0500 Date: Fri, 16 Dec 2016 23:02:38 +0200 Message-Id: <831sx78u4x.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: (message from Dmitry Gutov on Fri, 16 Dec 2016 14:58:35 +0200) Subject: Re: bug#25215: 25.1.90; js--proper-indentation is affected by the value of forward-sexp-function References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.1 (--------) X-Debbugs-Envelope-To: 25215 Cc: 25215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.1 (--------) > From: Dmitry Gutov > 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 19:00:41 2016 Received: (at 25215-done) by debbugs.gnu.org; 17 Dec 2016 00:00:41 +0000 Received: from localhost ([127.0.0.1]:44680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cI2Qb-0000jP-EL for submit@debbugs.gnu.org; Fri, 16 Dec 2016 19:00:41 -0500 Received: from mail.corporatemx.com ([78.140.179.7]:11599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cI2Qa-0000jC-AE for 25215-done@debbugs.gnu.org; Fri, 16 Dec 2016 19:00:40 -0500 Received: from [185.105.173.41] (port=39886 helo=[192.168.1.3]) by mail.corporatemx.com with esmtpsa (TLSv1.2:DES-CBC3-SHA:168) (envelope-from ) id 1cI2QO-000Iur-El; Sat, 17 Dec 2016 01:00:28 +0100 Subject: Re: bug#25215: 25.1.90; js--proper-indentation is affected by the value of forward-sexp-function To: Eli Zaretskii References: <831sx78u4x.fsf@gnu.org> From: Dmitry Gutov Message-ID: <58433690-7fe4-662b-cce4-1a44cd4c416f@webzilla.com> Date: Sat, 17 Dec 2016 02:00:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 In-Reply-To: <831sx78u4x.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25215-done Cc: 25215-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 16.12.2016 23:02, Eli Zaretskii wrote: > Thanks, this is okay for the release branch. Thanks, installed. From unknown Sun Aug 17 04:16:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 14 Jan 2017 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator