[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what are some example case of files needing newline at end?
From: |
Jean-Marc Bourguet |
Subject: |
Re: what are some example case of files needing newline at end? |
Date: |
Sat, 06 Dec 2008 10:55:33 +0100 |
Xah Lee <xahlee@gmail.com> writes:
> what are some examples of files that requires a newline by itself at
> the end?
Under Posix, the newline is a line *terminator* not a line *separator*, so
a Posix text file must be terminated by a newline.
> recently i'm coding elisp to process a input file line by line. Each
> line is expected to have text.
> I ran into error at the last line because the file has a empty line,
> and i noticed that it is automatically added, due to mode-require-
> final-newline being true.
A file terminated by an empty line will have two newlines at its end under
Posix.
Yours,
--
Jean-Marc