diff options
| author | Richard M. Stallman | 1993-05-29 20:02:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-29 20:02:52 +0000 |
| commit | afb89aea69a969185068fd5dba327b9808fa08c2 (patch) | |
| tree | 6bf5c61a29de60e4efbb3dc387805f66cb1b083d | |
| parent | 5dadeb297b99c1f24d1a6a91d7132a30ba304fa5 (diff) | |
| download | emacs-afb89aea69a969185068fd5dba327b9808fa08c2.tar.gz emacs-afb89aea69a969185068fd5dba327b9808fa08c2.zip | |
(find-change-log): Use file-chase-links.
| -rw-r--r-- | lisp/add-log.el | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index cca58931a37..22feb7d2257 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -57,12 +57,8 @@ current buffer to the complete file name." | |||
| 57 | ;; Chase links in the source file | 57 | ;; Chase links in the source file |
| 58 | ;; and use the change log in the dir where it points. | 58 | ;; and use the change log in the dir where it points. |
| 59 | (and buffer-file-name | 59 | (and buffer-file-name |
| 60 | (let (temp (file buffer-file-name)) | 60 | (file-name-directory |
| 61 | (while (setq temp (file-symlink-p file)) | 61 | (file-chase-links buffer-file-name))) |
| 62 | (setq file | ||
| 63 | (expand-file-name | ||
| 64 | temp (file-name-directory file)))) | ||
| 65 | (file-name-directory file))) | ||
| 66 | default-directory))) | 62 | default-directory))) |
| 67 | (if (and (eq file-name change-log-default-name) | 63 | (if (and (eq file-name change-log-default-name) |
| 68 | (assq 'change-log-default-name (buffer-local-variables))) | 64 | (assq 'change-log-default-name (buffer-local-variables))) |
| @@ -74,10 +70,7 @@ current buffer to the complete file name." | |||
| 74 | ;; Chase links before visiting the file. | 70 | ;; Chase links before visiting the file. |
| 75 | ;; This makes it easier to use a single change log file | 71 | ;; This makes it easier to use a single change log file |
| 76 | ;; for several related directories. | 72 | ;; for several related directories. |
| 77 | (let (temp) | 73 | (setq file-name (file-chase-links file-name)) |
| 78 | (while (setq temp (file-symlink-p file-name)) | ||
| 79 | (setq file-name | ||
| 80 | (expand-file-name temp (file-name-directory file-name))))) | ||
| 81 | (setq file-name (expand-file-name file-name)) | 74 | (setq file-name (expand-file-name file-name)) |
| 82 | ;; Move up in the dir hierarchy till we find a change log file. | 75 | ;; Move up in the dir hierarchy till we find a change log file. |
| 83 | (let ((file1 file-name) | 76 | (let ((file1 file-name) |