Mercurial > emacs
comparison lisp/vc-dispatcher.el @ 94847:5e64dca662f0
Remove assumption about what nil means as a first arument to vc-do-command.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Sat, 10 May 2008 13:27:16 +0000 |
parents | 1aa1de92b8a1 |
children | 4c35f4ccba9e |
comparison
equal
deleted
inserted
replaced
94846:1a6e4ea4e517 | 94847:5e64dca662f0 |
---|---|
284 (if (not filelist) "." (mapconcat 'identity filelist " "))) | 284 (if (not filelist) "." (mapconcat 'identity filelist " "))) |
285 | 285 |
286 ;;;###autoload | 286 ;;;###autoload |
287 (defun vc-do-command (buffer okstatus command file-or-list &rest flags) | 287 (defun vc-do-command (buffer okstatus command file-or-list &rest flags) |
288 "Execute a slave command, notifying user and checking for errors. | 288 "Execute a slave command, notifying user and checking for errors. |
289 Output from COMMAND goes to BUFFER, or *vc* if BUFFER is nil or the | 289 Output from COMMAND goes to BUFFER, or the current buffer if |
290 current buffer if BUFFER is t. If the destination buffer is not | 290 BUFFER is t. If the destination buffer is not already current, |
291 already current, set it up properly and erase it. The command is | 291 set it up properly and erase it. The command is considered |
292 considered successful if its exit status does not exceed OKSTATUS (if | 292 successful if its exit status does not exceed OKSTATUS (if |
293 OKSTATUS is nil, that means to ignore error status, if it is `async', that | 293 OKSTATUS is nil, that means to ignore error status, if it is |
294 means not to wait for termination of the subprocess; if it is t it means to | 294 `async', that means not to wait for termination of the |
295 ignore all execution errors). FILE-OR-LIST is the name of a working file; | 295 subprocess; if it is t it means to ignore all execution errors). |
296 it may be a list of files or be nil (to execute commands that don't expect | 296 FILE-OR-LIST is the name of a working file; it may be a list of |
297 a file name or set of files). If an optional list of FLAGS is present, | 297 files or be nil (to execute commands that don't expect a file |
298 name or set of files). If an optional list of FLAGS is present, | |
298 that is inserted into the command line before the filename." | 299 that is inserted into the command line before the filename." |
299 ;; FIXME: file-relative-name can return a bogus result because | 300 ;; FIXME: file-relative-name can return a bogus result because |
300 ;; it doesn't look at the actual file-system to see if symlinks | 301 ;; it doesn't look at the actual file-system to see if symlinks |
301 ;; come into play. | 302 ;; come into play. |
302 (let* ((files | 303 (let* ((files |
316 (save-current-buffer | 317 (save-current-buffer |
317 (unless (or (eq buffer t) | 318 (unless (or (eq buffer t) |
318 (and (stringp buffer) | 319 (and (stringp buffer) |
319 (string= (buffer-name) buffer)) | 320 (string= (buffer-name) buffer)) |
320 (eq buffer (current-buffer))) | 321 (eq buffer (current-buffer))) |
321 (vc-setup-buffer (or buffer "*vc*"))) | 322 (vc-setup-buffer buffer)) |
322 ;; If there's some previous async process still running, just kill it. | 323 ;; If there's some previous async process still running, just kill it. |
323 (let ((oldproc (get-buffer-process (current-buffer)))) | 324 (let ((oldproc (get-buffer-process (current-buffer)))) |
324 ;; If we wanted to wait for oldproc to finish before doing | 325 ;; If we wanted to wait for oldproc to finish before doing |
325 ;; something, we'd have used vc-eval-after. | 326 ;; something, we'd have used vc-eval-after. |
326 ;; Use `delete-process' rather than `kill-process' because we don't | 327 ;; Use `delete-process' rather than `kill-process' because we don't |