# HG changeset patch # User Gerd Moellmann # Date 956690085 0 # Node ID 8cc58b0b674d31c88f6efad1f40cde33dad50343 # Parent 8ed2572aa67c92ba10d3711d2907182643ddf594 (shell-command): Set default directory for "*Shell Command Output" buffer. diff -r 8ed2572aa67c -r 8cc58b0b674d lisp/simple.el --- 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