emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master c71162e 1/3: Remove old duplicate commented code


From: Reuben Thomas
Subject: [Emacs-diffs] master c71162e 1/3: Remove old duplicate commented code
Date: Wed, 23 Aug 2017 18:55:21 -0400 (EDT)

branch: master
commit c71162e0f186a8e50a48629410e17e873ef55938
Author: Reuben Thomas <address@hidden>
Commit: Reuben Thomas <address@hidden>

    Remove old duplicate commented code
    
    * lisp/files.el (file-relative-name): Remove old commented version,
    replaced 14 years ago in commit 753ad9889.
---
 lisp/files.el | 40 ----------------------------------------
 1 file changed, 40 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index bc347c1..be51c20 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4733,46 +4733,6 @@ Uses `backup-directory-alist' in the same way as
   "Return number of names file FILENAME has."
   (car (cdr (file-attributes filename))))
 
-;; (defun file-relative-name (filename &optional directory)
-;;   "Convert FILENAME to be relative to DIRECTORY (default: 
`default-directory').
-;; This function returns a relative file name which is equivalent to FILENAME
-;; when used with that default directory as the default.
-;; If this is impossible (which can happen on MSDOS and Windows
-;; when the file name and directory use different drive names)
-;; then it returns FILENAME."
-;;   (save-match-data
-;;     (let ((fname (expand-file-name filename)))
-;;       (setq directory (file-name-as-directory
-;;                    (expand-file-name (or directory default-directory))))
-;;       ;; On Microsoft OSes, if FILENAME and DIRECTORY have different
-;;       ;; drive names, they can't be relative, so return the absolute name.
-;;       (if (and (or (eq system-type 'ms-dos)
-;;                (eq system-type 'cygwin)
-;;                (eq system-type 'windows-nt))
-;;            (not (string-equal (substring fname  0 2)
-;;                               (substring directory 0 2))))
-;;       filename
-;;     (let ((ancestor ".")
-;;           (fname-dir (file-name-as-directory fname)))
-;;       (while (and (not (string-match (concat "^" (regexp-quote directory)) 
fname-dir))
-;;                   (not (string-match (concat "^" (regexp-quote directory)) 
fname)))
-;;         (setq directory (file-name-directory (substring directory 0 -1))
-;;               ancestor (if (equal ancestor ".")
-;;                            ".."
-;;                          (concat "../" ancestor))))
-;;       ;; Now ancestor is empty, or .., or ../.., etc.
-;;       (if (string-match (concat "^" (regexp-quote directory)) fname)
-;;           ;; We matched within FNAME's directory part.
-;;           ;; Add the rest of FNAME onto ANCESTOR.
-;;           (let ((rest (substring fname (match-end 0))))
-;;             (if (and (equal ancestor ".")
-;;                      (not (equal rest "")))
-;;                 ;; But don't bother with ANCESTOR if it would give us `./'.
-;;                 rest
-;;               (concat (file-name-as-directory ancestor) rest)))
-;;         ;; We matched FNAME's directory equivalent.
-;;         ancestor))))))
-
 (defun file-relative-name (filename &optional directory)
   "Convert FILENAME to be relative to DIRECTORY (default: `default-directory').
 This function returns a relative file name which is equivalent to FILENAME



reply via email to

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