From 3af2917c91e4eb863e1cec92a68ccb3acf940dae Mon Sep 17 00:00:00 2001 From: Ivan Shmakov Date: Thu, 2 Oct 2014 07:31:56 -0400 Subject: [PATCH] Do not reset input ring if one exists Fixes: debbugs:18599 --- lisp/erc/ChangeLog | 4 ++++ lisp/erc/erc-ring.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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) -- 2.39.5