[Top][All Lists]

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

Re: cc-mode adds newlines

From: Stefan Monnier
Subject: Re: cc-mode adds newlines
Date: Tue, 23 Nov 2004 23:27:58 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

>     I think that would be silly.  Tons of variable might want to be set
>     differently in different modes.  Do we really want to add all the
>     corresponding foo-modes side-variables?

> This is an example of taking something to an extreme and then
> criticizing the extreme.  This particular variable seems to be a special
> issue.  I'm not proposing this for all variables, only for this one.

Looking at my own .emacs, I see that I never set require-final-newline in
a mode-dependent way.  After all, the final-newline is an extremely minor
detail, so setting the global value of require-final-newline is already
a lot of effort compared to the potential benefit.
On the other hand, there are several other variables that I set differently
depending on the major mode.

Now I'm not the canonical user, but I still think it's a good indication
that if we add require-final-newline-in-modes, we should also add many other
similar variables for fill-column, fill-prefix, comment-start,
comment-auto-fill-only-in-comments, comment-end, left-margin, tab-width,
indent-tabs-mode, font-lock-keyword-face, font-lock-function-name-face,
fill-indent-according-to-mode, c-basic-offset, ...

> However, we could also just add a single new variable
> require-final-newline-in-modes which says what to do in certain
> modes that ask for it.  The modes that now bind require-final-newline
> to t would bind it to require-final-newline-in-modes instead.

I can't believe we're spending so much time on a miserable final newline
which is very rarely missing and even more rarely a source of problem.

> If we do this, I think we should do this in a way that doesn't require
> a special custom type, so that it would work for any variable.



reply via email to

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