aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2012-02-11 12:20:16 +0800
committerLeo Liu <[email protected]>2012-02-11 12:20:16 +0800
commit5eac0c026f56f6159d871ea92d869eef56bf66ff (patch)
treea83d59a9996025ff56b8c942b3c5f2b2b6cc22b4 /lisp
parentf82cb659425f94a36634a0d1637e4dd899a973df (diff)
Fix infinite loop in python-end-of-statement
http://debbugs.gnu.org/10788
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/python.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b3c8196bc..c873cac2ff 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-11 Leo Liu <[email protected]>
+
+ * progmodes/python.el (python-end-of-statement): Fix infinite
+ loop. (Bug#10788)
+
2012-02-10 Glenn Morris <[email protected]>
* international/mule-cmds.el (unify-8859-on-encoding-mode)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 15d98ce48a..3ef872d26e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -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)