From cf9beff790cef5338e01218bd2f95d8885ff212a Mon Sep 17 00:00:00 2001 From: ueno Date: Tue, 2 Oct 2001 05:01:38 +0000 Subject: [PATCH] * liece-vars.el (liece-buffer-min-size): Rename from `liece-buffer-default-size'. * liece.el (liece-check-buffers-if-interval-expired): Swap the arguments supplied to `liece-time-difference'. (liece-check-buffers): Use `liece-buffer-min-size' instead of `liece-buffer-default-size'. --- lisp/liece-vars.el | 8 ++++---- lisp/liece.el | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/liece-vars.el b/lisp/liece-vars.el index 112fadc..2ef1c1e 100644 --- a/lisp/liece-vars.el +++ b/lisp/liece-vars.el @@ -823,12 +823,12 @@ Messages from them won't be displayed." :group 'liece-vars) (defcustom liece-buffer-max-size 4242424 - "Maximum size (in bytes) of any liece buffer." + "Maximum size of buffers, the number of characters." :type 'integer :group 'liece-vars) -(defcustom liece-buffer-default-size 4042424 - "Size to shrink buffer if it grows too big." +(defcustom liece-buffer-min-size (- liece-buffer-max-size 200000) + "Minimum size of buffers, the number of characters." :type 'integer :group 'liece-vars) @@ -841,7 +841,7 @@ Messages from them won't be displayed." (define-obsolete-variable-alias 'liece-buffer-maxsize 'liece-buffer-max-size) (define-obsolete-variable-alias 'liece-buffer-defsize - 'liece-buffer-default-size) + 'liece-buffer-min-size) (define-obsolete-variable-alias 'liece-checkbuffer-interval 'liece-buffer-check-interval)) diff --git a/lisp/liece.el b/lisp/liece.el index 1dee0ef..c0e743c 100644 --- a/lisp/liece.el +++ b/lisp/liece.el @@ -864,7 +864,7 @@ If such a buffer is found, shrink it." (delete-region (point-min) (progn (goto-char (- (buffer-size) - liece-buffer-default-size)) + liece-buffer-min-size)) (beginning-of-line -1) (point))) (garbage-collect) @@ -875,8 +875,8 @@ If such a buffer is found, shrink it." Only used from `liece-before-insert-functions'." (and (> liece-buffer-check-interval 0) (or (null liece-buffer-last-check-time) - (> (liece-time-difference liece-buffer-last-check-time - (current-time)) + (> (liece-time-difference (current-time) + liece-buffer-last-check-time) liece-buffer-check-interval)) (liece-check-buffers))) -- 1.7.10.4