aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-11-10 22:03:43 +0000
committerRichard M. Stallman1994-11-10 22:03:43 +0000
commitde98fcafe2c3a26e11aa3febfcbe73591d912406 (patch)
treebe1fda20ddfb71038218598ceaf641afc9b67f75
parente9d167a70d87329d8f296d5b2348693607237605 (diff)
downloademacs-de98fcafe2c3a26e11aa3febfcbe73591d912406.tar.gz
emacs-de98fcafe2c3a26e11aa3febfcbe73591d912406.zip
(find-change-log): If change-log-default-name
has no dir component, search through parent dirs for it.
-rw-r--r--lisp/add-log.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 9cc2e2d36f8..734fa5ebf86 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -77,16 +77,22 @@ This defaults to the value of `user-mail-address'.")
77 "Find a change log file for \\[add-change-log-entry] and return the name. 77 "Find a change log file for \\[add-change-log-entry] and return the name.
78 78
79Optional arg FILE-NAME specifies the file to use. 79Optional arg FILE-NAME specifies the file to use.
80If FILE-NAME is nil, use the value of `change-log-default-name' if non-nil. 80If FILE-NAME is nil, use the value of `change-log-default-name'.
81Otherwise, search in the current directory and its successive parents 81If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
82for a file named `ChangeLog' (or whatever we use on this operating system). 82\(or whatever we use on this operating system).
83
84If 'change-log-default-name' contains a leading directory component, then
85simply find it in the current directory. Otherwise, search in the current
86directory and its successive parents for a file so named.
83 87
84Once a file is found, `change-log-default-name' is set locally in the 88Once a file is found, `change-log-default-name' is set locally in the
85current buffer to the complete file name." 89current buffer to the complete file name."
86 ;; If user specified a file name or if this buffer knows which one to use, 90 ;; If user specified a file name or if this buffer knows which one to use,
87 ;; just use that. 91 ;; just use that.
88 (or file-name 92 (or file-name
89 (setq file-name change-log-default-name) 93 (setq file-name (and change-log-default-name
94 (file-name-directory change-log-default-name)
95 change-log-default-name))
90 (progn 96 (progn
91 ;; Chase links in the source file 97 ;; Chase links in the source file
92 ;; and use the change log in the dir where it points. 98 ;; and use the change log in the dir where it points.