]> code.delx.au - gnu-emacs/commitdiff
Only initialize erc-last-saved-position if not already a marker.
authorIvan Shmakov <ivan@siamics.net>
Fri, 10 Oct 2014 13:16:12 +0000 (09:16 -0400)
committerKelvin White <kwhite@gnu.org>
Fri, 10 Oct 2014 13:16:12 +0000 (09:16 -0400)
Fixes: debbugs:16145
lisp/erc/ChangeLog
lisp/erc/erc.el

index fd8f83bd78b61d0a0fc1a569bd866a910b211dfc..0833bda4cb14b3dbcbdedbdc6c7ba02ccccf6fcc 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 2fd41a34ad4ad73b05e3da8eaa2ba4a711ce28e7..1e81929d80248330848579435b8671b534916277 100644 (file)
@@ -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