From: Paul Eggert Date: Sat, 12 Jul 2025 19:06:09 +0000 (-0700) Subject: Non-nil orig_filename in insert-file-contents X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dae8dd74b10863782ebabd97ef1dc6f846aa364e;p=emacs.git Non-nil orig_filename in insert-file-contents * src/fileio.c (Finsert_file_contents): Don’t let orig_filename be nil, as that might mess up later diagnostics. (cherry picked from commit b1ada33b5dfac62258e9e3cb957dbe722b7c8990) --- diff --git a/src/fileio.c b/src/fileio.c index 5d383a7b44d..24efff21e4c 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4100,11 +4100,11 @@ by calling `format-decode', which see. */) val = Qnil; p = Qnil; - orig_filename = Qnil; old_undo = Qnil; CHECK_STRING (filename); filename = Fexpand_file_name (filename, Qnil); + orig_filename = filename; /* The value Qnil means that the coding system is not yet decided. */ @@ -4134,7 +4134,6 @@ by calling `format-decode', which see. */) off_t beg_offset = !NILP (beg) ? file_offset (beg) : 0; off_t end_offset = !NILP (end) ? file_offset (end) : -1; - orig_filename = filename; filename = ENCODE_FILE (filename); /* A hint about the file size, or -1 if there is no hint. */