bug-gnu-emacs
[Top][All Lists]
Advanced

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

cc-mode adds newlines


From: Andries.Brouwer
Subject: cc-mode adds newlines
Date: Thu, 18 Nov 2004 23:45:32 +0100 (MET)

Working with emacs 21.3.
Struggled for a while to get emacs to save a file without final newline.

It is very bad that an editor decides to change my files behind
my back. If it asks "shall I add?", that is OK. If there is a
user variable that one can set so that it will never ask, that
is OK as well. But the default must always be not to damage
the user's files by doing "helpful" things.

OK. There is a variable require-final-newline.
But setting it did not make any difference.
The setting was overridden by cc-mode.el.

So, it looks like this aspect of emacs 21.3 is broken.

Asking Google I find a lot of discussion about the topic.
Apparently I am not the only one who hates it if the editor
changes files without having been asked to.
There is talk about c-require-final-newline as a variable,
or perhaps as an alist.

I see discussion about what languages have formal standards
that require source code lines to end with newline.
But that is all completely beside the point.
The point is: emacs must not start changing my files without
being asked. It doesnt do other things to my source code
(fortunately) to make it more "correct".
An editor must not "fix" my grammar, or spelling, or layout,
or anything at all in the source file without having been asked.

Andries




reply via email to

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