mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(shell-command): Set default directory for "*Shell
Command Output" buffer.
This commit is contained in:
parent
8585266f55
commit
c2e303c840
1 changed files with 7 additions and 4 deletions
|
|
@ -1331,10 +1331,13 @@ specifies the value of ERROR-BUFFER."
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue