changeset 3221:8e605e107faa

(find-log-file): Use source file's truename dir.
author Richard M. Stallman <rms@gnu.org>
date Fri, 28 May 1993 22:08:53 +0000
parents 77a302be84da
children f37166b46007
files lisp/add-log.el
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/add-log.el	Fri May 28 21:29:37 1993 +0000
+++ b/lisp/add-log.el	Fri May 28 22:08:53 1993 +0000
@@ -54,6 +54,13 @@
 current buffer to the complete file name."
   (or file-name
       (setq file-name (or change-log-default-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 temp))
+				 (file-name-directory file)))
 			  default-directory)))
   (if (and (eq file-name change-log-default-name)
 	   (assq 'change-log-default-name (buffer-local-variables)))