GNU bug report logs -
#16233
sh-smie-sh-forward-toke recurses forever
Previous Next
Full log
View this message in rfc822 format
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
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.