diff options
| author | Leo Liu | 2011-09-07 11:37:22 +0800 |
|---|---|---|
| committer | Leo Liu | 2011-09-07 11:37:22 +0800 |
| commit | 183fc730a3fd2f113d16125a90ef23ee5fd3659c (patch) | |
| tree | 39fe63197b1d1696c8352461d8550e810bf1b893 | |
| parent | 77694924d89ca42fbf115391baf26be00fd074ca (diff) | |
| download | emacs-183fc730a3fd2f113d16125a90ef23ee5fd3659c.tar.gz emacs-183fc730a3fd2f113d16125a90ef23ee5fd3659c.zip | |
Conditionally initialize rcirc-input-ring
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 979708e2c91..310fb42a155 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-09-07 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * net/rcirc.el (rcirc-mode): Conditionally initialize | ||
| 4 | rcirc-input-ring. | ||
| 5 | |||
| 1 | 2011-09-07 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2011-09-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * emacs-lisp/find-func.el (find-function-C-source): Only set | 8 | * emacs-lisp/find-func.el (find-function-C-source): Only set |
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.") | |||
| 964 | (setq mode-line-process nil) | 964 | (setq mode-line-process nil) |
| 965 | 965 | ||
| 966 | (set (make-local-variable 'rcirc-input-ring) | 966 | (set (make-local-variable 'rcirc-input-ring) |
| 967 | (make-ring rcirc-input-ring-size)) | 967 | ;; If rcirc-input-ring is already a ring with desired size do |
| 968 | ;; not re-initialize. | ||
| 969 | (if (and (ring-p rcirc-input-ring) | ||
| 970 | (= (ring-size rcirc-input-ring) | ||
| 971 | rcirc-input-ring-size)) | ||
| 972 | rcirc-input-ring | ||
| 973 | (make-ring rcirc-input-ring-size))) | ||
| 968 | (set (make-local-variable 'rcirc-server-buffer) (process-buffer process)) | 974 | (set (make-local-variable 'rcirc-server-buffer) (process-buffer process)) |
| 969 | (set (make-local-variable 'rcirc-target) target) | 975 | (set (make-local-variable 'rcirc-target) target) |
| 970 | (set (make-local-variable 'rcirc-topic) nil) | 976 | (set (make-local-variable 'rcirc-topic) nil) |