GNU bug report logs -
#18462
Emacs freeze with python mode and M-q
Previous Next
Reported by: Gaetan Kenway <gaetank <at> gmail.com>
Date: Fri, 12 Sep 2014 16:43:02 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 18462 <at> debbugs.gnu.org (full text, mbox):
The second loop in python-fill-paren moves the point until the syntax
context changes. If it doesn't find a close-paren before the end of
the buffer, it loops forever.
ChangeLog entry:
* lisp/progmodes/python.el (python-fill-paren): Break
end-of-region loop when it reaches point-max.
Patch:
=== modified file 'lisp/progmodes/python.el'
*** lisp/progmodes/python.el 2014-09-29 18:14:08 +0000
--- lisp/progmodes/python.el 2014-09-30 20:14:37 +0000
*************** JUSTIFY should be used (if applicable) a
*** 3300,3306 ****
(end-of-line)
(when (not (python-syntax-context 'paren))
(skip-syntax-backward "^)")))
! (while (python-syntax-context 'paren)
(goto-char (1+ (point-marker))))
(point-marker)))
(let ((paragraph-start "\f\\|[ \t]*$")
--- 3300,3307 ----
(end-of-line)
(when (not (python-syntax-context 'paren))
(skip-syntax-backward "^)")))
! (while (and (python-syntax-context 'paren)
! (< (point) (point-max)))
(goto-char (1+ (point-marker))))
(point-marker)))
(let ((paragraph-start "\f\\|[ \t]*$")
This bug report was last modified 10 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.