diff options
| author | Richard M. Stallman | 1995-03-21 05:14:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-03-21 05:14:38 +0000 |
| commit | d382f61045e7fdd00dea62e50e2cdfa7df03d869 (patch) | |
| tree | d5cc4268303d722d65aa0f5bc0d2cc48f29fdcc9 | |
| parent | 806cba9c00030e0d9b955de1617238f91f8182ba (diff) | |
| download | emacs-d382f61045e7fdd00dea62e50e2cdfa7df03d869.tar.gz emacs-d382f61045e7fdd00dea62e50e2cdfa7df03d869.zip | |
(shell-command): Use *Async Shell Command* for
asynchronous commands. Doc fix.
| -rw-r--r-- | lisp/simple.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 418cba339bf..922912bd3e3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -712,8 +712,17 @@ then call `undo-more' one or more times to undo them." | |||
| 712 | 712 | ||
| 713 | (defun shell-command (command &optional output-buffer) | 713 | (defun shell-command (command &optional output-buffer) |
| 714 | "Execute string COMMAND in inferior shell; display output, if any. | 714 | "Execute string COMMAND in inferior shell; display output, if any. |
| 715 | |||
| 715 | If COMMAND ends in ampersand, execute it asynchronously. | 716 | If COMMAND ends in ampersand, execute it asynchronously. |
| 716 | The output appears in the buffer `*Shell Command*'. | 717 | The output appears in the buffer `*Async Shell Command*'. |
| 718 | |||
| 719 | Otherwise, COMMAND is executed synchronously. The output appears | ||
| 720 | in the buffer `*Shell Command Output*'. | ||
| 721 | If the output is one line, it is displayed in the echo area *as well*, | ||
| 722 | but it is nonetheless available in buffer `*Shell Command Output*', | ||
| 723 | even though that buffer is not automatically displayed. | ||
| 724 | If there is no output, or if output is inserted in the current buffer, | ||
| 725 | then `*Shell Command Output*' is deleted. | ||
| 717 | 726 | ||
| 718 | The optional second argument OUTPUT-BUFFER, if non-nil, | 727 | The optional second argument OUTPUT-BUFFER, if non-nil, |
| 719 | says to put the output in some other buffer. | 728 | says to put the output in some other buffer. |
| @@ -747,7 +756,7 @@ In either case, the output is inserted after point (leaving mark after it)." | |||
| 747 | (if (string-match "[ \t]*&[ \t]*$" command) | 756 | (if (string-match "[ \t]*&[ \t]*$" command) |
| 748 | ;; Command ending with ampersand means asynchronous. | 757 | ;; Command ending with ampersand means asynchronous. |
| 749 | (let ((buffer (get-buffer-create | 758 | (let ((buffer (get-buffer-create |
| 750 | (or output-buffer "*Shell-Command*"))) | 759 | (or output-buffer "*Asynch Shell Command*"))) |
| 751 | (directory default-directory) | 760 | (directory default-directory) |
| 752 | proc) | 761 | proc) |
| 753 | ;; Remove the ampersand. | 762 | ;; Remove the ampersand. |