Function: python-syntax-context-type

python-syntax-context-type is a byte-compiled function defined in python.el.gz.

Signature

(python-syntax-context-type &optional SYNTAX-PPSS)

Documentation

Return the context type using SYNTAX-PPSS.

The type returned can be comment, string or paren.

Aliases

python-info-ppss-context-type (obsolete since 24.3)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-syntax-context-type (&optional syntax-ppss)
  "Return the context type using SYNTAX-PPSS.
The type returned can be `comment', `string' or `paren'."
  (let ((ppss (or syntax-ppss (syntax-ppss))))
    (cond
     ((nth 8 ppss) (if (nth 4 ppss) 'comment 'string))
     ((nth 1 ppss) 'paren))))