Mercurial > emacs
comparison lisp/simple.el @ 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 | f78d389c773c |
children | 0c70e1541a95 |
comparison
equal
deleted
inserted
replaced
28702:8ed2572aa67c | 28703:8cc58b0b674d |
---|---|
1329 t) | 1329 t) |
1330 nil shell-command-switch | 1330 nil shell-command-switch |
1331 command))) | 1331 command))) |
1332 ;; Clear the output buffer, then run the command with | 1332 ;; Clear the output buffer, then run the command with |
1333 ;; output there. | 1333 ;; output there. |
1334 (save-excursion | 1334 (let ((directory default-directory)) |
1335 (set-buffer buffer) | 1335 (save-excursion |
1336 (setq buffer-read-only nil) | 1336 (set-buffer buffer) |
1337 (erase-buffer)) | 1337 (setq buffer-read-only nil) |
1338 (if (not output-buffer) | |
1339 (setq default-directory directory)) | |
1340 (erase-buffer))) | |
1338 (setq exit-status | 1341 (setq exit-status |
1339 (call-process-region start end shell-file-name nil | 1342 (call-process-region start end shell-file-name nil |
1340 (if error-file | 1343 (if error-file |
1341 (list buffer error-file) | 1344 (list buffer error-file) |
1342 buffer) | 1345 buffer) |