From: Leonardo Nobrega <leonobr@gmail.com>
To: 18462@debbugs.gnu.org
Subject: bug#18462: Emacs freeze with python mode and M-q
Date: Tue, 30 Sep 2014 16:35:58 -0400 [thread overview]
Message-ID: <CAA9xgAqbvCixQwKXARM3gjXeHcWoHN_wKDt1wXj5jLz6KW3b1Q@mail.gmail.com> (raw)
In-Reply-To: <CAA3=JrNJiLaxexJodeTB4DNTq7K1PbOrKUeg7yfj2GhbXhLNWw@mail.gmail.com>
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]*$")
next prev parent reply other threads:[~2014-09-30 20:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 13:37 bug#18462: Emacs freeze with python mode and M-q Gaetan Kenway
2014-09-30 20:35 ` Leonardo Nobrega [this message]
2014-09-30 23:01 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA9xgAqbvCixQwKXARM3gjXeHcWoHN_wKDt1wXj5jLz6KW3b1Q@mail.gmail.com \
--to=leonobr@gmail.com \
--cc=18462@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.