emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Symbol's value as variable is void" on vc-diff


From: Juanma Barranquero
Subject: Re: "Symbol's value as variable is void" on vc-diff
Date: Tue, 20 Apr 2004 11:08:02 +0200

On Mon, 19 Apr 2004 19:53:19 -0400
Andre Spiegel <address@hidden> wrote:

> Sorry, the problem should be fixed by
> the patch below.

Yeah, it works. Thanks.

BTW, shouldn't something like the patch below be installed to vc-svn.el?

                                                                Juanma



--- vc-svn.el.orig      2004-04-16 15:38:21.000000000 +0200
+++ vc-svn.el   2004-04-20 11:00:58.000000000 +0200
@@ -335,8 +335,8 @@
 ;;;
 
-(defun vc-svn-print-log (file)
+(defun vc-svn-print-log (file &optional buffer)
   "Get change log associated with FILE."
   (save-current-buffer
-    (vc-setup-buffer nil)
+    (vc-setup-buffer buffer)
     (let ((inhibit-read-only t))
       (goto-char (point-min))
@@ -344,10 +344,11 @@
       (insert "Working file: " (file-relative-name file) "\n"))
     (vc-svn-command
-     t
+     buffer
      (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
      file "log")))
 
-(defun vc-svn-diff (file &optional oldvers newvers)
+(defun vc-svn-diff (file &optional oldvers newvers buffer)
   "Get a difference report using SVN between two versions of FILE."
+  (unless buffer (setq buffer "*vc-diff*"))
   (if (string= (vc-workfile-version file) "0")
       ;; This file is added but not yet committed; there is no master file.
@@ -357,5 +358,5 @@
        ;; Diff it against /dev/null.
        ;; Note: this is NOT a "svn diff".
-       (apply 'vc-do-command "*vc-diff*"
+       (apply 'vc-do-command buffer
               1 "diff" file
               (append (vc-switches nil 'diff) '("/dev/null")))
@@ -366,5 +367,5 @@
                       (or oldvers newvers) ; Svn diffs those locally.
                       (fboundp 'start-process))))
-      (apply 'vc-svn-command "*vc-diff*"
+      (apply 'vc-svn-command buffer
             (if async 'async 0)
             file "diff"
@@ -378,5 +379,5 @@
        ;; For some reason `svn diff' does not return a useful
        ;; status w.r.t whether the diff was empty or not.
-       (buffer-size (get-buffer "*vc-diff*"))))))
+       (buffer-size (get-buffer buffer))))))
 
 (defun vc-svn-diff-tree (dir &optional rev1 rev2)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]