Re: Gnumeric Documentation styleguide



[Adrian Custer]

  This should be a non-issue. The fact that it remains an issue is,
  I believe due to emacs broken-ness. Indenting should be done with
  tabs, and users allowed to set how big they want their
  tabstops. The files themselves should have tab characters for
  indentation.

(stop tickling my hobby horse :)

This is fine, if you are very careful and only use TAB for the
baseline indentation.  Here's a C code example (I realize this problem
isn't so critical in SGML):

        fprintf (stderr, _("foo: %s is too big, please try again.\n"),
                 value);

It is very tempting to use two TABs and a space in the second line,
but it will screw up the indentation when you change the tab width to
something else than the standard 8.  Another example:

        char *          name;           /* actually filename */
        struct stat *   stat_buf;       /* useless comment */

Again, only the leading eight spaces should be replaced by a TAB, the
rest should be just spaces.

So, in theory, it could all work, but I know of no software which does
it right.  Neither GNU indent nor GNU Emacs will be suitably
conservative in their use of TAB.

  However, I have no idea how to make emacs use tabs instead of
  spaces. I know it can read them, I don't know if it can output
  them.

You can change the TAB width in Emacs using the variable tab-width.
It's buffer local, so you should set it in a hook.

-- 
Kjetil T.               abusing standards for the greater good
                        http://www.microsoft.com:products 3333866552/



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