* liece-vars.el (liece-buffer-min-size): Rename from
authorueno <ueno>
Tue, 2 Oct 2001 05:01:38 +0000 (05:01 +0000)
committerueno <ueno>
Tue, 2 Oct 2001 05:01:38 +0000 (05:01 +0000)
`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
lisp/liece.el

index 112fadc..2ef1c1e 100644 (file)
@@ -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))
 
index 1dee0ef..c0e743c 100644 (file)
@@ -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)))