All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: Petr Baudis <pasky@ucw.cz>
Cc: torvalds@osdl.org, git@vger.kernel.org
Subject: Re: [PATCH] Tidy up some rev-list-related stuff
Date: Thu, 9 Jun 2005 11:06:46 +1000	[thread overview]
Message-ID: <2cfc4032050608180650e5ef12@mail.gmail.com> (raw)
In-Reply-To: <20050608205943.GO982@pasky.ji.cz>

On 6/9/05, Petr Baudis <pasky@ucw.cz> wrote:
> This patch tidies up the git-rev-list documentation and epoch.c, which
> are in severe clash with the unwritten coding style now, and quite
> unreadable.
> 
> The patch mostly wraps lines before or on the 80th column, removes
> plenty of superfluous empty lines and changes comments from // to /* */.
> 
> Signed-off-by: Petr Baudis <pasky@ucw.cz>
> 
> ---
> 
> Jon, since this is your stuff, could you ack the patch, please?
> Thanks.
> 
> I'm sorry to send patches like this, but I think the files are really
> ugly as of now, and not very readable. This should be a definite
> improvement in this regard, I hope.
> 

Ack'd and tested.

Hey, no problem. I'll never learn unless someone corrects me. It does
make my next patch slightly tedious since I'll have to manually
reapply it, but hey, I am the new kid on the block, so kick dirt in my
face :-)

>From your patch I infer the following coding style rules:

Lines to wrap at column 80
One statement blocks should not include braces
Comment blocks should always be /* */ rather than //
Declarations should always be up the top of a block - never close to first use
No whitespace at top and bottom of blocks.
All indentation should use tabs and only tabs, set at tab stops of 8 apart.

Question: is // ever allowed?

Presumably, when in doubt should I use the kernel's CodingStyle
document as the default reference.

Speaking of which, I can't emacs to indent properly even when I use
this suggestion from that document:

    (defun linux-c-mode ()
      "C mode with adjusted defaults for use with the Linux kernel."
      (interactive)
      (c-mode)
      (c-set-style "K&R")
      (setq tab-width 8)
      (setq indent-tabs-mode t)
      (setq c-basic-offset 8))

    This will define the M-x linux-c-mode command.  When hacking on a
    module, if you put the string -*- linux-c -*- somewhere on the first
    two lines, this mode will be automatically invoked. Also, you may want
    to add

    (setq auto-mode-alist (cons '("/home/jon/.*/.*\\.[ch]$" . linux-c-mode)
                            auto-mode-alist))

It doesn't work when I execute linux-c-mode from the emacs command line either.

Any ideas at all what I am doing wrong? [ Apart from the ever so
constructive suggestion to use vi or vim - please! ]

jon.

  reply	other threads:[~2005-06-09  1:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 20:59 [PATCH] Tidy up some rev-list-related stuff Petr Baudis
2005-06-09  1:06 ` Jon Seymour [this message]
2005-06-09  9:57   ` Jon Seymour

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cfc4032050608180650e5ef12@mail.gmail.com \
    --to=jon.seymour@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jon@blackcubes.dyndns.org \
    --cc=pasky@ucw.cz \
    --cc=torvalds@osdl.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.