;ELC   
;;; compiled by jwz@thalidomide on Wed Dec  1 01:01:55 1993
;;; from file /th/jwz/emacs19/lisp/modes/tcl-mode.el
;;; emacs version 19.9 Lucid.
;;; bytecomp version 2.20; 20-oct-93.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "This file was compiled for Emacs 19."))

(require 'comint)
(defvar tcl-default-application "wish" "\
Default tcl/tk application to run in tcl-start-process")
(defvar tcl-default-command-switches nil "\
Command switches sfor tcl-default-application.
Should be a list of strings.")
(defvar tcl-process nil "\
Holds the current active tcl-process corresponding to current buffer.")
(defvar tcl-process-buffer nil "\
Buffer that holds tcl process associated with current buffer.")
(defvar tcl-always-show t "\
Make sure tcl-process-buffer is displayed after sending somethimg.")
(defvar tcl-mode-map nil "\
Keymap used with tcl-mode.")
(defvar tcl-prefix-key "t" "\
Prefix for all tcl-commands.")
(defvar tcl-mode-hook nil "\
Hooks called when tcl-mode fires up.")
(defvar tcl-region-start (make-marker) "\
Start of special region for communication.")
(defvar tcl-region-end (make-marker) "\
End of special region for communication.")
(defvar tcl-indent-level 4 "\
Amount by which tcl subexpressions are indented.")
(fset 'tcl-mode #[nil " !L!L!!L!L!L !\"\"eb!!۔ە{L)!" [kill-all-local-variables tcl-mode major-mode "TCL" mode-name make-local-variable tcl-process nil tcl-process-buffer tcl-default-command-switches indent-line-function tcl-indent-line comment-start "#" comment-start-skip "\\(\\(^\\|;\\)[ 	]*\\)#" tcl-mode-map tcl-setup-keymap use-local-map modify-syntax-entry 35 "<" 10 ">" looking-at "#![ 	]*\\([^ 	]*\\)[ 	]+-f" tcl-default-application 1 run-hooks tcl-mode-hook] 3 "\
Major mode for editing tcl-scripts.
The following keys are bound:
\\{tcl-mode-map}
" nil])
(fset 'tcl-setup-keymap #[nil " \n 		#	###############\n	\n#)" [make-sparse-keymap tcl-mode-map tcl-prefix-key map define-key [delete] backward-delete-char-untabify [125] tcl-electric-brace "" tcl-send-current-line "" tcl-send-region "" tcl-send-proc "" tcl-send-buffer "" tcl-kill-process "" tcl-restart-with-whole-file "" tcl-show-process-buffer "" tcl-hide-process-buffer "" tcl-get-error-info "" tcl-beginning-of-proc "" tcl-end-of-proc "" tcl-set-tcl-region-start "" tcl-set-tcl-region-end "" tcl-send-tcl-region] 4 "\
Setup keymap for `tcl-mode'.
If the variable `tcl-prefix-key' is nil, the bindings go directly
to `tcl-mode-map', otherwise they are prefixed with `tcl-prefix-key'."])
(fset 'tcl-indent-line #[nil "!d`Zy`wg=\nZ]u!j˔˕|\nS\"[)iZUd\nZ`Vd\nZb`|jd\nZ`Vd\nZb-" [tcl-calculate-indentation nil pos case-fold-search shift-amt beg indent 0 " 	" 125 tcl-indent-level 1 looking-at "\\([ 	]*\\)}" insert-char 32] 7 "\
Indent current line as tcl code.
Return the amount the indentation changed by."])
(fset 'tcl-calculate-indentation #[(&optional parse-start) "`		byo uh= yo\\uh=\\\\u# yo?uh=)\\Zg=\\byy *" [pos parse-start 0 current-indentation -1 92 tcl-indent-level 1 re-search-backward "\\(^[^ 	\n]\\)\\|\\({\\s *\n\\)\\|\\(}\\s *\n\\)" nil t 123] 4 "\
Return appropriate indentation for current line as tcl code.
In usual case returns an integer: the column to indent to."])
(fset 'tcl-electric-brace #[(arg) "!\"  " [insert-char 125 prefix-numeric-value arg tcl-indent-line blink-matching-open] 4 "\
Insert `}' and indent line." "P"])
(fset 'tcl-beginning-of-proc #[(&optional arg) "W!uW#TmƉgyV#SoƉh*" [arg 1 nil t ret found 0 looking-at "^[^ 	\n#][^\n]*{[ 	]*$" re-search-forward re-search-backward] 5 "\
Move backward to the beginning of a proc (or similar).
With argument, do it that many times.  Negative arg -N
means move forward to Nth following beginning of proc.
Returns t unless search stops due to beginning or end of buffer." "P"])
(fset 'tcl-end-of-proc #[(&optional arg) "Wnyg)=uV#SmƉgW#TmƉg*" [arg 1 nil t ret found 0 125 -1 re-search-forward "^}" re-search-backward] 5 "\
Move forward to next end of proc (or similar).  With argument,
do it that many times. Negative argument -N means move back to Nth
preceding end of proc.

This function just searches for a `}' at the beginning of a line." "P"])
(fset 'tcl-start-process #[(name program &optional startfile &rest switches) "	%!	qʉ)" [switches tcl-default-command-switches apply make-comint name program startfile tcl-process-buffer get-buffer-process tcl-process "^[^% ]*%\\( %\\)* *" comint-prompt-regexp] 6 "\
Start a tcl process named NAME, running PROGRAM."])
(fset 'tcl-kill-process #[nil "!" [tcl-process-buffer kill-buffer] 2 "\
Kill tcl-process and tcl-process-buffer." nil])
(fset 'tcl-set-tcl-region-start #[(&optional arg) "	`" [tcl-region-start arg nil] 3 "\
Set start of region for use with `tcl-send-tcl-region'." nil])
(fset 'tcl-set-tcl-region-end #[(&optional arg) "	`" [tcl-region-end arg nil] 3 "\
Set end of region for use with `tcl-send-tcl-region'." nil])
(fset 'tcl-send-current-line #[nil "y`)`)!=\"\n{\"y!*" [0 nil end start tcl-process process-status run tcl-start-process tcl-default-application comint-simple-send 1 tcl-always-show display-buffer tcl-process-buffer] 4 "\
Send current line to `tcl-process'.
If `tcl-process' is nil or dead, start a new process first." nil])
(fset 'tcl-send-region #[(start end) "\n!\"{Q\"\n\n!" [tcl-process comint-check-proc tcl-process-buffer tcl-start-process tcl-default-application comint-simple-send "eval {\n" start end "\n}" tcl-always-show display-buffer] 5 "\
Send region to tcl `process' wrapped in eval { <region-data> }." "r"])
(fset 'tcl-send-tcl-region #[nil "	!!\"	{Q\"!" [tcl-region-start tcl-region-end error "tcl-region not set" tcl-process comint-check-proc tcl-process-buffer tcl-start-process tcl-default-application comint-simple-send "eval {\n" "\n}" tcl-always-show display-buffer] 5 "\
Send tcl-region to tcl `process' wrapped in eval { <region-data> }." nil])
(fset 'tcl-send-proc #[nil " ` `)!	\"\n	{Q\"!*" [nil end beg tcl-beginning-of-proc tcl-end-of-proc tcl-process comint-check-proc tcl-process-buffer tcl-start-process tcl-default-application comint-simple-send "eval {\n" "\n}" tcl-always-show display-buffer] 5 "\
Send proc around point to tcl `process' wrapped in
`eval { <proc> }'." nil])
(fset 'tcl-send-buffer #[nil "\n!\" ed{Q\" Q\"\n!" [tcl-process comint-check-proc tcl-process-buffer tcl-start-process tcl-default-application buffer-modified-p comint-simple-send "eval {\n" "\n}" "source " buffer-file-name "\n" tcl-always-show display-buffer] 5 "\
Send region to tcl `process' wrapped in eval { <region-data> }." nil])
(fset 'tcl-get-error-info #[nil "\n!\"\"\n!" [tcl-process comint-check-proc tcl-process-buffer tcl-start-process tcl-default-application comint-simple-send "set errorInfo\n" display-buffer] 3 "\
Send string \"set errorInfo\" to tcl-process and display
tcl-process-buffer." nil])
(fset 'tcl-restart-with-whole-file #[nil " \n\" " [tcl-kill-process tcl-start-process tcl-default-application tcl-send-buffer] 3 "\
Restart tcl-process and send whole file as input." nil])
(fset 'tcl-show-process-buffer #[nil "	!" [display-buffer tcl-process-buffer] 2 "\
Make sure tcl-process-buffer is being displayed." nil])
(fset 'tcl-hide-process-buffer #[nil "	!" [delete-windows-on tcl-process-buffer] 2 "\
Delete all windows that display tcl-process-buffer." nil])
