]> git.eshelyaron.com Git - emacs.git/commit
Simplify file end finding in insert-file-contents
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Jul 2025 00:38:32 +0000 (17:38 -0700)
committerEshel Yaron <me@eshelyaron.com>
Fri, 25 Jul 2025 08:12:46 +0000 (10:12 +0200)
commitec73fe07a9f9a66f8d0b0835a542e581de423632
treef043f7f78a37dd9cc63e50830f9b63aa0f5ac453
parent351951ad4590d52ae7d1b4b20a46911007485fe8
Simplify file end finding in insert-file-contents

* src/fileio.c (Finsert_file_contents): Don’t give up finding the
file’s end merely because SEEK_END fails.  Try a small test read
anyway.  This might work in non-POSIX file systems where SEEK_END
is not allowed, and trying is easy and simplifies the code.

(cherry picked from commit 4c791549496d1edbed7ba792994381e6cdc01184)
src/fileio.c