Function: python-info-continuation-line-p
python-info-continuation-line-p is a byte-compiled function defined in
python.el.gz.
Signature
(python-info-continuation-line-p)
Documentation
Check if current line is continuation of another.
When current line is continuation of another return the point where the continued line ends.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-info-continuation-line-p ()
"Check if current line is continuation of another.
When current line is continuation of another return the point
where the continued line ends."
(save-excursion
(let* ((context-type (progn
(back-to-indentation)
(python-syntax-context-type)))
(line-start (line-number-at-pos))
(context-start (when context-type
(python-syntax-context context-type))))
(cond ((equal context-type 'paren)
;; Lines inside a paren are always a continuation line
;; (except the first one).
(python-util-forward-comment -1)
(point-marker))
((member context-type '(string comment))
;; move forward an roll again
(goto-char context-start)
(python-util-forward-comment)
(python-info-continuation-line-p))
(t
;; Not within a paren, string or comment, the only way
;; we are dealing with a continuation line is that
;; previous line contains a backslash, and this can
;; only be the previous line from current
(back-to-indentation)
(python-util-forward-comment -1)
(when (and (equal (1- line-start) (line-number-at-pos))
(python-info-line-ends-backslash-p))
(point-marker)))))))