diff options
| author | Tom Tromey | 2013-01-16 11:48:32 -0700 |
|---|---|---|
| committer | Tom Tromey | 2013-01-16 11:48:32 -0700 |
| commit | 6f4de085f065e11f4df3195d47479f28f5ef08ba (patch) | |
| tree | 1211a00f1afc86c2b73624897993db02a4852943 /lisp/progmodes/python.el | |
| parent | e078a23febca14bc919c5806670479c395e3253e (diff) | |
| parent | ffe04adc88e546c406f9b050238fb98a7243c7a0 (diff) | |
| download | emacs-6f4de085f065e11f4df3195d47479f28f5ef08ba.tar.gz emacs-6f4de085f065e11f4df3195d47479f28f5ef08ba.zip | |
merge from trunk
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 172193266ca..0e5f4c82090 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1198,7 +1198,16 @@ of the statement." | |||
| 1198 | (not (eobp)) | 1198 | (not (eobp)) |
| 1199 | (cond ((setq string-start (python-syntax-context 'string)) | 1199 | (cond ((setq string-start (python-syntax-context 'string)) |
| 1200 | (goto-char string-start) | 1200 | (goto-char string-start) |
| 1201 | (python-nav-end-of-statement t)) | 1201 | (if (python-syntax-context 'paren) |
| 1202 | ;; Ended up inside a paren, roll again. | ||
| 1203 | (python-nav-end-of-statement t) | ||
| 1204 | ;; This is not inside a paren, move to the | ||
| 1205 | ;; end of this string. | ||
| 1206 | (goto-char (+ (point) | ||
| 1207 | (python-syntax-count-quotes | ||
| 1208 | (char-after (point)) (point)))) | ||
| 1209 | (or (re-search-forward (rx (syntax string-delimiter)) nil t) | ||
| 1210 | (goto-char (point-max))))) | ||
| 1202 | ((python-syntax-context 'paren) | 1211 | ((python-syntax-context 'paren) |
| 1203 | ;; The statement won't end before we've escaped | 1212 | ;; The statement won't end before we've escaped |
| 1204 | ;; at least one level of parenthesis. | 1213 | ;; at least one level of parenthesis. |
| @@ -1312,7 +1321,7 @@ backward to previous block." | |||
| 1312 | "Safe version of standard `forward-sexp'. | 1321 | "Safe version of standard `forward-sexp'. |
| 1313 | When ARG > 0 move forward, else if ARG is < 0." | 1322 | When ARG > 0 move forward, else if ARG is < 0." |
| 1314 | (or arg (setq arg 1)) | 1323 | (or arg (setq arg 1)) |
| 1315 | (let ((forward-sexp-function nil) | 1324 | (let ((forward-sexp-function) |
| 1316 | (paren-regexp | 1325 | (paren-regexp |
| 1317 | (if (> arg 0) (python-rx close-paren) (python-rx open-paren))) | 1326 | (if (> arg 0) (python-rx close-paren) (python-rx open-paren))) |
| 1318 | (search-fn | 1327 | (search-fn |