]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix prompting for large files when loading literally
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 21 Jun 2021 12:58:15 +0000 (14:58 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 21 Jun 2021 12:58:15 +0000 (14:58 +0200)
* lisp/files.el (find-file-noselect): Don't include "literally" in
the "large file" prompt if we're gonna load literally anyway
(bug#49144).

lisp/files.el

index 13dda0932a2537d171c4ca7ddb506331c700ed41..5d2fe0a77be2f5e70b9f710bcacbce09544cc614 100644 (file)
@@ -2288,7 +2288,8 @@ the various files."
        ;; Check to see if the file looks uncommonly large.
        (when (not (or buf nowarn))
           (when (eq (abort-if-file-too-large
-                     (file-attribute-size attributes) "open" filename t)
+                     (file-attribute-size attributes) "open" filename
+                     (not rawfile))
                     'raw)
             (setf rawfile t))
          (warn-maybe-out-of-memory (file-attribute-size attributes)))