diff options
| author | Miles Bader | 2006-05-02 05:51:52 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-05-02 05:51:52 +0000 |
| commit | fe682fb2f05fcbd9fcd2d12c2110719adcfcb58a (patch) | |
| tree | 2a89d2d9ea2689cfe80a7618885cdd9f449761dd /lisp/progmodes/python.el | |
| parent | 7e635d0ed3c42e6e779821f5c0c1c62289f4c1ee (diff) | |
| parent | 6cf93749317c2e18f850cd0f47f905895e850bfc (diff) | |
| download | emacs-fe682fb2f05fcbd9fcd2d12c2110719adcfcb58a.tar.gz emacs-fe682fb2f05fcbd9fcd2d12c2110719adcfcb58a.zip | |
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-58
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 239-258)
- Update from CVS
- (Ffield_beginning, find_field): Undo change of 2006-04-23.
- Rcirc patch from Ryan Yeske
- Merge from gnus--rel--5.10
- Clean up lisp/gnus/ChangeLog a bit
* gnus--rel--5.10 (patch 91-98)
- Merge from emacs--devo--0
- Update from CVS
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5e645535a23..9636f7eaeae 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -292,9 +292,9 @@ The criteria are that the previous line ends in a backslash outside | |||
| 292 | comments and strings, or that the bracket/paren nesting depth is nonzero." | 292 | comments and strings, or that the bracket/paren nesting depth is nonzero." |
| 293 | (or (and (eq ?\\ (char-before (line-end-position 0))) | 293 | (or (and (eq ?\\ (char-before (line-end-position 0))) |
| 294 | (not (syntax-ppss-context (syntax-ppss)))) | 294 | (not (syntax-ppss-context (syntax-ppss)))) |
| 295 | (/= 0 (syntax-ppss-depth | 295 | (< 0 (syntax-ppss-depth |
| 296 | (save-excursion ; syntax-ppss with arg changes point | 296 | (save-excursion ; syntax-ppss with arg changes point |
| 297 | (syntax-ppss (line-beginning-position))))))) | 297 | (syntax-ppss (line-beginning-position))))))) |
| 298 | 298 | ||
| 299 | (defun python-comment-line-p () | 299 | (defun python-comment-line-p () |
| 300 | "Return non-nil iff current line has only a comment." | 300 | "Return non-nil iff current line has only a comment." |
| @@ -719,7 +719,10 @@ expressions." | |||
| 719 | (python-beginning-of-string) | 719 | (python-beginning-of-string) |
| 720 | ;; Skip forward out of nested brackets. | 720 | ;; Skip forward out of nested brackets. |
| 721 | (condition-case () ; beware invalid syntax | 721 | (condition-case () ; beware invalid syntax |
| 722 | (progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t) | 722 | (let ((depth (syntax-ppss-depth (syntax-ppss)))) |
| 723 | ;; Beware negative depths. | ||
| 724 | (if (> depth 0) (backward-up-list depth)) | ||
| 725 | t) | ||
| 723 | (error (throw 'foo nil)))))) | 726 | (error (throw 'foo nil)))))) |
| 724 | (back-to-indentation)) | 727 | (back-to-indentation)) |
| 725 | 728 | ||
| @@ -1755,7 +1758,6 @@ lines count as headers. | |||
| 1755 | (if (featurep 'hippie-exp) | 1758 | (if (featurep 'hippie-exp) |
| 1756 | (set (make-local-variable 'hippie-expand-try-functions-list) | 1759 | (set (make-local-variable 'hippie-expand-try-functions-list) |
| 1757 | (cons 'python-try-complete hippie-expand-try-functions-list))) | 1760 | (cons 'python-try-complete hippie-expand-try-functions-list))) |
| 1758 | (unless font-lock-mode (font-lock-mode 1)) | ||
| 1759 | (when python-guess-indent (python-guess-indent)) | 1761 | (when python-guess-indent (python-guess-indent)) |
| 1760 | (set (make-local-variable 'python-command) python-python-command) | 1762 | (set (make-local-variable 'python-command) python-python-command) |
| 1761 | (unless (boundp 'python-mode-running) ; kill the recursion from jython-mode | 1763 | (unless (boundp 'python-mode-running) ; kill the recursion from jython-mode |