From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Subject: Re: cc-mode adds newlines
Date: Fri, 19 Nov 2004 23:00:20 +0100 [thread overview]
Message-ID: <HBF.20041119s87r@bombur2.uio.no> (raw)
In-Reply-To: mailman.56.1100895632.27204.bug-gnu-emacs@gnu.org
Richard Stallman <rms@gnu.org> 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'.
--
Hallvard
next prev parent reply other threads:[~2004-11-19 22:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3671.1100818498.8225.bug-gnu-emacs@gnu.org>
2004-11-18 23:23 ` cc-mode adds newlines Kevin Rodgers
2004-11-19 0:46 ` Andreas Schwab
2004-11-18 23:31 ` Jari Aalto
[not found] ` <mailman.3684.1100821293.8225.bug-gnu-emacs@gnu.org>
2004-11-19 0:14 ` Stefan Monnier
2004-11-19 20:04 ` Richard Stallman
[not found] ` <mailman.56.1100895632.27204.bug-gnu-emacs@gnu.org>
2004-11-19 22:00 ` Hallvard B Furuseth [this message]
2004-11-21 15:38 ` Richard Stallman
[not found] ` <mailman.416.1101052189.27204.bug-gnu-emacs@gnu.org>
2004-11-22 5:55 ` Paul D. Smith
[not found] ` <mailman.619.1101127694.27204.bug-gnu-emacs@gnu.org>
2004-11-22 18:55 ` Stefan Monnier
[not found] ` <mailman.723.1101150150.27204.bug-gnu-emacs@gnu.org>
2004-11-22 19:37 ` Hallvard B Furuseth
2004-11-22 22:49 ` Andreas Schwab
[not found] ` <mailman.778.1101164414.27204.bug-gnu-emacs@gnu.org>
2004-11-28 19:39 ` Hallvard B Furuseth
2004-11-18 22:45 Andries.Brouwer
-- strict thread matches above, loose matches on Subject: below --
2003-01-24 5:18 Luc Teirlinck
2003-01-24 2:41 Luc Teirlinck
2003-01-24 1:36 Luc Teirlinck
2003-01-25 19:22 ` Richard Stallman
[not found] ` <mailman.985.1043522856.21513.bug-gnu-emacs@gnu.org>
2003-01-26 20:24 ` Benjamin Riefenstahl
[not found] <mailman.884.1043357104.21513.bug-gnu-emacs@gnu.org>
2003-01-23 23:35 ` Benjamin Riefenstahl
2003-01-23 22:41 Luc Teirlinck
2003-01-23 21:52 Luc Teirlinck
2003-01-23 21:25 Luc Teirlinck
2003-01-23 13:17 Rommerskirchen Heinrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=HBF.20041119s87r@bombur2.uio.no \
--to=h.b.furuseth@usit.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).