Function: python-shell-prompt-validate-regexps
python-shell-prompt-validate-regexps is a byte-compiled function
defined in python.el.gz.
Signature
(python-shell-prompt-validate-regexps)
Documentation
Validate all user provided regexps for prompts.
Signals user-error if any of these vars contain invalid
regexps: python-shell-prompt-regexp,
python-shell-prompt-block-regexp,
python-shell-prompt-pdb-regexp,
python-shell-prompt-output-regexp,
python-shell-prompt-input-regexps,
python-shell-prompt-output-regexps.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-prompt-validate-regexps ()
"Validate all user provided regexps for prompts.
Signals `user-error' if any of these vars contain invalid
regexps: `python-shell-prompt-regexp',
`python-shell-prompt-block-regexp',
`python-shell-prompt-pdb-regexp',
`python-shell-prompt-output-regexp',
`python-shell-prompt-input-regexps',
`python-shell-prompt-output-regexps'."
(dolist (symbol (list 'python-shell-prompt-input-regexps
'python-shell-prompt-output-regexps
'python-shell-prompt-regexp
'python-shell-prompt-block-regexp
'python-shell-prompt-pdb-regexp
'python-shell-prompt-output-regexp))
(dolist (regexp (let ((regexps (symbol-value symbol)))
(if (listp regexps)
regexps
(list regexps))))
(when (not (python-util-valid-regexp-p regexp))
(user-error "Invalid regexp %s in `%s'"
regexp symbol)))))