Mercurial > emacs
changeset 1752:b2af3186e7a7
(add-change-log-entry): Search for existing ChangeLog
in parent dir and its parents.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 08 Jan 1993 21:13:23 +0000 |
parents | fac61b478a41 |
children | 852bc0022185 |
files | lisp/add-log.el |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/add-log.el Fri Jan 08 21:12:58 1993 +0000 +++ b/lisp/add-log.el Fri Jan 08 21:13:23 1993 +0000 @@ -70,6 +70,22 @@ ;; for several related directories. (setq file-name (expand-file-name (or (file-symlink-p file-name) file-name))) + ;; Move up in the dir hierarchy till we find a change log file. + (let ((file1 file-name) + parent-dir) + (while (and (not (file-exists-p file1)) + (progn (setq parent-dir + (file-name-directory + (directory-file-name + (file-name-directory file1)))) + ;; Give up if we are already at the root dir. + (not (string= (file-name-directory file1) parent-dir)))) + ;; Move up to the parent dir and try again. + (setq file1 (expand-file-name (change-log-name) parent-dir))) + ;; If we found a change log in a parent, use that. + (if (file-exists-p file1) + (setq file-name file1))) + (set (make-local-variable 'change-log-default-name) file-name) ;; Set ENTRY to the file name to use in the new entry.