[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the competition's expm vs ours
From: |
Jaroslav Hajek |
Subject: |
Re: the competition's expm vs ours |
Date: |
Thu, 11 Dec 2008 21:00:15 +0100 |
On Thu, Dec 11, 2008 at 7:59 PM, John W. Eaton <address@hidden> wrote:
> On 10-Dec-2008, Jaroslav Hajek wrote:
>
> | I'm still not getting it. In the source, the line *is* already
> | indented. The leading whitespace is part of it. So why not always on
> | comment sign? Or does Emacs somehow change indenting of lines when
> | displaying files? Or is the purpose that you can automatically
> | reindent files using Emacs? Come on, how often you do that? And even
> | if there's need, it is possible to do it without requiring a special
> | sign for each type of comment, isn't it?
>
> No, Emacs does not change the appearance when displaying the file.
> But when editing, if you type a comment and then type TAB to reindent
> the line, Emacs uses the content of the current line (and possibly
> surrounding context) to decide what to do. So having three different
> styles of comments makes some sense. And yes, it is common to type
> TAB to reindent a line. I don't see how Emacs could guess your intent
> when indenting a comment without the extra clue of # vs ## vs ###.
What about the following: if the comment sign is the first
non-whitespace character on a line, it is treated as ##, otherwise as
#. A comment sign in the first column is treated as ###.
I think similar rules are used by Emacs for C++, aren't they? So why
not for m files?
>
> | > This style follows the comment convention used for Emacs Lisp files.
> |
> | Yeah I was afraid that it's something like that :)
>
> Why the fear? Although it is powerful, Emacs is not scary. :-)
>
I believe you :) I guess the only reason I don't use Emacs is that I
met ViM first. I tried Emacs once, but it didn't feel friendly to my
fingers. But maybe I was already too vimmed. In any case, I was
referring to the fact that unless a contributor uses Emacs, there is
no good justification for the commenting rules, and in fact there may
even be arguments against them.
I understand that Emacs is part of GNU and thus may be considered as a
sort of "default" editor in GNU, but I would like the coding
guidelines to be somewhat "editor-neutral". At least Emacs-oriented
arguments should be considered weaker than editor-neutral arguments,
IMHO.
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: the competition's expm vs ours, (continued)
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, Thomas Weber, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, John W. Eaton, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, Jordi GutiƩrrez Hermoso, 2008/12/10
- Re: the competition's expm vs ours, John W. Eaton, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, John W. Eaton, 2008/12/11
- Re: the competition's expm vs ours,
Jaroslav Hajek <=
- Re: the competition's expm vs ours, Marco Caliari, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10