diff options
| author | Glenn Morris | 2013-01-13 12:03:01 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-01-13 12:03:01 -0800 |
| commit | c0511b57692c7a27d3632c34653dab5cfed629ef (patch) | |
| tree | 6e3772eda7ab9082fe5b1639746040ac6cd666a0 /lisp/progmodes/python.el | |
| parent | 0b59090ba3d9b9e3d96d3e80d7031dc46bc2d134 (diff) | |
| parent | 2e7a1892492d450d1fdf52cc704dd8f5d3a9cb18 (diff) | |
| download | emacs-c0511b57692c7a27d3632c34653dab5cfed629ef.tar.gz emacs-c0511b57692c7a27d3632c34653dab5cfed629ef.zip | |
Merge from emacs-24; up to 2012-12-10T20:27:33Z!eggert@cs.ucla.edu
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 |