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

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

Re: cc-mode adds newlines


From: Paul D. Smith
Subject: Re: cc-mode adds newlines
Date: 22 Nov 2004 00:55:38 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

%% Richard Stallman <address@hidden> writes:

  rs> In the GNU Project we don't impose restrictions just because
  rs> someone else decided to.

That's fine for GCC and other GNU tools, but Emacs is not always used
to edit files which are only used with other GNU programs.

The C standard requires a newline.  It's probably not the only one.
Regardless of standards, there are tools out there which do not behave
properly if a file does not end in a newline.  Sometimes they even
misbehave _silently_.  And finally, I have a very hard time imagining a
situation where it's important to _NOT_ have a final newline in a text
file, especially a C source file (if your file is not a C file then you
shouldn't be editing it in C mode!)  I'm quite confident that the large
majority of users _WANT_ a newline at the end of their text files; I
really doubt that this can be creating real problems for anyone other
than a very tiny minority.


If the consensus is that modes shouldn't be setting this variable due to
philosophical thoughts about Emacs modifying files behind the user's
back that's OK, but if you change this behavior please replace it with a
simple, one-step operation to reinstate the current operation for the
modes where it makes sense (e.g. at least those that currently have it
set to t).  I don't think all those people should have to go create a
new mode hook for every mode that used to have this value set but no
longer does.  Maybe a new value for require-final-newline of 'text or
something where Emacs would just add the newline for text files (modes
might have to define this property somehow) without asking, and ask for
other files.


Anyway, that's my $0.02.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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