diff options
| author | Richard M. Stallman | 1996-09-24 20:04:48 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-24 20:04:48 +0000 |
| commit | d589bd993b06f16d59150d97f852ab2a80ce4fe6 (patch) | |
| tree | e3d217ade6d1bf51329acaa62ae17788b491f18a | |
| parent | 5db7925ddc8fdbcad65de99d16cd622b2e9ee026 (diff) | |
| download | emacs-d589bd993b06f16d59150d97f852ab2a80ce4fe6.tar.gz emacs-d589bd993b06f16d59150d97f852ab2a80ce4fe6.zip | |
(shell-command-to-string): New function.
| -rw-r--r-- | lisp/simple.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 6a838e691e1..718b0b8ef3f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -941,6 +941,11 @@ In either case, the output is inserted after point (leaving mark after it)." | |||
| 941 | (set-buffer buffer) | 941 | (set-buffer buffer) |
| 942 | (goto-char (point-min))) | 942 | (goto-char (point-min))) |
| 943 | (display-buffer buffer)))))))) | 943 | (display-buffer buffer)))))))) |
| 944 | |||
| 945 | (defun shell-command-to-string (command) | ||
| 946 | "Execute shell command COMMAND and return its output as a string." | ||
| 947 | (with-output-to-string | ||
| 948 | (call-process shell-file-name nil t nil "-c" command))) | ||
| 944 | 949 | ||
| 945 | (defconst universal-argument-map | 950 | (defconst universal-argument-map |
| 946 | (let ((map (make-sparse-keymap))) | 951 | (let ((map (make-sparse-keymap))) |