Function: python-info-triple-quoted-string-p

python-info-triple-quoted-string-p is a byte-compiled function defined in python.el.gz.

Signature

(python-info-triple-quoted-string-p)

Documentation

Check if point is in a triple quoted string including quotes.

It returns the position of the third quote character of the start of the string.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-info-triple-quoted-string-p ()
  "Check if point is in a triple quoted string including quotes.
It returns the position of the third quote character of the start
of the string."
  (save-excursion
    (let ((pos (point)))
      (cl-loop
       for offset in '(0 3 -2 2 -1 1)
       if (let ((check-pos (+ pos offset)))
            (and (>= check-pos (point-min))
                 (<= check-pos (point-max))
                 (python-syntax-context
                  'triple-quoted-string (syntax-ppss check-pos))))
       return it))))