Prevent numerical type errors on after-find-file
In some edge cases.
This commit is contained in:
parent
456b501aad
commit
014385a9f6
1 changed files with 5 additions and 4 deletions
|
@ -43,10 +43,11 @@ possible."
|
||||||
(and buffer-file-name
|
(and buffer-file-name
|
||||||
(not doom-large-file-p)
|
(not doom-large-file-p)
|
||||||
(file-exists-p buffer-file-name)
|
(file-exists-p buffer-file-name)
|
||||||
(> (nth 7 (file-attributes buffer-file-name))
|
(ignore-errors
|
||||||
(* 1024 1024
|
(> (nth 7 (file-attributes buffer-file-name))
|
||||||
(assoc-default buffer-file-name doom-large-file-size-alist
|
(* 1024 1024
|
||||||
#'string-match-p)))))
|
(assoc-default buffer-file-name doom-large-file-size-alist
|
||||||
|
#'string-match-p))))))
|
||||||
(prog1 (apply orig-fn args)
|
(prog1 (apply orig-fn args)
|
||||||
(if (memq major-mode doom-large-file-excluded-modes)
|
(if (memq major-mode doom-large-file-excluded-modes)
|
||||||
(setq doom-large-file-p nil)
|
(setq doom-large-file-p nil)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue