From: Ivan Shmakov Date: Thu, 2 Oct 2014 11:31:56 +0000 (-0400) Subject: Do not reset input ring if one exists X-Git-Tag: emacs-25.0.90~2635^2~679^2~163 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3af2917c91e4eb863e1cec92a68ccb3acf940dae;p=emacs.git Do not reset input ring if one exists Fixes: debbugs:18599 --- diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 1ea79dbbc1a..e4f65895de9 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,7 @@ +2014-10-02 Kelvin White + + * erc-ring.el (erc-input-ring-setup): Fixes Bug #18599 + 2014-09-30 Stefan Monnier * erc-track.el (erc-modified-channels-display): Update all mode lines diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el index 1762700ff36..682585c53bb 100644 --- a/lisp/erc/erc-ring.el +++ b/lisp/erc/erc-ring.el @@ -67,7 +67,8 @@ variable.") (defun erc-input-ring-setup () "Do the setup required so that we can use comint style input rings. Call this function when setting up the mode." - (setq erc-input-ring (make-ring comint-input-ring-size)) + (unless (ring-p erc-input-ring) + (setq erc-input-ring (make-ring comint-input-ring-size))) (setq erc-input-ring-index nil)) (defun erc-add-to-input-ring (s)