From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.bugs Subject: bug#23445: 24.5; freeze in sh mode with show-paren-mode Date: Thu, 05 May 2016 07:30:59 +0200 Message-ID: <86r3dhm5po.fsf@ulb.ac.be> References: <8737pykowb.fsf@cventin.lip.ens-lyon.fr> <87r3dhq4jt.fsf@ulb.ac.be> <20160505004421.GB24184@zira.vinc17.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462426370 20013 80.91.229.3 (5 May 2016 05:32:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 May 2016 05:32:50 +0000 (UTC) Cc: 23445@debbugs.gnu.org To: Vincent Lefevre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 05 07:32:30 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ayBtl-0004F5-UN for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 May 2016 07:32:30 +0200 Original-Received: from localhost ([::1]:51801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayBti-0000EX-2s for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 May 2016 01:32:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayBtZ-0008SW-5L for bug-gnu-emacs@gnu.org; Thu, 05 May 2016 01:32:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayBtN-0001PO-GL for bug-gnu-emacs@gnu.org; Thu, 05 May 2016 01:32:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayBtN-0001OA-DN for bug-gnu-emacs@gnu.org; Thu, 05 May 2016 01:32:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ayBtJ-0004za-Vf for bug-gnu-emacs@gnu.org; Thu, 05 May 2016 01:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 May 2016 05:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23445 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 23445-submit@debbugs.gnu.org id=B23445.146242626819126 (code B ref 23445); Thu, 05 May 2016 05:32:01 +0000 Original-Received: (at 23445) by debbugs.gnu.org; 5 May 2016 05:31:08 +0000 Original-Received: from localhost ([127.0.0.1]:38629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayBsS-0004yQ-Ch for submit@debbugs.gnu.org; Thu, 05 May 2016 01:31:08 -0400 Original-Received: from mailrelay108.isp.belgacom.be ([195.238.20.135]:52298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayBsQ-0004xv-JK for 23445@debbugs.gnu.org; Thu, 05 May 2016 01:31:07 -0400 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BkCADX2SpX/+Qqhm1egziBULlvAQ2BdoYQAoE5ORQBAQEBAQEBZSdBAQEDCQSDbgEBAQMBViMFCwgDFAQJJQ8BKR4GE4giDLpKg3UBAQEBAQUCAR2GIIRMihgFmBqdLI80HgEBQoNtOjCCBIJZg30BAQE Original-Received: from 228.42-134-109.adsl-dyn.isp.belgacom.be (HELO Aurora) ([109.134.42.228]) by relay.skynet.be with ESMTP; 05 May 2016 07:30:59 +0200 User-agent: mu4e 0.9.17; emacs 25.0.93.1 In-reply-to: <20160505004421.GB24184@zira.vinc17.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117831 Archived-At: Vincent Lefevre writes: > On 2016-05-04 16:30:14 +0200, Nicolas Richard wrote: >> Thanks for the report and the recipe. I can reproduce it on 24.5 but not >> on the emacs-25 branch, so I guess this was fixed in the meantime and >> I'm closing your report. Feel free to ask if you need more information. > > OK. If someone has a patch (or knows the commit the fixed the bug), > I'd be interested. Not sure, but it could be this one : commit 1bab3cefc133e06aaf4a48efb1623d1b458ab212 Author: Tassilo Horn Date: Mon Oct 26 08:01:18 2015 +0100 Fix infinite loop in sh-script's SMIE code * lisp/progmodes/sh-script.el (sh-smie-sh-forward-token): Fix infinite loop (bug#21747). diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index fbb4a90..baed27b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1920,10 +1920,11 @@ Does not preserve point." ;; Pretend the here-document is a "newline representing a ;; semi-colon", since the here-doc otherwise covers the newline(s). ";") - (let ((semi (sh-smie--newline-semi-p))) - (forward-line 1) - (if (or semi (eobp)) ";" - (sh-smie-sh-forward-token)))) + (unless (eobp) + (let ((semi (sh-smie--newline-semi-p))) + (forward-line 1) + (if (or semi (eobp)) ";" + (sh-smie-sh-forward-token))))) (forward-comment (point-max)) (cond ((looking-at "\\\\\n") (forward-line 1) (sh-smie-sh-forward-token))