emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/files.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/files.el
Date: Tue, 08 Apr 2003 21:34:39 -0400

Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.647 emacs/lisp/files.el:1.648
*** emacs/lisp/files.el:1.647   Thu Apr  3 18:00:22 2003
--- emacs/lisp/files.el Tue Apr  8 21:34:38 2003
***************
*** 738,751 ****
                  (setq done t))))))))
      filename))
  
! (defun file-chase-links (filename)
    "Chase links in FILENAME until a name that is not a link.
! Does not examine containing directories for links,
! unlike `file-truename'."
!   (let (tem (count 100) (newname filename))
!     (while (setq tem (file-symlink-p newname))
        (save-match-data
!       (if (= count 0)
            (error "Apparent cycle of symbolic links for %s" filename))
        ;; In the context of a link, `//' doesn't mean what Emacs thinks.
        (while (string-match "//+" tem)
--- 738,756 ----
                  (setq done t))))))))
      filename))
  
! (defun file-chase-links (filename &optional limit)
    "Chase links in FILENAME until a name that is not a link.
! Unlike `file-truename', this does not check whether a parent
! directory name is a symbolic link.
! If the optional argument LIMIT is a number,
! it means chase no more than that many links and then stop."
!   (let (tem (newname filename)
!           (count 0)
!           (max (max limit 100)))
!     (while (and (or (null limit) (< count limit))
!               (setq tem (file-symlink-p newname)))
        (save-match-data
!       (if (= count max)
            (error "Apparent cycle of symbolic links for %s" filename))
        ;; In the context of a link, `//' doesn't mean what Emacs thinks.
        (while (string-match "//+" tem)




reply via email to

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