Loading ...
Sorry, an error occurred while loading the content.

comma at end of line cause indent?

Expand Messages
  • cp200205
    I have code like: constant NAME=1, AGE=2, DOB=3 However, indenting is not working for it (my own mode). Indenting works for everything else, but I cannot seem
    Message 1 of 3 , Jun 22, 2008
    • 0 Attachment
      I have code like:

      constant NAME=1,
      AGE=2,
      DOB=3

      However, indenting is not working for it (my own mode). Indenting
      works for everything else, but I cannot seem to make the above work.
      Does anyone have any recipe for the above?

      Thank you,

      Jeremy
    • Jon Green
      ... There is nothing for the indent to work against as there is no indent character like { or ( so it simply defaults to an indent-width for a line
      Message 2 of 3 , Jun 22, 2008
      • 0 Attachment
        cp200205 wrote:
        > I have code like:
        >
        > constant NAME=1,
        > AGE=2,
        > DOB=3
        >
        > However, indenting is not working for it (my own mode). Indenting
        > works for everything else, but I cannot seem to make the above work.
        > Does anyone have any recipe for the above?
        >
        > Thank you,
        >
        > Jeremy

        There is nothing for the indent to work against as there is no indent
        character like '{' or '(' so it simply defaults to an indent-width for a
        line continuation (in your case I assume 4).

        I assume that you are expecting it to magically align vertically with
        NAME above? To do this then you would need a rule. Even 'C' indentation
        does what you have above unless there is a '(' in there for expressions.

        Jon.
      • Jeremy Cowgar
        ... Actually, all I want to do is a line continuation, that s all but I cannot seem to make it work correctly and am not finding an example except in
        Message 3 of 3 , Jun 22, 2008
        • 0 Attachment
          Quoting Jon Green <jon@...>:
          > cp200205 wrote:
          > > I have code like:
          > >
          > > constant NAME=1,
          > > AGE=2,
          > > DOB=3
          > >
          > > However, indenting is not working for it (my own mode). Indenting
          > > works for everything else, but I cannot seem to make the above work.
          > > Does anyone have any recipe for the above?
          > >
          > > Thank you,
          > >
          > > Jeremy
          >
          > There is nothing for the indent to work against as there is no indent
          > character like '{' or '(' so it simply defaults to an indent-width for a
          > line continuation (in your case I assume 4).
          >
          > I assume that you are expecting it to magically align vertically with
          > NAME above? To do this then you would need a rule. Even 'C' indentation
          > does what you have above unless there is a '(' in there for expressions.
          >

          Actually, all I want to do is a line continuation, that's all but I cannot
          seem to make it work correctly and am not finding an example except in
          hkruby.emf, but every time I add , to the list, it seems to mess quite a few
          things up.

          Jeremy
        Your message has been successfully submitted and would be delivered to recipients shortly.