[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/python.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/python.el,v |
Date: |
Wed, 09 May 2007 16:53:14 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 07/05/09 16:53:14
Index: python.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/python.el,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- python.el 8 May 2007 02:05:46 -0000 1.59
+++ python.el 9 May 2007 16:53:13 -0000 1.60
@@ -883,10 +883,13 @@
nil)
((eq 'string (syntax-ppss-context s))
;; Go to start of string and skip it.
+ (let ((pos (point)))
(goto-char (nth 8 s))
(condition-case () ; beware invalid syntax
(progn (forward-sexp) t)
- (error (end-of-line))))
+ ;; If there's a mismatched string, make sure
+ ;; we still overall move *forward*.
+ (error (goto-char pos) (end-of-line)))))
((python-skip-out t s))))
(end-of-line))
(unless comment
@@ -981,15 +984,11 @@
(_ (if (python-comment-line-p)
(python-skip-comments/blanks t)))
(ci (current-indentation))
- (open (python-open-block-statement-p))
- opoint)
+ (open (python-open-block-statement-p)))
(if (and (zerop ci) (not open))
(not (goto-char point))
(catch 'done
- (setq opoint (point))
- (while (and (zerop (python-next-statement))
- (not (= opoint (point))))
- (setq opoint (point))
+ (while (zerop (python-next-statement))
(when (or (and open (<= (current-indentation) ci))
(< (current-indentation) ci))
(python-skip-comments/blanks t)