aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2009-10-03 18:29:22 +0000
committerDan Nicolaescu2009-10-03 18:29:22 +0000
commited6b01957ea6cc8a51a38e6094c202219b23e86d (patch)
treeeaff0cc4dd328fff05673b94c6f15bbf47c38cad
parentdbf64827d966c28fa93bf2c75a88d7f163a3d9b3 (diff)
downloademacs-ed6b01957ea6cc8a51a38e6094c202219b23e86d.tar.gz
emacs-ed6b01957ea6cc8a51a38e6094c202219b23e86d.zip
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 @@
12009-10-03 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc.el: Remove commented out code.
4 (vc-derived-from-dir-mode): Remove, unused.
5 (vc-version-diff, vc-diff): Consistently pass t to vc-deduce-fileset.
6
12009-10-03 Michael Albinus <michael.albinus@gmx.de> 72009-10-03 Michael Albinus <michael.albinus@gmx.de>
2 8
3 * net/tramp-ftp.el (tramp-ftp-file-name-handler): Disable 9 * 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."
861 (unless (file-directory-p node) (push node flattened))) 861 (unless (file-directory-p node) (push node flattened)))
862 (nreverse flattened))) 862 (nreverse flattened)))
863 863
864(defun vc-derived-from-dir-mode (&optional buffer)
865 "Are we in a VC-directory buffer, or do we have one as an ancestor?"
866 (let ((buffer (or buffer (current-buffer))))
867 (cond ((derived-mode-p 'vc-dir-mode) t)
868 (vc-parent-buffer (vc-derived-from-dir-mode vc-parent-buffer))
869 (t nil))))
870
871(defvar vc-dir-backend) 864(defvar vc-dir-backend)
872 865
873;; FIXME: this is not functional, commented out.
874;; (defun vc-deduce-fileset (&optional observer)
875;; "Deduce a set of files and a backend to which to apply an operation and
876;; the common state of the fileset. Return (BACKEND . FILESET)."
877;; (let* ((selection (vc-dispatcher-selection-set observer))
878;; (raw (car selection)) ;; Selection as user made it
879;; (cooked (cdr selection)) ;; Files only
880;; ;; FIXME: Store the backend in a buffer-local variable.
881;; (backend (if (vc-derived-from-dir-mode (current-buffer))
882;; ;; FIXME: this should use vc-dir-backend from
883;; ;; the *vc-dir* buffer.
884;; (vc-responsible-backend default-directory)
885;; (assert (and (= 1 (length raw))
886;; (not (file-directory-p (car raw)))))
887;; (vc-backend (car cooked)))))
888;; (cons backend selection)))
889
890(declare-function vc-dir-current-file "vc-dir" ()) 866(declare-function vc-dir-current-file "vc-dir" ())
891(declare-function vc-dir-deduce-fileset "vc-dir" (&optional state-model-only-files)) 867(declare-function vc-dir-deduce-fileset "vc-dir" (&optional state-model-only-files))
892 868
@@ -1577,15 +1553,9 @@ returns t if the buffer had changes, nil otherwise."
1577 (error "Not a valid revision range")) 1553 (error "Not a valid revision range"))
1578 ;; Yes, it's painful to call (vc-deduce-fileset) again. Alas, the 1554 ;; Yes, it's painful to call (vc-deduce-fileset) again. Alas, the
1579 ;; placement rules for (interactive) don't actually leave us a choice. 1555 ;; placement rules for (interactive) don't actually leave us a choice.
1580 (vc-diff-internal t (vc-deduce-fileset) rev1 rev2 1556 (vc-diff-internal t (vc-deduce-fileset t) rev1 rev2
1581 (called-interactively-p 'interactive))) 1557 (called-interactively-p 'interactive)))
1582 1558
1583;; (defun vc-contains-version-controlled-file (dir)
1584;; "Return t if DIR contains a version-controlled file, nil otherwise."
1585;; (catch 'found
1586;; (mapc (lambda (f) (and (not (file-directory-p f)) (vc-backend f) (throw 'found 't))) (directory-files dir))
1587;; nil))
1588
1589;;;###autoload 1559;;;###autoload
1590(defun vc-diff (historic &optional not-urgent) 1560(defun vc-diff (historic &optional not-urgent)
1591 "Display diffs between file revisions. 1561 "Display diffs between file revisions.
@@ -1599,7 +1569,7 @@ saving the buffer."
1599 (if historic 1569 (if historic
1600 (call-interactively 'vc-version-diff) 1570 (call-interactively 'vc-version-diff)
1601 (when buffer-file-name (vc-buffer-sync not-urgent)) 1571 (when buffer-file-name (vc-buffer-sync not-urgent))
1602 (vc-diff-internal t (vc-deduce-fileset) nil nil 1572 (vc-diff-internal t (vc-deduce-fileset t) nil nil
1603 (called-interactively-p 'interactive)))) 1573 (called-interactively-p 'interactive))))
1604 1574
1605;;;###autoload 1575;;;###autoload