Commit 43f52995 authored by Ivan Shmakov's avatar Ivan Shmakov Committed by Kelvin White
Browse files

Only initialize erc-last-saved-position if not already a marker.

Fixes: debbugs:16145
parent f5f949f7
2014-10-10 Kelvin White <kwhite@gnu.org>
* erc.el (erc-initialize-log-marker): Only initialize
erc-last-saved-position if not already a marker.
2014-10-04 Stefan Monnier <monnier@iro.umontreal.ca>
* erc.el (erc-channel-receive-names): Silence compiler warning.
......
......@@ -2057,9 +2057,10 @@ Returns the buffer for the given server or channel."
"Initialize the `erc-last-saved-position' marker to a sensible position.
BUFFER is the current buffer."
(with-current-buffer buffer
(setq erc-last-saved-position (make-marker))
(move-marker erc-last-saved-position
(1- (marker-position erc-insert-marker)))))
(unless (markerp erc-last-saved-position)
(setq erc-last-saved-position (make-marker))
(move-marker erc-last-saved-position
(1- (marker-position erc-insert-marker)))))
;; interactive startup
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment