Prevent numerical type errors on after-find-file

In some edge cases.
This commit is contained in:
Henrik Lissner 2020-02-07 04:23:07 -05:00
parent 456b501aad
commit 014385a9f6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -43,10 +43,11 @@ possible."
(and buffer-file-name
(not doom-large-file-p)
(file-exists-p buffer-file-name)
(> (nth 7 (file-attributes buffer-file-name))
(* 1024 1024
(assoc-default buffer-file-name doom-large-file-size-alist
#'string-match-p)))))
(ignore-errors
(> (nth 7 (file-attributes buffer-file-name))
(* 1024 1024
(assoc-default buffer-file-name doom-large-file-size-alist
#'string-match-p))))))
(prog1 (apply orig-fn args)
(if (memq major-mode doom-large-file-excluded-modes)
(setq doom-large-file-p nil)