emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v
Date: Fri, 09 May 2008 16:41:28 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/05/09 16:41:27

Index: vc-hooks.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -b -r1.252 -r1.253
--- vc-hooks.el 8 May 2008 05:40:55 -0000       1.252
+++ vc-hooks.el 9 May 2008 16:41:26 -0000       1.253
@@ -539,9 +539,12 @@
   ;; - `removed'
   ;; - `copied' and `moved' (might be handled by `removed' and `added')
   (or (vc-file-getprop file 'vc-state)
-      (when (and (> (length file) 0) (vc-backend file))
-       (vc-file-setprop file 'vc-state
-                        (vc-call state-heuristic file)))))
+      (when (> (length file) 0)
+        (let ((backend (vc-backend file)))
+          (when backend
+            (vc-file-setprop
+             file 'vc-state
+             (vc-call-backend backend 'state-heuristic file)))))))
 
 (defun vc-recompute-state (file)
   "Recompute the version control state of FILE, and return it.
@@ -577,26 +580,26 @@
   (zerop (condition-case err
              ;; If the implementation supports it, let the output
              ;; go to *vc*, not *vc-diff*, since this is an internal call.
-             (vc-call diff (list file) nil nil "*vc*")
+             (vc-call-backend backend 'diff (list file) nil nil "*vc*")
            (wrong-number-of-arguments
             ;; If this error came from the above call to vc-BACKEND-diff,
             ;; try again without the optional buffer argument (for
             ;; backward compatibility).  Otherwise, resignal.
             (if (or (not (eq (cadr err)
                              (indirect-function
-                              (vc-find-backend-function (vc-backend file)
-                                                        'diff))))
+                              (vc-find-backend-function backend 'diff))))
                     (not (eq (caddr err) 4)))
                 (signal (car err) (cdr err))
-              (vc-call diff (list file)))))))
+              (vc-call-backend backend 'diff (list file)))))))
 
 (defun vc-working-revision (file)
   "Return the repository version from which FILE was checked out.
 If FILE is not registered, this function always returns nil."
   (or (vc-file-getprop file 'vc-working-revision)
-      (when (vc-backend file)
+      (let ((backend (vc-backend file)))
+        (when backend
        (vc-file-setprop file 'vc-working-revision
-                        (vc-call working-revision file)))))
+                           (vc-call-backend backend 'working-revision 
file))))))
 
 ;; Backward compatibility.
 (define-obsolete-function-alias
@@ -746,7 +749,7 @@
       (and (setq backend (vc-backend file))
            (vc-up-to-date-p file)
            (eq (vc-checkout-model backend (list file)) 'implicit)
-           (vc-call make-version-backups-p file)
+           (vc-call-backend backend 'make-version-backups-p file)
            (vc-make-version-backup file)))))
 
 (declare-function vc-directory-resynch-file "vc" (file))
@@ -798,7 +801,7 @@
   (let ((backend (vc-backend file)))
     (if (not backend)
        (setq vc-mode nil)
-      (let* ((ml-string (vc-call mode-line-string file))
+      (let* ((ml-string (vc-call-backend backend 'mode-line-string file))
              (ml-echo (get-text-property 0 'help-echo ml-string)))
         (setq vc-mode
               (concat




reply via email to

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