aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-04-09 19:06:19 +0000
committerRichard M. Stallman2003-04-09 19:06:19 +0000
commit92464ae63f6bae0f1cf889389548ec51a2ff36dc (patch)
treea58ba145b5c9fe9aa061ccb1cc9a8a70103f812c
parentf7df88f47ad8f3cfe9705f33cd27653906065746 (diff)
downloademacs-92464ae63f6bae0f1cf889389548ec51a2ff36dc.tar.gz
emacs-92464ae63f6bae0f1cf889389548ec51a2ff36dc.zip
(file-chase-links): Fix previous change.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/files.el7
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 003ae0f9c2c..937da2bd58a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12003-04-09 Richard M. Stallman <rms@gnu.org>
2
3 * files.el (file-chase-links): Fix previous change.
4
12003-04-09 Juanma Barranquero <lektu@terra.es> 52003-04-09 Juanma Barranquero <lektu@terra.es>
2 6
3 * frame.el (new-frame): Add obsolescence declaration. 7 * frame.el (new-frame): Add obsolescence declaration.
diff --git a/lisp/files.el b/lisp/files.el
index 1d8cc2aa45e..d11014a9a0c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -745,12 +745,11 @@ directory name is a symbolic link.
745If the optional argument LIMIT is a number, 745If the optional argument LIMIT is a number,
746it means chase no more than that many links and then stop." 746it means chase no more than that many links and then stop."
747 (let (tem (newname filename) 747 (let (tem (newname filename)
748 (count 0) 748 (count 0))
749 (max (max limit 100)))
750 (while (and (or (null limit) (< count limit)) 749 (while (and (or (null limit) (< count limit))
751 (setq tem (file-symlink-p newname))) 750 (setq tem (file-symlink-p newname)))
752 (save-match-data 751 (save-match-data
753 (if (= count max) 752 (if (and (null limit) (= count 100))
754 (error "Apparent cycle of symbolic links for %s" filename)) 753 (error "Apparent cycle of symbolic links for %s" filename))
755 ;; In the context of a link, `//' doesn't mean what Emacs thinks. 754 ;; In the context of a link, `//' doesn't mean what Emacs thinks.
756 (while (string-match "//+" tem) 755 (while (string-match "//+" tem)
@@ -769,7 +768,7 @@ it means chase no more than that many links and then stop."
769 ;; Now find the parent of that dir. 768 ;; Now find the parent of that dir.
770 (setq newname (file-name-directory newname))) 769 (setq newname (file-name-directory newname)))
771 (setq newname (expand-file-name tem (file-name-directory newname))) 770 (setq newname (expand-file-name tem (file-name-directory newname)))
772 (setq count (1- count)))) 771 (setq count (1+ count))))
773 newname)) 772 newname))
774 773
775(defun recode-file-name (file coding new-coding &optional ok-if-already-exists) 774(defun recode-file-name (file coding new-coding &optional ok-if-already-exists)