]> code.delx.au - gnu-emacs/blobdiff - lisp/erc/erc-log.el
* lisp/descr-text.el (describe-char-unicode-data): Fix copy/paste errors.
[gnu-emacs] / lisp / erc / erc-log.el
index c6ff8fa5bfe960ed9e9be613193e869d2b1948c4..61a83b1739ddf78fc60f906edd84caed2dcc7e49 100644 (file)
@@ -1,9 +1,9 @@
 ;;; erc-log.el --- Logging facilities for ERC.
 
-;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
 
 ;; Author: Lawrence Mitchell <wence@gmx.li>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: IRC, chat, client, Internet, logging
 
 ;; Created 2003-04-26
@@ -202,6 +202,7 @@ If you set this to nil, you may want to enable both
 
 This should ideally, be a \"catch-all\" coding system, like
 `emacs-mule', or `iso-2022-7bit'."
+  :type 'coding-system
   :group 'erc-log)
 
 (defcustom erc-log-filter-function nil
@@ -269,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."