Function: python-info-dedenter-statement-p

python-info-dedenter-statement-p is a byte-compiled function defined in python.el.gz.

Signature

(python-info-dedenter-statement-p)

Documentation

Return point if current statement is a dedenter.

Sets match-data to the keyword that starts the dedenter statement.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-info-dedenter-statement-p ()
  "Return point if current statement is a dedenter.
Sets `match-data' to the keyword that starts the dedenter
statement."
  (save-excursion
    (python-nav-beginning-of-statement)
    (when (and (not (python-syntax-context-type))
               (looking-at (python-rx dedenter))
               ;; Exclude the first "case" in the block.
               (not (and (string= (match-string-no-properties 0)
                                  "case")
                         (save-excursion
                           (back-to-indentation)
                           (python-util-forward-comment -1)
                           (equal (char-before) ?:)))))
      (point))))