From aba28824a0a7eeeff029333cf175c9231bf425f1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 15 Dec 2020 17:03:40 -0500 Subject: [PATCH] Fail gracefully on files with no large-file-size-alist entry --- core/core-editor.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index da57b100b..22b10b908 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -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 _)