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

2558Tcl indent problem?

Expand Messages
  • cp200205
    Sep 13, 2010
      I am having problems with the default Tcl mode indenting this code snippet correctly (periods prefixed for spacing of how MicroEmacs indents it:

      if { 1 } {
      ....puts hi
      } elseif { 2 } {
      ....set band [::db onecolumn {
      ............SELECT id FROM band WHERE freq=$freq
      ........}]
      ....}
      ....puts bad

      It has to do with the [ and { being on the same line. I've tried playing with the indentation some in the mode config but have failed to come up with a working solution. If I rewrite the above code to have [ and { on different lines, then the indentation works properly. The problem with doing this is the above syntax is very common, placing the [ and { on different lines is not and requires the use of an escape character \

      Thanks for any input,

      Jeremy Cowgar
    • Show all 3 messages in this topic