[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc-mode adds newlines

From: Hallvard B Furuseth
Subject: Re: cc-mode adds newlines
Date: Fri, 19 Nov 2004 23:00:20 +0100

Richard Stallman <address@hidden> writes:
>   > I agree. The problem is not just in CC mode, but also in other modes
>   > as well. Could someone from the dev team address these below.
>   I'd tend to agree: setting it to `ask' is fine, but only the user
>   should set it to t if she likes it, not the major mode.
> I tend to think it is wrong for major modes to set this at all.

Personally I want them to leave it alone, but if people want modes to
mess with it, you might add a variable which can be set to allow that.

> So what if the C standard says files must end in a newline?

Besides, if cc-mode is invoked just because of the file name, how
does Emacs know that this really is a C file?

> We would still say that any compiler that actually requires this
> ought to be changed.  So why bother users about it?

If a compiler is used in strict ISO C mode and does not complain
about such a file, it is buggy.

I don't see why one should bother to change a compiler to support an
extension which seems to offer very little extra value.  Any extension
may cause a program to fail when used with another compiler.

I don't know why the restriction exists, but since it is explicitly
spelled out I expect there is a good reason.  Maybe related to how the C
standard supports file systems where a text file must end with newline.

Anyway, that's all the compiler's job to worry about, not Emacs'.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]