]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-process-filter): Inhibit undo
authorThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 5 Jun 2006 15:46:00 +0000 (15:46 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 5 Jun 2006 15:46:00 +0000 (15:46 +0000)
info collection around call to insert.
(vc-setup-buffer): Likewise for call to erase-buffer.
(vc-do-command): Likewise for call to process-file.

lisp/ChangeLog
lisp/vc.el

index d6efd8f852625aa2ad4d46db206dd5788246e8cb..7cf001f119623f51768fe7e55cc14979730a01a0 100644 (file)
@@ -1,3 +1,10 @@
+2006-06-05  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       * vc.el (vc-process-filter): Inhibit undo
+       info collection around call to insert.
+       (vc-setup-buffer): Likewise for call to erase-buffer.
+       (vc-do-command): Likewise for call to process-file.
+
 2006-06-05  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gud.el (gud-menu-map): Use a conditional help echo
index 61b8aa05a4ba16e759010bc6c7b51b9486f9bb0d..54237800e3ce70f5506d9882d943143163f70db2 100644 (file)
@@ -894,10 +894,12 @@ However, before executing BODY, find FILE, and after BODY, save buffer."
 
 (defun vc-process-filter (p s)
   "An alternative output filter for async process P.
-The only difference with the default filter is to insert S after markers."
+One difference with the default filter is that this inserts S after markers.
+Another is that undo information is not kept."
   (with-current-buffer (process-buffer p)
     (save-excursion
-      (let ((inhibit-read-only t))
+      (let ((buffer-undo-list t)
+            (inhibit-read-only t))
        (goto-char (process-mark p))
        (insert s)
        (set-marker (process-mark p) (point))))))
@@ -914,7 +916,8 @@ BUF defaults to \"*vc*\", can be a string and will be created if necessary."
     (set (make-local-variable 'vc-parent-buffer-name)
         (concat " from " (buffer-name camefrom)))
     (setq default-directory olddir)
-    (let ((inhibit-read-only t))
+    (let ((buffer-undo-list t)
+          (inhibit-read-only t))
       (erase-buffer))))
 
 (defun vc-exec-after (code)
@@ -1003,7 +1006,8 @@ that is inserted into the command line before the filename."
              (vc-exec-after
               `(unless (active-minibuffer-window)
                   (message "Running %s in the background... done" ',command))))
-         (setq status (apply 'process-file command nil t nil squeezed))
+         (let ((buffer-undo-list t))
+            (setq status (apply 'process-file command nil t nil squeezed)))
          (when (and (not (eq t okstatus))
                      (or (not (integerp status))
                          (and okstatus (< okstatus status))))