emacs-devel
[Top][All Lists]
Advanced

[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 14:08:41 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Andries Brouwer <address@hidden> writes:

> On Sun, Nov 21, 2004 at 01:34:07PM +0100, David Kastrup wrote:
>> Andries Brouwer <address@hidden> writes:
>> 
>> > Yes, indeed. Heinrich Rommerskirchen wrote:
>> >
>> >     cc-mode tries to be smart and adds newlines to a file without
>> >     informing the user and without any easily found option to
>> >     suppress it.
>> >
>> > You see - nobody wants c-require-final-newline.
>> 
>> Telling your opponents in a discussion that you consider them to be
>> nobody is not exactly going to help get your point across.
>
> So far I have not met anyone who required it.
> Must I assume from your reaction that you do require separate
> require-final-newline and c-require-final-newline variables?

I was fine already with the previous behavior that unconditionally
sets require-final-newline in C modes.  But I don't mind that for the
likes of you a customization variable c-require-final-newline has been
added.

I don't particularly like the idea that every mode that has particular
requirements for a variable like that has to have a separately named
variable of its own: this makes it more difficult to figure out what
happens.  I think that in the long run something more transparent for
mode-specific defaults should be found.  But at the moment, I don't
have a good idea for that.

Maybe it would be possible to have something like

  See also c-require-final-newline

in the displayed documentation for require-final-newline
automatically, by having the loading of c-require-final-newline place
an appropriate property on require-final-newline that is then
interpreted by the documentation printer.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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