Fail gracefully on files with no large-file-size-alist entry
This commit is contained in:
parent
5aaaf3d99c
commit
aba28824a0
1 changed files with 5 additions and 4 deletions
|
@ -40,10 +40,11 @@ runtime costs (or disable themselves) to ensure the buffer is as fast as
|
||||||
possible."
|
possible."
|
||||||
:before #'abort-if-file-too-large
|
:before #'abort-if-file-too-large
|
||||||
(and (numberp size)
|
(and (numberp size)
|
||||||
|
(ignore-errors
|
||||||
(> size
|
(> size
|
||||||
(* 1024 1024
|
(* 1024 1024
|
||||||
(assoc-default filename doom-large-file-size-alist
|
(assoc-default filename doom-large-file-size-alist
|
||||||
#'string-match-p)))
|
#'string-match-p))))
|
||||||
(setq doom-large-file-p size)))
|
(setq doom-large-file-p size)))
|
||||||
|
|
||||||
(defadvice! doom--optimize-for-large-files-a (&rest _)
|
(defadvice! doom--optimize-for-large-files-a (&rest _)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue