summaryrefslogtreecommitdiff
path: root/lisp/vc/log-edit.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2018-07-21 15:54:21 +0100
committerJoão Távora <joaotavora@gmail.com>2018-07-21 16:02:57 +0100
commitf96fe57fb76df8e7282f266d42a0d471780e1d75 (patch)
tree606f03b770613c87f7a27345105a1afdaacaa83f /lisp/vc/log-edit.el
parent6eac401c238b9c98550c645f3c60df9a9668dc61 (diff)
downloademacs-f96fe57fb76df8e7282f266d42a0d471780e1d75.tar.gz
New option to make 'C-x 4 a' use file-less ChangeLog buffers
* doc/emacs/maintaining.texi (Change Log Commands): Document add-log-dont-create-changelog-file. * etc/NEWS (Change Logs Mode): Mention add-log-dont-create-changelog-file. * lisp/vc/add-log.el (add-log-file-name): Add comment. (add-log-dont-create-changelog-file): New variable. (add-log--pseudo-changelog-buffer-name) (add-log--changelog-buffer-p): New helpers. (add-log-find-changelog-buffer): New function. (add-log--pseudo-changelog-buffer-name): Respect add-log-dont-create-changelog-file. * lisp/vc/log-edit.el (log-edit-changelog-entries): Use add-log-find-changelog-buffer.
Diffstat (limited to 'lisp/vc/log-edit.el')
-rw-r--r--lisp/vc/log-edit.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 6ff782a6061..90860fbdcfe 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -913,8 +913,10 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each
(setq change-log-default-name nil)
(find-change-log)))))
(when (or (find-buffer-visiting changelog-file-name)
- (file-exists-p changelog-file-name))
- (with-current-buffer (find-file-noselect changelog-file-name)
+ (file-exists-p changelog-file-name)
+ add-log-dont-create-changelog-file)
+ (with-current-buffer
+ (add-log-find-changelog-buffer changelog-file-name)
(unless (eq major-mode 'change-log-mode) (change-log-mode))
(goto-char (point-min))
(if (looking-at "\\s-*\n") (goto-char (match-end 0)))