From 099adab95925ee05027d034572da38f8e9ace50f Mon Sep 17 00:00:00 2001 From: Andrey Kotlarski Date: Thu, 12 Dec 2013 13:44:31 +0200 Subject: [PATCH] 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 ""))