Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
6d7ee041
Commit
6d7ee041
authored
Jan 08, 1993
by
Richard M. Stallman
Browse files
(add-change-log-entry): Search for existing ChangeLog
in parent dir and its parents.
parent
c193197b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
lisp/add-log.el
lisp/add-log.el
+16
-0
No files found.
lisp/add-log.el
View file @
6d7ee041
...
@@ -70,6 +70,22 @@ Third arg OTHER-WINDOW non-nil means visit in other window."
...
@@ -70,6 +70,22 @@ Third arg OTHER-WINDOW non-nil means visit in other window."
;; for several related directories.
;; for several related directories.
(
setq
file-name
(
setq
file-name
(
expand-file-name
(
or
(
file-symlink-p
file-name
)
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
(
make-local-variable
'change-log-default-name
)
file-name
)
;; Set ENTRY to the file name to use in the new entry.
;; Set ENTRY to the file name to use in the new entry.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment