From: Stefan Monnier Date: Fri, 29 Jul 2005 20:16:51 +0000 (+0000) Subject: (subprocess-buf): Declare to quieten compiler. X-Git-Tag: emacs-pretest-22.0.90~7837 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6bc522026c6fb1ea0dd4d28b8011e2d59b2117e1;p=emacs.git (subprocess-buf): Declare to quieten compiler. --- diff --git a/lisp/vmsproc.el b/lisp/vmsproc.el index 56237693670..3c4df12c8bb 100644 --- a/lisp/vmsproc.el +++ b/lisp/vmsproc.el @@ -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."