[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 5caa4de: Don't insert erc logs at the end
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] emacs-25 5caa4de: Don't insert erc logs at the end |
Date: |
Sun, 27 Dec 2015 20:08:19 +0000 |
branch: emacs-25
commit 5caa4dea5a3432e2b9c5f85b63265c05954c3d53
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Don't insert erc logs at the end
* erc-log.el (erc-log-setup-logging): Insert the previous log
at the start of the buffer, not at the end (bug#20496).
---
lisp/erc/erc-log.el | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index f022284..4ac13aa 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -270,9 +270,12 @@ The current buffer is given by BUFFER."
(setq buffer-file-name nil)
(erc-set-write-file-functions '(erc-save-buffer-in-logs))
(when erc-log-insert-log-on-open
- (ignore-errors (insert-file-contents (erc-current-logfile))
- (move-marker erc-last-saved-position
- (1- (point-max))))))))
+ (ignore-errors
+ (save-excursion
+ (goto-char (point-min))
+ (insert-file-contents (erc-current-logfile)))
+ (move-marker erc-last-saved-position
+ (1- (point-max))))))))
(defun erc-log-disable-logging (buffer)
"Disable logging in BUFFER."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 5caa4de: Don't insert erc logs at the end,
Lars Ingebrigtsen <=