]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix infloop in indentation code
authorDaniel Colascione <dancol@dancol.org>
Mon, 30 Dec 2013 23:16:34 +0000 (15:16 -0800)
committerDaniel Colascione <dancol@dancol.org>
Mon, 30 Dec 2013 23:16:34 +0000 (15:16 -0800)
lisp/ChangeLog
lisp/progmodes/sh-script.el

index 910d35afc4b0d24f75c0200bd891070426194dde..30634f79b148c3bef85908ccfcb67c66061d4365 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-30  Daniel Colascione  <dancol@dancol.org>
+
+       * progmodes/sh-script.el
+       (sh-smie-sh-forward-token,sh-smie-rc-forward-token): Fix infloop
+       in indentation code.  (Bug#16233)
+
 2013-12-28  João Távora  <joaotavora@gmail.com>
 
        * elec-pair.el (electric-pair-post-self-insert-function): Don't
index 5f2f70cf32a4b39d1a0036ceea11413c491d8ab3..5475cccabf77ebbeae929dcda31156aac643c916 100644 (file)
@@ -1844,7 +1844,7 @@ Does not preserve point."
             ";")
         (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 @@ Point should be before the newline."
             ";")
         (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