1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-01-18 20:10:47 +00:00

Fix abort-if-file-too-large advice not to activate VLF in case of empty

file.
This commit is contained in:
Andrey Kotlarski 2013-12-12 13:44:31 +02:00
parent 65b4d7413f
commit 099adab959

5
vlf.el
View File

@ -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. allow user to view file with `vlf', open it normally, or abort.
OP-TYPE specifies the file operation being performed over FILENAME." OP-TYPE specifies the file operation being performed over FILENAME."
(cond (cond
((or (not size) (zerop size)))
((or (not vlf-application) ((or (not vlf-application)
(not filename) (not filename)
(memq (vlf-determine-major-mode 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) ((eq vlf-application 'always)
(vlf filename) (vlf filename)
(error "")) (error ""))
((and size large-file-warning-threshold ((and large-file-warning-threshold
(> size large-file-warning-threshold)) (< large-file-warning-threshold size))
(if (eq vlf-application 'dont-ask) (if (eq vlf-application 'dont-ask)
(progn (vlf filename) (progn (vlf filename)
(error "")) (error ""))