]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/vlf/vlf-integrate.el
Merge commit 'a11ba779f588af28f93fd4b7a716849695d5d9f3'
[gnu-emacs-elpa] / packages / vlf / vlf-integrate.el
index 435ac45633a17e6427ebd647258578bbd744d04e..7bc8f94752e75f57ae3195c5a36254f6e99f78fb 100644 (file)
 (defgroup vlf nil "View Large Files in Emacs."
   :prefix "vlf-" :group 'files)
 
+(defcustom vlf-batch-size 1000000
+  "Defines how large each batch of file data initially is (in bytes)."
+  :group 'vlf :type 'integer)
+
 (defcustom vlf-application 'ask
   "Determines when `vlf' will be offered on opening files.
 Possible values are: nil to never use it;
@@ -98,7 +102,8 @@ OP-TYPE specifies the file operation being performed over FILENAME."
     (vlf filename)
     (error ""))
    ((and large-file-warning-threshold
-         (< large-file-warning-threshold size))
+         (< large-file-warning-threshold size)
+         (< vlf-batch-size size))
     (if (eq vlf-application 'dont-ask)
         (progn (vlf filename)
                (error ""))