diff options
| author | Roland McGrath | 1993-06-25 22:01:47 +0000 |
|---|---|---|
| committer | Roland McGrath | 1993-06-25 22:01:47 +0000 |
| commit | 1438263db4f48e948ee83a7a014b3043b03307ee (patch) | |
| tree | c6d9aa296d5dc5d123ee785efbfdcd363518778a | |
| parent | e294d0c380967ff3cabda94fb28608a46d0fdeb0 (diff) | |
| download | emacs-1438263db4f48e948ee83a7a014b3043b03307ee.tar.gz emacs-1438263db4f48e948ee83a7a014b3043b03307ee.zip | |
(find-change-log): Try get-file-buffer before file-exists-p.
| -rw-r--r-- | lisp/add-log.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index 6c468a919ec..1277fd7e7b3 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -75,7 +75,7 @@ current buffer to the complete file name." | |||
| 75 | ;; Move up in the dir hierarchy till we find a change log file. | 75 | ;; Move up in the dir hierarchy till we find a change log file. |
| 76 | (let ((file1 file-name) | 76 | (let ((file1 file-name) |
| 77 | parent-dir) | 77 | parent-dir) |
| 78 | (while (and (not (file-exists-p file1)) | 78 | (while (and (not (or (get-file-buffer file1) (file-exists-p file1))) |
| 79 | (progn (setq parent-dir | 79 | (progn (setq parent-dir |
| 80 | (file-name-directory | 80 | (file-name-directory |
| 81 | (directory-file-name | 81 | (directory-file-name |
| @@ -86,7 +86,7 @@ current buffer to the complete file name." | |||
| 86 | ;; Move up to the parent dir and try again. | 86 | ;; Move up to the parent dir and try again. |
| 87 | (setq file1 (expand-file-name (change-log-name) parent-dir))) | 87 | (setq file1 (expand-file-name (change-log-name) parent-dir))) |
| 88 | ;; If we found a change log in a parent, use that. | 88 | ;; If we found a change log in a parent, use that. |
| 89 | (if (file-exists-p file1) | 89 | (if (or (get-file-buffer file1) (file-exists-p file1)) |
| 90 | (setq file-name file1))) | 90 | (setq file-name file1))) |
| 91 | ;; Make a local variable in this buffer so we needn't search again. | 91 | ;; Make a local variable in this buffer so we needn't search again. |
| 92 | (set (make-local-variable 'change-log-default-name) file-name) | 92 | (set (make-local-variable 'change-log-default-name) file-name) |