diff options
| author | Richard M. Stallman | 1996-09-24 23:54:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-24 23:54:08 +0000 |
| commit | 17cc9013459720019db83ff864fedd60018695b1 (patch) | |
| tree | ba6df2263420d95a5cdd137502893afe17890280 | |
| parent | 79e098ca054f9501ea762bd27cde5ef1001301de (diff) | |
| download | emacs-17cc9013459720019db83ff864fedd60018695b1.tar.gz emacs-17cc9013459720019db83ff864fedd60018695b1.zip | |
(shell-command-to-string): Make the buffer current
since output goes in current buffer. Use shell-command-switch.
| -rw-r--r-- | lisp/simple.el | 4 |
1 files changed, 3 insertions, 1 deletions
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)." | |||
| 945 | (defun shell-command-to-string (command) | 945 | (defun shell-command-to-string (command) |
| 946 | "Execute shell command COMMAND and return its output as a string." | 946 | "Execute shell command COMMAND and return its output as a string." |
| 947 | (with-output-to-string | 947 | (with-output-to-string |
| 948 | (call-process shell-file-name nil t nil "-c" command))) | 948 | (with-current-buffer |
| 949 | standard-output | ||
| 950 | (call-process shell-file-name nil t nil shell-command-switch command)))) | ||
| 949 | 951 | ||
| 950 | (defconst universal-argument-map | 952 | (defconst universal-argument-map |
| 951 | (let ((map (make-sparse-keymap))) | 953 | (let ((map (make-sparse-keymap))) |