]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-hooks.el
Move comment for last change to right place.
[gnu-emacs] / lisp / vc-hooks.el
index 2ccbdcc56715c8688dd53041d97d4eb190414da3..91cb4c0cd32754b16110ad498126ee6bee41e1b3 100644 (file)
@@ -559,13 +559,16 @@ and does not employ any heuristic at all."
   "Return non-nil if FILE has not changed since the last checkout."
   (let ((checkout-time (vc-file-getprop file 'vc-checkout-time))
         (lastmod (nth 5 (file-attributes file))))
+    ;; This is a shortcut for determining when the workfile is
+    ;; unchanged.  It can fail under some circumstances; see the
+    ;; discussion in bug#694.
     (if (and checkout-time
-             ;; Tramp and Ange-FTP return this when they don't know the time.
-             (not (equal lastmod '(0 0))))
-        (equal checkout-time lastmod)
+            ;; Tramp and Ange-FTP return this when they don't know the time.
+            (not (equal lastmod '(0 0))))
+       (equal checkout-time lastmod)
       (let ((unchanged (vc-call workfile-unchanged-p file)))
-        (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0))
-        unchanged))))
+       (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0))
+       unchanged))))
 
 (defun vc-default-workfile-unchanged-p (backend file)
   "Check if FILE is unchanged by diffing against the master version.
@@ -597,8 +600,6 @@ If FILE is not registered, this function always returns nil."
 ;; Backward compatibility.
 (define-obsolete-function-alias
   'vc-workfile-version 'vc-working-revision "23.1")
-(define-obsolete-function-alias
-  'vc-previous-version 'vc-previous-revision "23.1")
 (defun vc-default-working-revision (backend file)
   (message
    "`working-revision' not found: using the old `workfile-version' instead")
@@ -1071,23 +1072,6 @@ Used in `find-file-not-found-functions'."
 (defun vc-default-extra-menu (backend)
   nil)
 
-;; These are not correct and it's not currently clear how doing it
-;; better (with more complicated expressions) might slow things down
-;; on older systems.
-
-;;(put 'vc-rename-file 'menu-enable 'vc-mode)
-;;(put 'vc-annotate 'menu-enable '(eq (vc-buffer-backend) 'CVS))
-;;(put 'vc-revision-other-window 'menu-enable 'vc-mode)
-;;(put 'vc-diff 'menu-enable 'vc-mode)
-;;(put 'vc-update-change-log 'menu-enable
-;;     '(member (vc-buffer-backend) '(RCS CVS)))
-;;(put 'vc-print-log 'menu-enable 'vc-mode)
-;;(put 'vc-rollback 'menu-enable 'vc-mode)
-;;(put 'vc-revert 'menu-enable 'vc-mode)
-;;(put 'vc-insert-headers 'menu-enable 'vc-mode)
-;;(put 'vc-next-action 'menu-enable 'vc-mode)
-;;(put 'vc-register 'menu-enable '(and buffer-file-name (not vc-mode)))
-
 (provide 'vc-hooks)
 
 ;; arch-tag: 2e5a6fa7-1d30-48e2-8bd0-e3d335f04f32