changeset 3261:50b8f8d5f932

(find-change-log): Use file-chase-links.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 May 1993 20:02:52 +0000
parents eecf2c0ca9b9
children 4ece9a6d1f37
files lisp/add-log.el
diffstat 1 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/add-log.el	Sat May 29 20:00:45 1993 +0000
+++ b/lisp/add-log.el	Sat May 29 20:02:52 1993 +0000
@@ -57,12 +57,8 @@
 			  ;; Chase links in the source file
 			  ;; and use the change log in the dir where it points.
 			  (and buffer-file-name
-			       (let (temp (file buffer-file-name))
-				 (while (setq temp (file-symlink-p file))
-				   (setq file
-					 (expand-file-name
-					  temp (file-name-directory file))))
-				 (file-name-directory file)))
+			       (file-name-directory
+				(file-chase-links buffer-file-name)))
 			  default-directory)))
   (if (and (eq file-name change-log-default-name)
 	   (assq 'change-log-default-name (buffer-local-variables)))
@@ -74,10 +70,7 @@
     ;; Chase links before visiting the file.
     ;; This makes it easier to use a single change log file
     ;; for several related directories.
-    (let (temp)
-      (while (setq temp (file-symlink-p file-name))
-	(setq file-name
-	      (expand-file-name temp (file-name-directory file-name)))))
+    (setq file-name (file-chase-links file-name))
     (setq file-name (expand-file-name file-name))
     ;; Move up in the dir hierarchy till we find a change log file.
     (let ((file1 file-name)