[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog vc-dispatcher.el
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog vc-dispatcher.el |
Date: |
Sun, 20 Sep 2009 19:55:39 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 09/09/20 19:55:39
Modified files:
lisp : ChangeLog vc-dispatcher.el
Log message:
(vc-do-command): Return the process object in
the asynchronous case. Use when instead of if. Do not run
vc-exec-after to display a message if not enabled.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16222&r2=1.16223
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/vc-dispatcher.el?cvsroot=emacs&r1=1.69&r2=1.70
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16222
retrieving revision 1.16223
diff -u -b -r1.16222 -r1.16223
--- ChangeLog 20 Sep 2009 19:51:35 -0000 1.16222
+++ ChangeLog 20 Sep 2009 19:55:36 -0000 1.16223
@@ -1,5 +1,9 @@
2009-09-20 Dan Nicolaescu <address@hidden>
+ * vc-dispatcher.el (vc-do-command): Return the process object in
+ the asynchronous case. Use when instead of if. Do not run
+ vc-exec-after to display a message if not enabled.
+
* vc-git.el (vc-git-dir-extra-headers): Add keymap and mouse-face
properties to the stash strings.
(vc-git-stash-list): Return a list of strings.
Index: vc-dispatcher.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-dispatcher.el,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- vc-dispatcher.el 7 Aug 2009 08:24:32 -0000 1.69
+++ vc-dispatcher.el 20 Sep 2009 19:55:39 -0000 1.70
@@ -87,7 +87,7 @@
;;
;; The main interface to the lower level is vc-do-command. This launches a
;; command, synchronously or asynchronously, making the output available
-;; in a command log buffer. Two other functions, (vc-start-annotation) and
+;; in a command log buffer. Two other functions, (vc-start-logentry) and
;; (vc-finish-logentry), allow you to associate a command closure with an
;; annotation buffer so that when the user confirms the comment the closure
;; is run (with the comment as part of its context).
@@ -280,7 +280,9 @@
FILE-OR-LIST is the name of a working file; it may be a list of
files or be nil (to execute commands that don't expect a file
name or set of files). If an optional list of FLAGS is present,
-that is inserted into the command line before the filename."
+that is inserted into the command line before the filename.
+Return the return value of the slave command in the synchronous
+case, and the process object in the asynchronous case."
;; FIXME: file-relative-name can return a bogus result because
;; it doesn't look at the actual file-system to see if symlinks
;; come into play.
@@ -310,7 +312,7 @@
;; something, we'd have used vc-eval-after.
;; Use `delete-process' rather than `kill-process' because we don't
;; want any of its output to appear from now on.
- (if oldproc (delete-process oldproc)))
+ (when oldproc (delete-process oldproc)))
(let ((squeezed (remq nil flags))
(inhibit-read-only t)
(status 0))
@@ -330,13 +332,14 @@
(let ((process-connection-type nil))
(apply 'start-file-process command (current-buffer)
command squeezed))))
- (if vc-command-messages
+ (when vc-command-messages
(message "Running %s in background..." full-command))
;;(set-process-sentinel proc (lambda (p msg) (delete-process
p)))
(set-process-filter proc 'vc-process-filter)
+ (setq status proc)
+ (when vc-command-messages
(vc-exec-after
- `(if vc-command-messages
- (message "Running %s in background... done"
',full-command))))
+ `(message "Running %s in background... done"
',full-command))))
;; Run synchronously
(when vc-command-messages
(message "Running %s in foreground..." full-command))
@@ -350,11 +353,9 @@
(goto-char (point-min))
(shrink-window-if-larger-than-buffer))
(error "Running %s...FAILED (%s)" full-command
- (if (integerp status) (format "status %d" status)
status))))
- ;; We're done. But don't emit a status message if running
- ;; asynchronously, it would just mislead.
- (if (and vc-command-messages (not (eq okstatus 'async)))
- (message "Running %s...OK = %d" full-command status)))
+ (if (integerp status) (format "status %d" status) status)))
+ (when vc-command-messages
+ (message "Running %s...OK = %d" full-command status))))
(vc-exec-after
`(run-hook-with-args 'vc-post-command-functions
',command ',file-or-list ',flags))
- [Emacs-diffs] emacs/lisp ChangeLog vc-dispatcher.el,
Dan Nicolaescu <=