]> git.eshelyaron.com Git - emacs.git/commit
Fix (find-file "/dev/null")
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 11 Jul 2025 22:33:26 +0000 (15:33 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 08:47:26 +0000 (10:47 +0200)
commitdce99f6a9861a71bc8bc300195651be64c540485
treed8f791a6c6b7ab2d84b64c44fcb678f5d7870626
parent927356af6c6c58e8084018fac2188bb9a3d4f401
Fix (find-file "/dev/null")

* lisp/files.el (find-file-noselect-1): When the file exists,
propagate any errors signaled by insert-file-contents,
instead of propagating them only when the file is unreadable.
This way, (find-file "/dev/null") gives a sensible diagnostic
"not a regular file" instead of the nonsense
"Maximum buffer size exceeded".

(cherry picked from commit b911029f96b14a03398198d5a849d6f4d0d1e071)
lisp/files.el