Mercurial > emacs
changeset 28703:8cc58b0b674d
(shell-command): Set default directory for "*Shell
Command Output" buffer.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 25 Apr 2000 19:14:45 +0000 |
parents | 8ed2572aa67c |
children | 351e38e6b866 |
files | lisp/simple.el |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Tue Apr 25 19:12:56 2000 +0000 +++ b/lisp/simple.el Tue Apr 25 19:14:45 2000 +0000 @@ -1331,10 +1331,13 @@ command))) ;; Clear the output buffer, then run the command with ;; output there. - (save-excursion - (set-buffer buffer) - (setq buffer-read-only nil) - (erase-buffer)) + (let ((directory default-directory)) + (save-excursion + (set-buffer buffer) + (setq buffer-read-only nil) + (if (not output-buffer) + (setq default-directory directory)) + (erase-buffer))) (setq exit-status (call-process-region start end shell-file-name nil (if error-file