Fail gracefully on files with no large-file-size-alist entry

This commit is contained in:
Henrik Lissner 2020-12-15 17:03:40 -05:00
parent 5aaaf3d99c
commit aba28824a0
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -40,10 +40,11 @@ runtime costs (or disable themselves) to ensure the buffer is as fast as
possible."
:before #'abort-if-file-too-large
(and (numberp size)
(> size
(* 1024 1024
(assoc-default filename doom-large-file-size-alist
#'string-match-p)))
(ignore-errors
(> size
(* 1024 1024
(assoc-default filename doom-large-file-size-alist
#'string-match-p))))
(setq doom-large-file-p size)))
(defadvice! doom--optimize-for-large-files-a (&rest _)