changeset 64683:d8a052666f20

(subprocess-buf): Declare to quieten compiler.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 29 Jul 2005 20:16:51 +0000
parents ddfb3e6e7046
children eb2cbda455c6
files lisp/vmsproc.el
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vmsproc.el	Fri Jul 29 20:14:37 2005 +0000
+++ b/lisp/vmsproc.el	Fri Jul 29 20:16:51 2005 +0000
@@ -34,6 +34,8 @@
   "String to insert to distinguish commands entered by user.")
 
 (defvar subprocess-running nil)
+(defvar subprocess-buf nil)
+
 (defvar command-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "\C-m" 'command-send-input)
@@ -44,12 +46,9 @@
   "Handles input from a subprocess.  Called by Emacs."
   (if display-subprocess-window
       (display-buffer subprocess-buf))
-  (let ((old-buffer (current-buffer)))
-    (set-buffer subprocess-buf)
+  (with-current-buffer subprocess-buf
     (goto-char (point-max))
-    (insert str)
-    (insert ?\n)
-    (set-buffer old-buffer)))
+    (insert str ?\n)))
 
 (defun subprocess-exit (name)
   "Called by Emacs upon subprocess exit."