From: Richard M. Stallman Date: Tue, 24 Sep 1996 23:54:08 +0000 (+0000) Subject: (shell-command-to-string): Make the buffer current X-Git-Tag: emacs-20.1~3628 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=17cc9013459720019db83ff864fedd60018695b1;p=emacs.git (shell-command-to-string): Make the buffer current since output goes in current buffer. Use shell-command-switch. --- diff --git a/lisp/simple.el b/lisp/simple.el index 718b0b8ef3f..fe5c4cd3218 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -945,7 +945,9 @@ In either case, the output is inserted after point (leaving mark after it)." (defun shell-command-to-string (command) "Execute shell command COMMAND and return its output as a string." (with-output-to-string - (call-process shell-file-name nil t nil "-c" command))) + (with-current-buffer + standard-output + (call-process shell-file-name nil t nil shell-command-switch command)))) (defconst universal-argument-map (let ((map (make-sparse-keymap)))