Mercurial > emacs
diff lisp/add-log.el @ 5150:60fa14264c3b
(add-change-log-entry): put buffer in change-log-mode.
(find-change-log): correct calculation of file one directory out.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 24 Nov 1993 01:53:58 +0000 |
parents | 61c4250fb760 |
children | 7caf06258d7b |
line wrap: on
line diff
--- a/lisp/add-log.el Wed Nov 24 01:22:40 1993 +0000 +++ b/lisp/add-log.el Wed Nov 24 01:53:58 1993 +0000 @@ -103,7 +103,9 @@ (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 @@ (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)