mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 12:05:31 +00:00
Fix abort-if-file-too-large advice not to activate VLF in case of empty
file.
This commit is contained in:
parent
65b4d7413f
commit
099adab959
5
vlf.el
5
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 ""))
|
||||
|
Loading…
x
Reference in New Issue
Block a user