 
 (defun tcl-enhance-indentation () 
   ;; Fix the binding of TAB to the normal, std. value.
-  (define-key tcl-mode-map "\t" 'indent-for-tab-command)
+  (global-set-key [tab] 'indent-for-tab-command)
   (set (make-local-variable 'indent-line-function) 
        'tcl-indent-command-toggler)
   )
+(remove-hook 'tcl-mode-hook 'tcl-enhance-indentation)
 (add-hook 'tcl-mode-hook 'tcl-enhance-indentation)
 
 

;; 


(eval-and-compile ;; Required for Compilation:
  ;; Pre-eval these constants, which are referenced later on in this file
  ;; inside of an inner `eval-when-compile'.

  (defconst tcl-core-builtins
    '("expr" "exec" "source" "rename")
    "Some rather crucial builtins.  One could argue that they should be
keywords.  One could, however, never use one in a Tcl script, whereas it's
hard to write a Tcl script without a single 'set' in it.
{jpw: 6/05}")


  (defconst tcl-list-builtins
    '("list" "lappend" "lindex" "linsert" "llength"
      "lrange" "lreplace" "lsearch" "lset" "lsort")
    "Tcl builtins for list manipulation.
{jpw: 6/05}")


  (defconst tcl-text-builtins
    '("append" "concat" "join" "format" "scan" "split" "subst" "regexp"
      "regsub")
    "Tcl builtins for text manipulation.
{jpw: 6/05}")


  (defconst tcl-file-builtins
    '("glob" "cd" "pwd")
    "A smattering of file- and os-related Tcl builtins.  See also
`tcl-io-builtins'.
{jpw: 6/05}")


  (defconst tcl-io-builtins
    '("fcopy" "close" "eof" "fblocked" "fconfigure" "fileevent" "flush"
      "gets" "seek" "tell" "open" "puts" "read" "pid")
    "Tcl builtins for I/O.
{jpw: 6/05}")


  (defconst tclLib-all-builtins
    '("auto_execok" "auto_import" "auto_load" "auto_mkindex"
      "auto_mkindex_old" "auto_qualify" "auto_reset"
      "pkg_mkIndex"
      "parray"
      "tcl_endOfWord" "tcl_findLibrary" "tcl_startOfNextWord"
      "tcl_startOfPreviousWord" "tcl_wordBreakAfter" "tcl_wordBreakBefore"
      )
    "The proc's from the Tcl library of coding tools, which is included as part
of the language but aren't really keywords or builtins.
{jpw: 6/05}")


  (defconst tclLib-text-builtins
    '("parray"
      "tcl_endOfWord" "tcl_startOfNextWord"
      "tcl_startOfPreviousWord" "tcl_wordBreakAfter" "tcl_wordBreakBefore"
      )
    "A subset of `tclLib-all-builtins' used for text manipulation.  Also
includes 'parray', which is more of a coding swiss-army-knife than anything
else.
{jpw: 6/05}")


  (defconst tcl-misc-builtins
    '("bgerror" "dde" "msgcat"
      "resource" 
      "socket"
      "tcltest"
      "load" "time"
      "unknown" "update" "vwait")
    "Miscellaneous Tcl proc's and builtins.
{jpw: 6/05}")

  ;;
  ;; Enhanced Regexps for Font-Lock
  ;;

  ;; Not really needed; will handle separately.
  (defconst tcl-keywords-with-arg-re
    (eval-when-compile
      (regexp-opt '("namespace" "package"))
      )
    "Special keywords; they take a required arg, which is a known-constant.
{jpw: 6/05}")

  (defconst tcl-const-list-re
    (eval-when-compile
      (regexp-opt '("argc" "argv" "argv0" "errorCode" "env" "stderr" "stdin"
                    "stdout" "errorInfo" "tcl_library"
                    "tcl_patchLevel" "tcl_pkgPath"  "tcl_platform"
                    "tcl_precision" "tcl_traceCompile" "tcl_traceExec"
                    "tcl_version" 
                    "auto_execs" "auto_index" "auto_noexec" "auto_noload"
                    "auto_path"))
      )
    "Builtin Tcl constants/variables.
{jpw: 6/05}")

  (defconst tcl-builtins-with-arg-re
    (eval-when-compile
      (regexp-opt '("array" "info" "interp" "string" "trace" "binary"
                    "file" "clock"
                    ))
      )
    "Special builtins that require another keyword as their first arg.  Not
all of the basic Tcl builtins are included.  The following are intentionally omitted:
  - after
  - encoding

           '(3 'tcl-builtin-arg1-face t t))
     ) ;; end list
    ) ;; end eval-when-compile
  ) 
;; end setq

(defun tcl-enhance-font-lock ()
    (set (make-local-variable 'font-lock-defaults)
         (list
          (append tcl-font-lock-keywords tcl-font-lock-keywords-enhanced)
          nil nil '((?_ . "w") (?: . "w"))))
  )

;; Right now, I'm trying to preserve the std. tcl-mode behavior, rather than
