;; erc-ring.el -- Command history handling for erc using ring.el
-;; Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2004, 2006-2016 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: comm
;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcHistory
(defvar erc-input-ring-index nil
"Position in the input ring for erc.
-If nil, the input line is blank and the user is conceptually 'after'
+If nil, the input line is blank and the user is conceptually after
the most recently added item in the ring. If an integer, the input
line is non-blank and displays the item from the ring indexed by this
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)
;; Local Variables:
;; indent-tabs-mode: nil
;; End:
-