emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 2532d74: Renove duplicate code.


From: Eric S. Raymond
Subject: [Emacs-diffs] master 2532d74: Renove duplicate code.
Date: Mon, 01 Dec 2014 12:39:29 +0000

branch: master
commit 2532d74a5fb5168955aa900f597bf7efc14efb12
Author: Eric S. Raymond <address@hidden>
Commit: Eric S. Raymond <address@hidden>

    Renove duplicate code.
---
 lisp/vc/vc-filewise.el |   34 ----------------------------------
 1 files changed, 0 insertions(+), 34 deletions(-)

diff --git a/lisp/vc/vc-filewise.el b/lisp/vc/vc-filewise.el
index da8abc5..75ac256 100644
--- a/lisp/vc/vc-filewise.el
+++ b/lisp/vc/vc-filewise.el
@@ -81,38 +81,4 @@ If the file is not registered, or the master name is not 
known, return nil."
          (vc-file-setprop file 'vc-name result)
        nil))))                         ; Not registered
 
-(defun vc-check-master-templates (file templates)
-  "Return non-nil if there is a master corresponding to FILE.
-
-TEMPLATES is a list of strings or functions.  If an element is a
-string, it must be a control string as required by `format', with two
-string placeholders, such as \"%sRCS/%s,v\".  The directory part of
-FILE is substituted for the first placeholder, the basename of FILE
-for the second.  If a file with the resulting name exists, it is taken
-as the master of FILE, and returned.
-
-If an element of TEMPLATES is a function, it is called with the
-directory part and the basename of FILE as arguments.  It should
-return non-nil if it finds a master; that value is then returned by
-this function."
-  (let ((dirname (or (file-name-directory file) ""))
-        (basename (file-name-nondirectory file)))
-    (catch 'found
-      (mapcar
-       (lambda (s)
-        (let ((trial (vc-possible-master s dirname basename)))
-          (when (and trial (file-exists-p trial)
-                     ;; Make sure the file we found with name
-                     ;; TRIAL is not the source file itself.
-                     ;; That can happen with RCS-style names if
-                     ;; the file name is truncated (e.g. to 14
-                     ;; chars).  See if either directory or
-                     ;; attributes differ.
-                     (or (not (string= dirname
-                                       (file-name-directory trial)))
-                         (not (equal (file-attributes file)
-                                     (file-attributes trial)))))
-              (throw 'found trial))))
-       templates))))
-
 (provide 'vc-filewise)



reply via email to

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