[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106338: * lisp/progmodes/python.el (
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106338: * lisp/progmodes/python.el (python-beginning-of-statement): Rewrite. |
Date: |
Wed, 09 Nov 2011 10:00:32 -0500 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106338
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2703
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2011-11-09 10:00:32 -0500
message:
* lisp/progmodes/python.el (python-beginning-of-statement): Rewrite.
modified:
lisp/ChangeLog
lisp/progmodes/python.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-11-09 14:04:13 +0000
+++ b/lisp/ChangeLog 2011-11-09 15:00:32 +0000
@@ -1,5 +1,8 @@
2011-11-09 Stefan Monnier <address@hidden>
+ * progmodes/python.el (python-beginning-of-statement):
+ Rewrite (bug#2703).
+
* progmodes/compile.el: Better handle TABs (bug#9749).
(compilation-internal-error-properties)
(compilation-next-error-function): Obey the target buffer's
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2011-09-10 21:15:28 +0000
+++ b/lisp/progmodes/python.el 2011-11-09 15:00:32 +0000
@@ -948,22 +948,12 @@
"Go to start of current statement.
Accounts for continuation lines, multi-line strings, and
multi-line bracketed expressions."
- (beginning-of-line)
- (python-beginning-of-string)
- (let (point)
- (while (and (python-continuation-line-p)
- (if point
- (< (point) point)
- t))
- (beginning-of-line)
+ (while
(if (python-backslash-continuation-line-p)
- (progn
- (forward-line -1)
- (while (python-backslash-continuation-line-p)
- (forward-line -1)))
- (python-beginning-of-string)
- (python-skip-out))
- (setq point (point))))
+ (progn (forward-line -1) t)
+ (beginning-of-line)
+ (or (python-beginning-of-string)
+ (python-skip-out))))
(back-to-indentation))
(defun python-skip-out (&optional forward syntax)
@@ -971,6 +961,7 @@
Skip forward if FORWARD is non-nil, else backward.
If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point.
Return non-nil if and only if skipping was done."
+ ;; FIXME: Use syntax-ppss-toplevel-pos.
(let ((depth (syntax-ppss-depth (or syntax (syntax-ppss))))
(forward (if forward -1 1)))
(unless (zerop depth)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106338: * lisp/progmodes/python.el (python-beginning-of-statement): Rewrite.,
Stefan Monnier <=