From cc909dfd78e07a46b46884f7909ef64970099712 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 21 Nov 2004 02:21:57 +0000 Subject: [PATCH] * riece-options.el (riece-shrink-buffer-remove-lines): New user option. * riece.el (riece-shrink-buffer): Remove lines specified by riece-shrink-buffer-remove-lines at a time. --- lisp/ChangeLog | 6 ++++++ lisp/riece-options.el | 5 +++++ lisp/riece.el | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e34a940..e90ab81 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2004-11-21 Daiki Ueno + * riece-options.el (riece-shrink-buffer-remove-lines): New user option. + * riece.el (riece-shrink-buffer): Remove lines specified by + riece-shrink-buffer-remove-lines at a time. + +2004-11-21 Daiki Ueno + * riece.el (riece): Remove nonexistent buffer from riece-buffer-list when running riece-shrink-buffer. diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 7c8190e..c085fdf 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -289,6 +289,11 @@ way is to put Riece variables on .emacs or file loaded from there." :type 'integer :group 'riece-options) +(defcustom riece-shrink-buffer-remove-lines 10 + "Number of lines removed when shrinking channel buffers." + :type 'integer + :group 'riece-options) + (defcustom riece-max-buffer-size 65535 "Maximum size of channel buffers." :type '(radio (integer :tag "Number of characters") diff --git a/lisp/riece.el b/lisp/riece.el index 51e2d59..3f25e7a 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -338,7 +338,9 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (let* ((inhibit-read-only t) buffer-read-only (start (point)) - (end (progn (beginning-of-line 2) (point))) + (end (progn (beginning-of-line + (1+ riece-buffer-shrink-buffer-remove-lines)) + (point))) (overlays (riece-overlays-in start end))) (while overlays (riece-delete-overlay (car overlays)) -- 1.7.10.4