From: Richard M. Stallman Date: Fri, 10 Nov 1995 06:44:54 +0000 (+0000) Subject: (Fwrite_region): Move the code that writes annotations for empty files. X-Git-Tag: emacs-19.34~2409 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=69f6e6796b40399a6f31b9a0d124703b2c21ba73;p=emacs.git (Fwrite_region): Move the code that writes annotations for empty files. --- diff --git a/src/fileio.c b/src/fileio.c index f6f99e5e305..47b987ad784 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3427,13 +3427,12 @@ to the file, instead of any buffer contents, and END is ignored.") nwritten += XINT (end) - tem; save_errno = errno; } - - if (nwritten == 0) - { - /* If file was empty, still need to write the annotations */ - failure = 0 > a_write (desc, "", 0, XINT (start), &annotations); - save_errno = errno; - } + } + else + { + /* If file was empty, still need to write the annotations */ + failure = 0 > a_write (desc, "", 0, XINT (start), &annotations); + save_errno = errno; } immediate_quit = 0;