Kaydet (Commit) 7a73ef85 authored tarafından Barry Warsaw's avatar Barry Warsaw

(py-process-filter): Make sure current-buffer is restored, even in the

event of error.  Can't use new Emacs primitive save-current-buffer, so
use unwind-protect instead.
üst 24611f80
......@@ -932,8 +932,12 @@ See the `\\[py-shell]' docs for additional warnings."
;; read_process_output has update_mode_lines++ for a similar
;; reason? beats me ...
(unwind-protect
;; make sure current buffer is restored
;; BAW - we want to check to see if this still applies
(if (eq curbuf pbuf) ; mysterious ugly hack
(progn
;; mysterious ugly hack
(if (eq curbuf pbuf)
(set-buffer (get-buffer-create "*scratch*")))
(set-buffer pbuf)
......@@ -967,7 +971,8 @@ See the `\\[py-shell]' docs for additional warnings."
(and goend
(progn (set-buffer pbuf)
(goto-char (point-max))))
)))
))
(set-buffer curbuf))))
(defun py-execute-buffer ()
"Send the contents of the buffer to a Python interpreter.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment