emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117525: * lisp/progmodes/python.el (python-fill-


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117525: * lisp/progmodes/python.el (python-fill-paren): Don't inf-loop at EOB.
Date: Tue, 30 Sep 2014 23:01:03 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117525
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18462
author: Leonardo Nobrega <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-09-30 19:00:57 -0400
message:
  * lisp/progmodes/python.el (python-fill-paren): Don't inf-loop at EOB.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/python.el       python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-09-27 16:25:53 +0000
+++ b/lisp/ChangeLog    2014-09-30 23:00:57 +0000
@@ -1,3 +1,8 @@
+2014-09-30  Leonardo Nobrega  <address@hidden>  (tiny change)
+
+       * progmodes/python.el (python-fill-paren): Don't inf-loop at EOB
+       (bug#18462).
+
 2014-09-27  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/package.el (package-check-signature): Default to nil if

=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el  2014-09-01 22:51:46 +0000
+++ b/lisp/progmodes/python.el  2014-09-30 23:00:57 +0000
@@ -3107,7 +3107,8 @@
                           (end-of-line)
                           (when (not (python-syntax-context 'paren))
                             (skip-syntax-backward "^)")))
-                        (while (python-syntax-context 'paren)
+                        (while (and (python-syntax-context 'paren)
+                                    (not (eobp)))
                           (goto-char (1+ (point-marker))))
                         (point-marker)))
     (let ((paragraph-start "\f\\|[ \t]*$")
@@ -3118,7 +3119,8 @@
     (while (not (eobp))
       (forward-line 1)
       (python-indent-line)
-      (goto-char (line-end-position)))) t)
+      (goto-char (line-end-position))))
+  t)
 
 
 ;;; Skeletons


reply via email to

[Prev in Thread] Current Thread [Next in Thread]