Function: erc-log-setup-logging
erc-log-setup-logging is a byte-compiled function defined in
erc-log.el.gz.
Signature
(erc-log-setup-logging BUFFER)
Documentation
Setup the buffer-local logging variables in the current buffer.
This function is destined to be run from erc-connect-pre-hook.
The current buffer is given by BUFFER.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-log.el.gz
;;; functionality referenced from erc.el
(defun erc-log-setup-logging (buffer)
"Setup the buffer-local logging variables in the current buffer.
This function is destined to be run from `erc-connect-pre-hook'.
The current buffer is given by BUFFER."
(when (erc-logging-enabled buffer)
(with-current-buffer buffer
(auto-save-mode -1)
(setq buffer-file-name nil)
(add-hook 'write-file-functions #'erc-save-buffer-in-logs nil t)
(when erc-log-insert-log-on-open
(ignore-errors
(save-excursion
(goto-char (point-min))
(insert-file-contents (erc-current-logfile)))
(move-marker erc-last-saved-position
(1- (point-max))))))))