Mercurial > emacs
changeset 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 | cca1c6324cab |
children | 763b3b143ed6 |
files | lisp/simple.el |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
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)))