comparison lisp/add-log.el @ 3201:6ae7487f1a3d

(find-change-log): Chase symlinks multiple levels.
author Richard M. Stallman <rms@gnu.org>
date Fri, 28 May 1993 05:18:06 +0000
parents 8291de1718d4
children 8e605e107faa
comparison
equal deleted inserted replaced
3200:add7f1e21bee 3201:6ae7487f1a3d
63 (if (file-directory-p file-name) 63 (if (file-directory-p file-name)
64 (setq file-name (expand-file-name (change-log-name) file-name))) 64 (setq file-name (expand-file-name (change-log-name) file-name)))
65 ;; Chase links before visiting the file. 65 ;; Chase links before visiting the file.
66 ;; This makes it easier to use a single change log file 66 ;; This makes it easier to use a single change log file
67 ;; for several related directories. 67 ;; for several related directories.
68 (setq file-name 68 (let (temp)
69 (expand-file-name (or (file-symlink-p file-name) file-name))) 69 (while (setq temp (file-symlink-p file-name))
70 (setq file-name temp)))
71 (setq file-name (expand-file-name file-name))
70 ;; Move up in the dir hierarchy till we find a change log file. 72 ;; Move up in the dir hierarchy till we find a change log file.
71 (let ((file1 file-name) 73 (let ((file1 file-name)
72 parent-dir) 74 parent-dir)
73 (while (and (not (file-exists-p file1)) 75 (while (and (not (file-exists-p file1))
74 (progn (setq parent-dir 76 (progn (setq parent-dir