summaryrefslogtreecommitdiff
path: root/lisp/add-log.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-24 01:53:58 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-24 01:53:58 +0000
commit675a998f8c373b8d3ec180524dc22568a597dfce (patch)
tree4f2dada7027ad470e024962ce89c0d55a45cd22d /lisp/add-log.el
parent4b43d418f3cd39f662b907f166eed41639ac3226 (diff)
downloademacs-675a998f8c373b8d3ec180524dc22568a597dfce.tar.gz
(add-change-log-entry): put buffer in change-log-mode.
(find-change-log): correct calculation of file one directory out.
Diffstat (limited to 'lisp/add-log.el')
-rw-r--r--lisp/add-log.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index ffc1494f85c..8c7bdcd85a9 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -103,7 +103,9 @@ current buffer to the complete file name."
(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)))
+ (setq file1 (expand-file-name
+ (file-name-nondirectory (change-log-name))
+ parent-dir)))
;; If we found a change log in a parent, use that.
(if (or (get-file-buffer file1) (file-exists-p file1))
(setq file-name file1)))
@@ -150,6 +152,8 @@ never append to an existing entry."
(if (and other-window (not (equal file-name buffer-file-name)))
(find-file-other-window file-name)
(find-file file-name))
+ (or (eq major-mode 'change-log-mode)
+ (change-log-mode))
(undo-boundary)
(goto-char (point-min))
(if (looking-at (concat (regexp-quote (substring (current-time-string)