changeset 86002:613df1ba1584

* vc.el (vc-diff-internal): Make the *vc-diff* buffer read only. * vc-svn.el (vc-svn-print-log, vc-svn-diff): * vc-mcvs.el (vc-mcvs-print-log, vc-mcvs-annotate-command): * vc-cvs.el (vc-cvs-print-log, vc-cvs-diff) (vc-cvs-annotate-command): * vc-arch.el (vc-arch-diff): Remove test to check if start-process is bound, it always is.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 10 Nov 2007 05:22:16 +0000
parents 8845ad7f1ea3
children e33327200372
files lisp/ChangeLog lisp/vc-arch.el lisp/vc-cvs.el lisp/vc-mcvs.el lisp/vc-svn.el lisp/vc.el
diffstat 6 files changed, 24 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Nov 10 01:30:33 2007 +0000
+++ b/lisp/ChangeLog	Sat Nov 10 05:22:16 2007 +0000
@@ -1,3 +1,14 @@
+2007-11-10  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* vc.el (vc-diff-internal): Make the *vc-diff* buffer read only.
+
+	* vc-svn.el (vc-svn-print-log, vc-svn-diff):
+	* vc-mcvs.el (vc-mcvs-print-log, vc-mcvs-annotate-command):
+	* vc-cvs.el (vc-cvs-print-log, vc-cvs-diff)
+	(vc-cvs-annotate-command):
+	* vc-arch.el (vc-arch-diff): Remove test to check if start-process
+	is bound, it always is.
+
 2007-11-10  Jason Rumney  <jasonr@gnu.org>
 
 	* term/w32-win.el (w32-initialize-window-system): Move SJIS font
--- a/lisp/vc-arch.el	Sat Nov 10 01:30:33 2007 +0000
+++ b/lisp/vc-arch.el	Sat Nov 10 05:22:16 2007 +0000
@@ -395,7 +395,7 @@
         (setq newvers nil))
     (if newvers
         (error "Diffing specific revisions not implemented")
-      (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process)))
+      (let* ((async (not vc-disable-async-diff))
              ;; Run the command from the root dir.
              (default-directory (vc-arch-root file))
              (status
--- a/lisp/vc-cvs.el	Sat Nov 10 01:30:33 2007 +0000
+++ b/lisp/vc-cvs.el	Sat Nov 10 05:22:16 2007 +0000
@@ -503,7 +503,7 @@
   "Get change log associated with FILE."
   (vc-cvs-command
    buffer
-   (if (and (vc-stay-local-p files) (fboundp 'start-process)) 'async 0)
+   (if (vc-stay-local-p files) 'async 0)
    files "log"))
 
 (defun vc-cvs-wash-log ()
@@ -514,8 +514,7 @@
 (defun vc-cvs-diff (files &optional oldvers newvers buffer)
   "Get a difference report using CVS between two revisions of FILE."
     (let* ((async (and (not vc-disable-async-diff) 
-		       (vc-stay-local-p files)
-		       (fboundp 'start-process)))
+		       (vc-stay-local-p files)))
 	   (status (apply 'vc-cvs-command (or buffer "*vc-diff*")
 			  (if async 'async 1)
 			  files "diff"
@@ -563,7 +562,7 @@
   "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER.
 Optional arg REVISION is a revision to annotate from."
   (vc-cvs-command buffer
-                  (if (and (vc-stay-local-p file) (fboundp 'start-process))
+                  (if (vc-stay-local-p file)
 		      'async 0)
                   file "annotate"
                   (if revision (concat "-r" revision)))
--- a/lisp/vc-mcvs.el	Sat Nov 10 01:30:33 2007 +0000
+++ b/lisp/vc-mcvs.el	Sat Nov 10 05:22:16 2007 +0000
@@ -443,14 +443,13 @@
     ;; valid relative names.
     (vc-mcvs-command
      buffer
-     (if (and (vc-stay-local-p files) (fboundp 'start-process)) 'async 0)
+     (if (vc-stay-local-p files) 'async 0)
      files "log")))
 
 (defun vc-mcvs-diff (files &optional oldvers newvers buffer)
   "Get a difference report using Meta-CVS between two revisions of FILES."
     (let* ((async (and (not vc-disable-async-diff)
-                       (vc-stay-local-p files)
-                       (fboundp 'start-process)))
+                       (vc-stay-local-p files)))
 	   ;; Run the command from the root dir so that `mcvs filt' returns
 	   ;; valid relative names.
 	   (default-directory (vc-mcvs-root (car files)))
@@ -468,7 +467,7 @@
 Optional arg REVISION is a revision to annotate from."
   (vc-mcvs-command
    buffer
-   (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
+   (if (vc-stay-local-p file) 'async 0)
    file "annotate" (if revision (concat "-r" revision)))
   (with-current-buffer buffer
     (goto-char (point-min))
--- a/lisp/vc-svn.el	Sat Nov 10 01:30:33 2007 +0000
+++ b/lisp/vc-svn.el	Sat Nov 10 05:22:16 2007 +0000
@@ -391,7 +391,7 @@
 		      (vc-delistify (mapcar 'file-relative-name files)) "\n"))
     (vc-svn-command
      buffer
-     (if (and (= (length files) 1) (vc-stay-local-p (car files)) (fboundp 'start-process)) 'async 0)
+     (if (and (= (length files) 1) (vc-stay-local-p (car files))) 'async 0)
      files "log"
      ;; By default Subversion only shows the log upto the working revision,
      ;; whereas we also want the log of the subsequent commits.  At least
@@ -422,8 +422,7 @@
 	      (list "-x" (mapconcat 'identity (vc-switches nil 'diff) " "))))
 	   (async (and (not vc-disable-async-diff)
                        (vc-stay-local-p files)
-		       (or oldvers newvers) ; Svn diffs those locally.
-		       (fboundp 'start-process))))
+		       (or oldvers newvers)))) ; Svn diffs those locally.
       (apply 'vc-svn-command buffer
 	     (if async 'async 0)
 	     files "diff"
--- a/lisp/vc.el	Sat Nov 10 01:30:33 2007 +0000
+++ b/lisp/vc.el	Sat Nov 10 05:22:16 2007 +0000
@@ -1931,6 +1931,10 @@
           nil)
       (pop-to-buffer (current-buffer))
       (diff-mode)
+      ;; Make the *vc-diff* buffer read only, the diff-mode key
+      ;; bindings are nicer for read only buffers. pcl-cvs does the
+      ;; same thing.
+      (setq buffer-read-only t)
       (vc-exec-after `(vc-diff-sentinel ,verbose ,rev1-name ,rev2-name))
       ;; In the async case, we return t even if there are no differences
       ;; because we don't know that yet.