emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vlf 099adab 171/310: Fix abort-if-file-too-large advice


From: Stefan Monnier
Subject: [elpa] externals/vlf 099adab 171/310: Fix abort-if-file-too-large advice not to activate VLF in case of empty
Date: Sat, 28 Nov 2020 00:33:09 -0500 (EST)

branch: externals/vlf
commit 099adab95925ee05027d034572da38f8e9ace50f
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Fix abort-if-file-too-large advice not to activate VLF in case of empty
    file.
---
 vlf.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vlf.el b/vlf.el
index 811113f..2b4adc9 100644
--- a/vlf.el
+++ b/vlf.el
@@ -217,6 +217,7 @@ You can customize number of bytes displayed by customizing
 allow user to view file with `vlf', open it normally, or abort.
 OP-TYPE specifies the file operation being performed over FILENAME."
   (cond
+   ((or (not size) (zerop size)))
    ((or (not vlf-application)
         (not filename)
         (memq (vlf-determine-major-mode filename)
@@ -225,8 +226,8 @@ OP-TYPE specifies the file operation being performed over 
FILENAME."
    ((eq vlf-application 'always)
     (vlf filename)
     (error ""))
-   ((and size large-file-warning-threshold
-         (> size large-file-warning-threshold))
+   ((and large-file-warning-threshold
+         (< large-file-warning-threshold size))
     (if (eq vlf-application 'dont-ask)
         (progn (vlf filename)
                (error ""))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]