   (unless comment-end-skip
     (set (make-local-variable 'comment-end-skip) 
          "[ 	]*\\(\\s>\\|\n\\)"))
+
+  ;; Configure paragraph start/separate vars
+  (make-local-variable 'paragraph-start)
+  (make-local-variable 'paragraph-separate)
+  (setq paragraph-start  "[ 	]*\\(#[ 	]*\\)?$\\|^\f"
+        paragraph-separate paragraph-start)
   )
 (remove-hook 'tcl-mode-hook 'tcl-enhance-indentation)
 (add-hook 'tcl-mode-hook 'tcl-enhance-indentation)

  "Enhanced indentation for TCL code.
{jpw: 7/06}"
  (interactive "p")
  (case (save-excursion (back-to-indentation)
                        (following-char))
    ;; Comment Case 
    ('?#
     (jpw-tcl-indent-comment)
     ) ;; end Comment Case
    ('?}
     (message "Is block end")
;;     (if (looking-at "} +{")
;;         (jpw-indent-to-matching-brace)
       ;;else
       (tcl-indent-command arg)
;;       )
     ) ;; end block-close case
    ;; Default
    (t
     (tcl-indent-command arg)
     ) ;; end default case
    ) ;; end case
  )



  :group 'tcl)


;;:type:
  ;; One of: integer, number, string, regexp, character, hook,
  ;;         symbol, function, variable, boolean


(defcustom jpw-tcl-allow-comment-unindent t
  "When set to non-nil, allows the function `jpw-tcl-comment-indent-command'
to \"indent backward\".  By default, `jpw-tcl-comment-indent-command' ignores
comments with internal indentation deeper than the previous line.
{jpw: 7/06}"
  :type '(boolean variable)
  :group 'tcl)


(defcustom jpw-tcl-align-for-loop-braces nil
  "Used to control indentation of a TCL for-loop written in a certain style.

When writing complex TCL for-loops, some people like to put the body of each
clause on its own line, placing the separating \"} {\" on a line by itself.
Setting `jpw-tcl-align-for-loop-braces' to non-nil will align those close-open
braces like so:

    for { 
            ...
        } {
            ...
        } {
            ...
        } {
        :
        :
    }

Otherwise, indentation of the  \"} {\" lines is controlled by
`jpw-tcl-for-loop-bracepair-offset'.
{jpw: 7/06}"
  :type '(boolean variable)
  :group 'tcl)


(defcustom jpw-tcl-for-loop-bracepair-offset 0
  "Used to control indentation of a TCL for-loop written in a certain style.

This is the other way of controlling  complex TCL for-loops writtne in the
style described by `jpw-tcl-align-for-loop-braces'.  When
`jpw-tcl-align-for-loop-braces' is nil, the enhanced indenation engine will
align each \"} {\" line with the \"for\" statement\(1\), plus an additional
offset specified by this variable.  The default is 0, which means align with
the \"for\" statement\(1\).

If, for example, you set this to 2, your for-loop would look like this:

    for { 
          ...
      } {
          ...
      } {
          ...
      } {
        :
        :
    }

Otherwise, indentation of the \"} {\" lines is controlled by
`jpw-tcl-for-loop-bracepair-offset'.

\(1\) Well, this is *almost* true.  It really aligns the \"} {\" lines with the
*line* containing the \"for\" command.  Usually, though, the  \"for\" command
is the first thing on the line.
{jpw: 7/06}"
  :type '(integer variable)
  :group 'tcl)


(defcustom jpw-tcl-align-to-arg t
  "When indending, how to align continued statements enclosed in a \[ ... \]
pair.  When non-nil, aligns to the first word after the command in the
\[ ... \].  Otherwise, let `tcl-mode' do the indendation.
{jpw: 7/06}"
  :type '(boolean variable)
  :group 'tcl)


