Function: python-pdbtrack-comint-input-filter-function

python-pdbtrack-comint-input-filter-function is a byte-compiled function defined in python.el.gz.

Signature

(python-pdbtrack-comint-input-filter-function INPUT)

Documentation

Finish tracking session depending on command in INPUT.

Commands that must finish the tracking session are listed in python-pdbtrack-exit-command.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-pdbtrack-comint-input-filter-function (input)
  "Finish tracking session depending on command in INPUT.
Commands that must finish the tracking session are listed in
`python-pdbtrack-exit-command'."
  (when (and python-pdbtrack-tracked-buffer
             ;; Empty input is sent by C-d or `comint-send-eof'
             (or (string-empty-p input)
                 ;; "n some text" is "n" command for pdb. Split input and get first part
                 (let* ((command (car (split-string (string-trim input) " "))))
                   (setq python-pdbtrack-prev-command-continue
                         (or (member command python-pdbtrack-continue-command)
                             ;; if command is empty and previous command was 'continue'
                             ;; then current command is 'continue' too.
                             (and (string-empty-p command)
                                  python-pdbtrack-prev-command-continue)))
                   (or python-pdbtrack-prev-command-continue
                       (member command python-pdbtrack-exit-command)))))
    (python-pdbtrack-tracking-finish)))