aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2015-12-27 21:08:01 +0100
committerLars Ingebrigtsen2015-12-27 21:08:01 +0100
commit5caa4dea5a3432e2b9c5f85b63265c05954c3d53 (patch)
tree82752d941e20e73b0326918017bda2a248385e34
parent03dbfb948c13dd7c9f24fae63e6ef482393c1e8e (diff)
downloademacs-5caa4dea5a3432e2b9c5f85b63265c05954c3d53.tar.gz
emacs-5caa4dea5a3432e2b9c5f85b63265c05954c3d53.zip
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).
-rw-r--r--lisp/erc/erc-log.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index f022284450a..4ac13aab070 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -270,9 +270,12 @@ The current buffer is given by BUFFER."
270 (setq buffer-file-name nil) 270 (setq buffer-file-name nil)
271 (erc-set-write-file-functions '(erc-save-buffer-in-logs)) 271 (erc-set-write-file-functions '(erc-save-buffer-in-logs))
272 (when erc-log-insert-log-on-open 272 (when erc-log-insert-log-on-open
273 (ignore-errors (insert-file-contents (erc-current-logfile)) 273 (ignore-errors
274 (move-marker erc-last-saved-position 274 (save-excursion
275 (1- (point-max)))))))) 275 (goto-char (point-min))
276 (insert-file-contents (erc-current-logfile)))
277 (move-marker erc-last-saved-position
278 (1- (point-max))))))))
276 279
277(defun erc-log-disable-logging (buffer) 280(defun erc-log-disable-logging (buffer)
278 "Disable logging in BUFFER." 281 "Disable logging in BUFFER."