aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-05-29 20:02:52 +0000
committerRichard M. Stallman <[email protected]>1993-05-29 20:02:52 +0000
commitafb89aea69a969185068fd5dba327b9808fa08c2 (patch)
tree6bf5c61a29de60e4efbb3dc387805f66cb1b083d /lisp
parent5dadeb297b99c1f24d1a6a91d7132a30ba304fa5 (diff)
(find-change-log): Use file-chase-links.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/add-log.el13
1 files changed, 3 insertions, 10 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index cca58931a3..22feb7d225 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -57,12 +57,8 @@ current buffer to the complete file name."
;; 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 @@ current buffer to the complete file name."
;; 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)