diff lisp/simple.el @ 16316:50be5f6cb5e6

(shell-command-to-string): Make the buffer current since output goes in current buffer. Use shell-command-switch.
author Richard M. Stallman <rms@gnu.org>
date Tue, 24 Sep 1996 23:54:08 +0000
parents 20690a1ec100
children 87f15c601f5a
line wrap: on
line diff
--- a/lisp/simple.el	Tue Sep 24 22:50:24 1996 +0000
+++ b/lisp/simple.el	Tue Sep 24 23:54:08 1996 +0000
@@ -945,7 +945,9 @@
 (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)))