]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix infinite loop in python-end-of-statement
authorLeo Liu <sdl.web@gmail.com>
Sat, 11 Feb 2012 04:20:16 +0000 (12:20 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sat, 11 Feb 2012 04:20:16 +0000 (12:20 +0800)
http://debbugs.gnu.org/10788

lisp/ChangeLog
lisp/progmodes/python.el

index 8b3c8196bc8f8abdcdf3b6ebd7717fc4e7a347b5..c873cac2ffe2129b06e7695c2ea1c33a4b9395c1 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-11  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/python.el (python-end-of-statement): Fix infinite
+       loop.  (Bug#10788)
+
 2012-02-10  Glenn Morris  <rgm@gnu.org>
 
        * international/mule-cmds.el (unify-8859-on-encoding-mode)
index 15d98ce48affe3b78d0b39103196950f1dde633d..3ef872d26ebdbf01e70cfe0eaa963d1fa7b83c66 100644 (file)
@@ -1004,9 +1004,10 @@ On a comment line, go to end of line."
                                (error (goto-char pos) (end-of-line)))))
                          ((python-skip-out t s))))
             (end-of-line))
-          (unless comment
-            (eq ?\\ (char-before))))   ; Line continued?
-    (end-of-line 2))                   ; Try next line.
+          (and (not comment)
+               (not (eobp))
+               (eq ?\\ (char-before)))) ; Line continued?
+    (end-of-line 2))                     ; Try next line.
   (point))
 
 (defun python-previous-statement (&optional count)