Function: python-syntax-count-quotes

python-syntax-count-quotes is a byte-compiled function defined in python.el.gz.

Signature

(python-syntax-count-quotes QUOTE-CHAR &optional POINT LIMIT)

Documentation

Count number of quotes around point (max is 3).

QUOTE-CHAR is the quote char to count. Optional argument POINT is the point where scan starts (defaults to current point), and LIMIT is used to limit the scan.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defsubst python-syntax-count-quotes (quote-char &optional point limit)
  "Count number of quotes around point (max is 3).
QUOTE-CHAR is the quote char to count.  Optional argument POINT is
the point where scan starts (defaults to current point), and LIMIT
is used to limit the scan."
  (let ((i 0))
    (while (and (< i 3)
                (or (not limit) (< (+ point i) limit))
                (eq (char-after (+ point i)) quote-char))
      (setq i (1+ i)))
    i))