aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 79ef752c0f2..b745050f551 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -618,6 +618,17 @@ START is the buffer position where the sexp starts."
618 (save-excursion 618 (save-excursion
619 (forward-line -1) 619 (forward-line -1)
620 (python-info-assignment-continuation-line-p))) 620 (python-info-assignment-continuation-line-p)))
621 (dot-continuation
622 (save-excursion
623 (back-to-indentation)
624 (when (looking-at "\\.")
625 (forward-line -1)
626 (back-to-indentation)
627 (forward-char (length
628 (with-syntax-table python-dotty-syntax-table
629 (current-word))))
630 (re-search-backward "\\." (line-beginning-position) t 1)
631 (current-column))))
621 (indentation (cond (block-continuation 632 (indentation (cond (block-continuation
622 (goto-char block-continuation) 633 (goto-char block-continuation)
623 (re-search-forward 634 (re-search-forward
@@ -634,6 +645,8 @@ START is the buffer position where the sexp starts."
634 (python-rx (* space)) 645 (python-rx (* space))
635 (line-end-position) t) 646 (line-end-position) t)
636 (current-column)) 647 (current-column))
648 (dot-continuation
649 dot-continuation)
637 (t 650 (t
638 (goto-char context-start) 651 (goto-char context-start)
639 (current-indentation))))) 652 (current-indentation)))))
@@ -1956,6 +1969,7 @@ not inside a defun."
1956 not-simple-operator) 1969 not-simple-operator)
1957 (line-end-position) t) 1970 (line-end-position) t)
1958 (not (or (python-info-ppss-context 'string) 1971 (not (or (python-info-ppss-context 'string)
1972 (python-info-ppss-context 'paren)
1959 (python-info-ppss-context 'comment)))))) 1973 (python-info-ppss-context 'comment))))))
1960 (point-marker)))) 1974 (point-marker))))
1961 1975