Hello, updated patch attached, which ads a note to NEWS, and has a changed implementation of the insertion of missing newline inspired by the one from files.el. It's still slightly different to account for it also being possible to use on a region. This time there's also an added test. / Björn On Thu, Jun 27, 2024, at 09:37, Eli Zaretskii wrote: >> Cc: 71499@debbugs.gnu.org, stefankangas@gmail.com, bkhl@elektrubadur.se >> Date: Thu, 13 Jun 2024 11:30:51 +0300 >> From: Eli Zaretskii >> >> Meanwhile, Björn, I have a few comments to the patch: >> >> . it needs a NEWS entry announcing the new feature >> . is there any reason your code to handle the missing newline is not >> identical to what the implementation of require-final-newline >> does? > > Ping! Björn, can you please post an updated patch with the above nits > taken care of? We can install this now on the master branch.