Function: python-shell-with-shell-buffer
python-shell-with-shell-buffer is a macro defined in python.el.gz.
Signature
(python-shell-with-shell-buffer &rest BODY)
Documentation
Execute the forms in BODY with the shell buffer temporarily current.
Signals an error if no shell buffer is available for current buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defmacro python-shell-with-shell-buffer (&rest body)
"Execute the forms in BODY with the shell buffer temporarily current.
Signals an error if no shell buffer is available for current buffer."
(declare (indent 0) (debug t))
(let ((shell-process (make-symbol "shell-process")))
`(let ((,shell-process (python-shell-get-process-or-error)))
(with-current-buffer (process-buffer ,shell-process)
,@body))))