unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Richard <nrichard@ulb.ac.be>
To: Vincent Lefevre <vincent@vinc17.net>
Cc: 23445@debbugs.gnu.org
Subject: bug#23445: 24.5; freeze in sh mode with show-paren-mode
Date: Thu, 05 May 2016 07:30:59 +0200	[thread overview]
Message-ID: <86r3dhm5po.fsf@ulb.ac.be> (raw)
In-Reply-To: <20160505004421.GB24184@zira.vinc17.org>

Vincent Lefevre <vincent@vinc17.net> 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 <tsdh@gnu.org>
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))





  reply	other threads:[~2016-05-05  5:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 12:07 bug#23445: 24.5; freeze in sh mode with show-paren-mode Vincent Lefevre
2016-05-04 12:26 ` Vincent Lefevre
2016-05-04 14:30 ` Nicolas Richard
2016-05-05  0:44   ` Vincent Lefevre
2016-05-05  5:30     ` Nicolas Richard [this message]
2016-05-07  0:19       ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r3dhm5po.fsf@ulb.ac.be \
    --to=nrichard@ulb.ac.be \
    --cc=23445@debbugs.gnu.org \
    --cc=vincent@vinc17.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).