summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-ring.el
diff options
context:
space:
mode:
authorIvan Shmakov <ivan@siamics.net>2014-10-02 07:31:56 -0400
committerKelvin White <kwhite@gnu.org>2014-10-02 07:31:56 -0400
commit3af2917c91e4eb863e1cec92a68ccb3acf940dae (patch)
tree05a9ae9edbb2d1a5a8e1a1605b4ea2f3074da7a6 /lisp/erc/erc-ring.el
parent5f8947c7007d1d844b3d1de97e2d232a005ca07d (diff)
downloademacs-3af2917c91e4eb863e1cec92a68ccb3acf940dae.tar.gz
Do not reset input ring if one exists
Fixes: debbugs:18599
Diffstat (limited to 'lisp/erc/erc-ring.el')
-rw-r--r--lisp/erc/erc-ring.el3
1 files changed, 2 insertions, 1 deletions
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)