diff options
| author | Karoly Lorentey | 2007-04-22 11:42:03 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-04-22 11:42:03 +0000 |
| commit | 81088e260b086fe28f36964f32b6338210ec6fd8 (patch) | |
| tree | 53d5af73ca0c971fe6925944d4d059caab5337a2 /lisp/progmodes/python.el | |
| parent | fa1b1007cac59bafd16df7bd501ef2591dd77d62 (diff) | |
| parent | a6f0e674ebf44b1d37732b64070b804673481d28 (diff) | |
| download | emacs-81088e260b086fe28f36964f32b6338210ec6fd8.tar.gz emacs-81088e260b086fe28f36964f32b6338210ec6fd8.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-650
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-651
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-652
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-653
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-654
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-655
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-656
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-657
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-658
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-659
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-203
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-204
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-205
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-599
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f94a3d63653..38e846aa2cc 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -163,7 +163,7 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)." | |||
| 163 | (= (match-beginning 1) (match-end 1))) ; prefix is null | 163 | (= (match-beginning 1) (match-end 1))) ; prefix is null |
| 164 | (and (= n 1) ; prefix | 164 | (and (= n 1) ; prefix |
| 165 | (/= (match-beginning 1) (match-end 1)))) ; non-empty | 165 | (/= (match-beginning 1) (match-end 1)))) ; non-empty |
| 166 | (unless (eq 'string (syntax-ppss-context (syntax-ppss))) | 166 | (unless (nth 3 (syntax-ppss)) |
| 167 | (eval-when-compile (string-to-syntax "|")))) | 167 | (eval-when-compile (string-to-syntax "|")))) |
| 168 | ;; Otherwise (we're in a non-matching string) the property is | 168 | ;; Otherwise (we're in a non-matching string) the property is |
| 169 | ;; nil, which is OK. | 169 | ;; nil, which is OK. |
| @@ -1743,12 +1743,11 @@ Otherwise, do nothing." | |||
| 1743 | (orig (point)) | 1743 | (orig (point)) |
| 1744 | (start (nth 8 syntax)) | 1744 | (start (nth 8 syntax)) |
| 1745 | end) | 1745 | end) |
| 1746 | (cond ((eq t (nth 3 syntax)) ; in fenced string | 1746 | (cond ((eq t (nth 3 syntax)) ; in fenced string |
| 1747 | (goto-char (nth 8 syntax)) ; string start | 1747 | (goto-char (nth 8 syntax)) ; string start |
| 1748 | (condition-case () ; for unbalanced quotes | 1748 | (setq end (condition-case () ; for unbalanced quotes |
| 1749 | (progn (forward-sexp) | 1749 | (progn (forward-sexp) (point)) |
| 1750 | (setq end (point))) | 1750 | (error (point-max))))) |
| 1751 | (error (setq end (point-max))))) | ||
| 1752 | ((re-search-backward "\\s|\\s-*\\=" nil t) ; end of fenced | 1751 | ((re-search-backward "\\s|\\s-*\\=" nil t) ; end of fenced |
| 1753 | ; string | 1752 | ; string |
| 1754 | (forward-char) | 1753 | (forward-char) |
| @@ -1756,13 +1755,17 @@ Otherwise, do nothing." | |||
| 1756 | (condition-case () | 1755 | (condition-case () |
| 1757 | (progn (backward-sexp) | 1756 | (progn (backward-sexp) |
| 1758 | (setq start (point))) | 1757 | (setq start (point))) |
| 1759 | (error nil)))) | 1758 | (error (setq end nil))))) |
| 1760 | (when end | 1759 | (when end |
| 1761 | (save-restriction | 1760 | (save-restriction |
| 1762 | (narrow-to-region start end) | 1761 | (narrow-to-region start end) |
| 1763 | (goto-char orig) | 1762 | (goto-char orig) |
| 1764 | (fill-paragraph justify)))))) | 1763 | (let ((paragraph-separate |
| 1765 | t) | 1764 | ;; Make sure that fenced-string delimiters that stand |
| 1765 | ;; on their own line stay there. | ||
| 1766 | (concat "[ \t]*['\"]+[ \t]*$\\|" paragraph-separate))) | ||
| 1767 | (fill-paragraph justify)))))) | ||
| 1768 | t)) | ||
| 1766 | 1769 | ||
| 1767 | (defun python-shift-left (start end &optional count) | 1770 | (defun python-shift-left (start end &optional count) |
| 1768 | "Shift lines in region COUNT (the prefix arg) columns to the left. | 1771 | "Shift lines in region COUNT (the prefix arg) columns to the left. |