GNU bug report logs - #16233
sh-smie-sh-forward-toke recurses forever

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Mon, 23 Dec 2013 23:08:01 UTC

Severity: normal

Done: Daniel Colascione <dancol <at> dancol.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16233 in the body.
You can then email your comments to 16233 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16233; Package emacs. (Mon, 23 Dec 2013 23:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Colascione <dancol <at> dancol.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 23 Dec 2013 23:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: bug-emacs <bug-gnu-emacs <at> gnu.org>
Subject: sh-smie-sh-forward-toke recurses forever
Date: Mon, 23 Dec 2013 15:07:32 -0800
In latest trunk, sh-smie-sh-forward-token has started to recurse 
forever. Here's the repro:

"if "

Create a buffer containing these three characters, put it in 
shell-script-mode, goto-char 2, and eval (funcall show-paren-data-function)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16233; Package emacs. (Mon, 23 Dec 2013 23:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 16233 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: 16233 <at> debbugs.gnu.org
Subject: Re: bug#16233: sh-smie-sh-forward-toke recurses forever
Date: Mon, 23 Dec 2013 15:30:47 -0800
On 12/23/2013 03:07 PM, Daniel Colascione wrote:
> In latest trunk, sh-smie-sh-forward-token has started to recurse
> forever. Here's the repro:
>
> "if "
>
> Create a buffer containing these three characters, put it in
> shell-script-mode, goto-char 2, and eval (funcall show-paren-data-function)

This patch appears to be fix the problem. Okay to apply?

=== modified file 'lisp/progmodes/sh-script.el'
--- lisp/progmodes/sh-script.el	2013-12-20 21:41:57 +0000
+++ lisp/progmodes/sh-script.el	2013-12-23 23:29:31 +0000
@@ -1844,7 +1844,7 @@
             ";")
         (let ((semi (sh-smie--newline-semi-p)))
           (forward-line 1)
-          (if semi ";"
+          (if (or semi (eobp)) ";"
             (sh-smie-sh-forward-token))))
     (forward-comment (point-max))
     (cond
@@ -2070,7 +2070,7 @@
             ";")
         (let ((semi (sh-smie--rc-newline-semi-p)))
           (forward-line 1)
-          (if semi ";"
+          (if (or semi (eobp)) ";"
             (sh-smie-rc-forward-token))))
     (forward-comment (point-max))
     (cond





Reply sent to Daniel Colascione <dancol <at> dancol.org>:
You have taken responsibility. (Mon, 30 Dec 2013 23:24:01 GMT) Full text and rfc822 format available.

Notification sent to Daniel Colascione <dancol <at> dancol.org>:
bug acknowledged by developer. (Mon, 30 Dec 2013 23:24:02 GMT) Full text and rfc822 format available.

Message #13 received at 16233-done <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: 16233-done <at> debbugs.gnu.org
Subject: Done
Date: Mon, 30 Dec 2013 15:23:29 -0800
Pushed to trunk




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Jan 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.