[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cc-mode adds newlines
From: |
David Kastrup |
Subject: |
Re: cc-mode adds newlines |
Date: |
Sun, 21 Nov 2004 12:06:24 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Andries Brouwer <address@hidden> writes:
> On Sat, Nov 20, 2004 at 03:14:24PM +0000, Alan Mackenzie wrote:
>
>> >It is not the goal of an editor to force the user to write syntactically
>> >correct programs.
>>
>> Well, that is debateable. I'd tend to agree with you, whilst pointing
>> out that in this case, there was no "force" used [see below].
>>
>> An equally valid argument is that of the programmer who hacks through the
>> night and sets off a build (which takes several hours to complete), goes
>> home for some sleep, then comes back into the office the following
>> afternoon. He then finds that the build failed for lack of a final
>> newline in one of the files. Then he expostulates "FAQ! Why couldn't
>> that stupid editor have put that stupid newline in for me?".
>
> That is a phantasy argument.
> Old compilers just accept the C source without final newline
> without any complaint. Some newer pedantic ones print a warning.
I would not be surprised if there were compilers that just dropped the
last character of a line read in, assuming it to be a linefeed.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Re: cc-mode adds newlines, (continued)
- Re: cc-mode adds newlines, Stefan Monnier, 2004/11/21
- Re: cc-mode adds newlines, Miles Bader, 2004/11/21
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21
- Re: cc-mode adds newlines, David Kastrup, 2004/11/21
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21
- Re: cc-mode adds newlines, David Kastrup, 2004/11/21
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21
- Re: cc-mode adds newlines, Thien-Thi Nguyen, 2004/11/21
- Re: cc-mode adds newlines,
David Kastrup <=
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21
- Re: cc-mode adds newlines, David Kastrup, 2004/11/21
- Re: cc-mode adds newlines, Alan Mackenzie, 2004/11/21
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21
- Re: cc-mode adds newlines, David Kastrup, 2004/11/21
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21
- Re: cc-mode adds newlines, David Kastrup, 2004/11/21
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21
- Re: cc-mode adds newlines, David Kastrup, 2004/11/21
- Re: cc-mode adds newlines, Andries Brouwer, 2004/11/21