mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-25 14:13:37 -05:00
Fail gracefully on files with no large-file-size-alist entry
This commit is contained in:
@@ -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)
|
||||||
(> size
|
(ignore-errors
|
||||||
(* 1024 1024
|
(> size
|
||||||
(assoc-default filename doom-large-file-size-alist
|
(* 1024 1024
|
||||||
#'string-match-p)))
|
(assoc-default filename doom-large-file-size-alist
|
||||||
|
#'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 _)
|
||||||
|
Reference in New Issue
Block a user