summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2009-10-03 18:29:22 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2009-10-03 18:29:22 +0000
commited6b01957ea6cc8a51a38e6094c202219b23e86d (patch)
treeeaff0cc4dd328fff05673b94c6f15bbf47c38cad
parentdbf64827d966c28fa93bf2c75a88d7f163a3d9b3 (diff)
downloademacs-ed6b01957ea6cc8a51a38e6094c202219b23e86d.tar.gz
Remove commented out code.
(vc-derived-from-dir-mode): Remove, unused. (vc-version-diff, vc-diff): Consistently pass t to vc-deduce-fileset.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc.el34
2 files changed, 8 insertions, 32 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab312990347..424d9860ac7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-03 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * vc.el: Remove commented out code.
+ (vc-derived-from-dir-mode): Remove, unused.
+ (vc-version-diff, vc-diff): Consistently pass t to vc-deduce-fileset.
+
2009-10-03 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-ftp.el (tramp-ftp-file-name-handler): Disable
diff --git a/lisp/vc.el b/lisp/vc.el
index 8dfe34a4cb1..456b85977a1 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -861,32 +861,8 @@ Within directories, only files already under version control are noticed."
(unless (file-directory-p node) (push node flattened)))
(nreverse flattened)))
-(defun vc-derived-from-dir-mode (&optional buffer)
- "Are we in a VC-directory buffer, or do we have one as an ancestor?"
- (let ((buffer (or buffer (current-buffer))))
- (cond ((derived-mode-p 'vc-dir-mode) t)
- (vc-parent-buffer (vc-derived-from-dir-mode vc-parent-buffer))
- (t nil))))
-
(defvar vc-dir-backend)
-;; FIXME: this is not functional, commented out.
-;; (defun vc-deduce-fileset (&optional observer)
-;; "Deduce a set of files and a backend to which to apply an operation and
-;; the common state of the fileset. Return (BACKEND . FILESET)."
-;; (let* ((selection (vc-dispatcher-selection-set observer))
-;; (raw (car selection)) ;; Selection as user made it
-;; (cooked (cdr selection)) ;; Files only
-;; ;; FIXME: Store the backend in a buffer-local variable.
-;; (backend (if (vc-derived-from-dir-mode (current-buffer))
-;; ;; FIXME: this should use vc-dir-backend from
-;; ;; the *vc-dir* buffer.
-;; (vc-responsible-backend default-directory)
-;; (assert (and (= 1 (length raw))
-;; (not (file-directory-p (car raw)))))
-;; (vc-backend (car cooked)))))
-;; (cons backend selection)))
-
(declare-function vc-dir-current-file "vc-dir" ())
(declare-function vc-dir-deduce-fileset "vc-dir" (&optional state-model-only-files))
@@ -1577,15 +1553,9 @@ returns t if the buffer had changes, nil otherwise."
(error "Not a valid revision range"))
;; Yes, it's painful to call (vc-deduce-fileset) again. Alas, the
;; placement rules for (interactive) don't actually leave us a choice.
- (vc-diff-internal t (vc-deduce-fileset) rev1 rev2
+ (vc-diff-internal t (vc-deduce-fileset t) rev1 rev2
(called-interactively-p 'interactive)))
-;; (defun vc-contains-version-controlled-file (dir)
-;; "Return t if DIR contains a version-controlled file, nil otherwise."
-;; (catch 'found
-;; (mapc (lambda (f) (and (not (file-directory-p f)) (vc-backend f) (throw 'found 't))) (directory-files dir))
-;; nil))
-
;;;###autoload
(defun vc-diff (historic &optional not-urgent)
"Display diffs between file revisions.
@@ -1599,7 +1569,7 @@ saving the buffer."
(if historic
(call-interactively 'vc-version-diff)
(when buffer-file-name (vc-buffer-sync not-urgent))
- (vc-diff-internal t (vc-deduce-fileset) nil nil
+ (vc-diff-internal t (vc-deduce-fileset t) nil nil
(called-interactively-p 'interactive))))
;;;###autoload