diff options
| author | Richard M. Stallman | 1993-11-24 01:53:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-24 01:53:58 +0000 |
| commit | 675a998f8c373b8d3ec180524dc22568a597dfce (patch) | |
| tree | 4f2dada7027ad470e024962ce89c0d55a45cd22d | |
| parent | 4b43d418f3cd39f662b907f166eed41639ac3226 (diff) | |
| download | emacs-675a998f8c373b8d3ec180524dc22568a597dfce.tar.gz emacs-675a998f8c373b8d3ec180524dc22568a597dfce.zip | |
(add-change-log-entry): put buffer in change-log-mode.
(find-change-log): correct calculation of file one directory out.
| -rw-r--r-- | lisp/add-log.el | 6 |
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." | |||
| 103 | (not (string= (file-name-directory file1) | 103 | (not (string= (file-name-directory file1) |
| 104 | parent-dir)))) | 104 | parent-dir)))) |
| 105 | ;; Move up to the parent dir and try again. | 105 | ;; Move up to the parent dir and try again. |
| 106 | (setq file1 (expand-file-name (change-log-name) parent-dir))) | 106 | (setq file1 (expand-file-name |
| 107 | (file-name-nondirectory (change-log-name)) | ||
| 108 | parent-dir))) | ||
| 107 | ;; If we found a change log in a parent, use that. | 109 | ;; If we found a change log in a parent, use that. |
| 108 | (if (or (get-file-buffer file1) (file-exists-p file1)) | 110 | (if (or (get-file-buffer file1) (file-exists-p file1)) |
| 109 | (setq file-name file1))) | 111 | (setq file-name file1))) |
| @@ -150,6 +152,8 @@ never append to an existing entry." | |||
| 150 | (if (and other-window (not (equal file-name buffer-file-name))) | 152 | (if (and other-window (not (equal file-name buffer-file-name))) |
| 151 | (find-file-other-window file-name) | 153 | (find-file-other-window file-name) |
| 152 | (find-file file-name)) | 154 | (find-file file-name)) |
| 155 | (or (eq major-mode 'change-log-mode) | ||
| 156 | (change-log-mode)) | ||
| 153 | (undo-boundary) | 157 | (undo-boundary) |
| 154 | (goto-char (point-min)) | 158 | (goto-char (point-min)) |
| 155 | (if (looking-at (concat (regexp-quote (substring (current-time-string) | 159 | (if (looking-at (concat (regexp-quote (substring (current-time-string) |