diff options
author | Leo Liu <sdl.web@gmail.com> | 2011-09-07 11:37:22 +0800 |
---|---|---|
committer | Leo Liu <sdl.web@gmail.com> | 2011-09-07 11:37:22 +0800 |
commit | 183fc730a3fd2f113d16125a90ef23ee5fd3659c (patch) | |
tree | 39fe63197b1d1696c8352461d8550e810bf1b893 /lisp/net | |
parent | 77694924d89ca42fbf115391baf26be00fd074ca (diff) | |
download | emacs-183fc730a3fd2f113d16125a90ef23ee5fd3659c.tar.gz |
Conditionally initialize rcirc-input-ring
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/rcirc.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 06bbfb0b78c..51a087bc084 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -964,7 +964,13 @@ This number is independent of the number of lines in the buffer.") (setq mode-line-process nil) (set (make-local-variable 'rcirc-input-ring) - (make-ring rcirc-input-ring-size)) + ;; If rcirc-input-ring is already a ring with desired size do + ;; not re-initialize. + (if (and (ring-p rcirc-input-ring) + (= (ring-size rcirc-input-ring) + rcirc-input-ring-size)) + rcirc-input-ring + (make-ring rcirc-input-ring-size))) (set (make-local-variable 'rcirc-server-buffer) (process-buffer process)) (set (make-local-variable 'rcirc-target) target) (set (make-local-variable 'rcirc-topic) nil) |