;ELC ;;; compiled by roland@churchy.gnu.ai.mit.edu on Fri Sep 2 03:00:26 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/tcl-mode.el ;;; emacs version 19.25.95.5. ;;; bytecomp version FSF 2.10 ;;; 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 "`/gd/gnu/emacs/19.0/lisp/tcl-mode.el' was compiled for Emacs 19")) (require (quote comint)) (defvar tcl-default-application "wish" "\ Default tcl/tk application to run in tcl subprocess.") (defvar tcl-default-command-switches nil "\ Command switches for `tcl-default-application'. Should be a list of strings.") (defvar tcl-process nil "\ The active tcl subprocess corresponding to current buffer.") (defvar tcl-process-buffer nil "\ Buffer used for communication with tcl subprocess for current buffer.") (defvar tcl-always-show t "\ *Non-nil means display tcl-process-buffer after sending a command.") (defvar tcl-mode-map nil "\ Keymap used with tcl mode.") (defvar tcl-prefix-key "" "\ Prefix for all tcl-mode commands.") (defvar tcl-mode-hook nil "\ Hooks called when tcl mode fires up.") (defvar tcl-region-start (make-marker) "\ Start of special region for tcl communication.") (defvar tcl-region-end (make-marker) "\ End of special region for tcl communication.") (defvar tcl-indent-level 4 "\ Amount by which tcl subexpressions are indented.") (defvar tcl-default-eval "eval" "\ Default command used when sending regions.") (defvar tcl-mode-menu (make-sparse-keymap "Tcl-Mode") "\ Keymap for tcl-mode's menu.") (defalias 'tcl-mode #[nil " !L!L!!L!L!L!: ! !\"\"eb!!{Lᔃb!L`Wp!`Xq !C\" qg=youh=u!!{Lᔃb!L`Wp!`X !C\" )!*" [nil s switches kill-all-local-variables tcl-mode major-mode "TCL" mode-name make-local-variable tcl-process tcl-process-buffer tcl-default-command-switches indent-line-function tcl-indent-line comment-start "#" comment-start-skip "\\(\\(^\\|;\\)[ ]*\\)#" tcl-default-eval tcl-mode-map tcl-setup-keymap use-local-map set-syntax-table copy-syntax-table modify-syntax-entry 35 "<" 10 ">" looking-at "#![ ]*\\([^ ]*\\)[ ]\\(.*[ ]\\)-f" tcl-default-application 1 2 read append prin1-to-string -1 92 "exec[ ]+\\([^ ]*\\)[ ]\\(.*[ ]\\)*-f" run-hooks tcl-mode-hook] 4 "\ Major mode for editing tcl scripts. The following keys are bound: \\{tcl-mode-map} " nil]) (defalias 'tcl-setup-keymap #[nil "  B#   ############### #)" [make-sparse-keymap tcl-mode-map define-key [menu-bar tcl-mode] "Tcl-Mode" tcl-mode-menu tcl-prefix-key map [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] 5 "\ Set up 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'."]) (defalias 'tcl-indent-line #[nil "!d`Zy`wg=A\nZ]u!˔˕|\nS\")iZU]d\nZ`Vrd\nZbr `|jd\nZ`Vrd\nZb\f-" [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."]) (defalias 'tcl-calculate-indentation #[(&optional parse-start) "` \n byo uh=D yo/\\@uh=?\\@\\u#} yo?`uh=)k\\lZg=xy\\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."]) (defalias 'tcl-electric-brace #[(arg) " !\" " [insert-char 125 prefix-numeric-value arg tcl-indent-line blink-matching-open] 4 "\ Insert `}' and indent line for tcl." "P"]) (defalias 'tcl-beginning-of-proc #[(&optional arg) "W!uW7#/TƉ >yV[#SS?Ɖ?\f*" [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 tcl 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"]) (defalias 'tcl-end-of-proc #[(&optional arg) "W\"n\"yg)=\"uV@#8S\"Ɖ#W^#VT@ƉA e\f*" [arg 1 nil t ret found 0 125 -1 re-search-forward "^}" re-search-backward] 5 "\ Move forward to next end of tcl 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"]) (defalias 'tcl-start-process #[(name program &optional startfile &rest switches) " \f %! 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."]) (defalias 'tcl-kill-process #[nil "!" [tcl-process-buffer kill-buffer] 2 "\ Kill tcl subprocess and its buffer." nil]) (defalias '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]) (defalias '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]) (defalias 'tcl-send-current-line #[nil "y`)`)\f\f!= \"\f \n{\"y 3 !*" [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 subprocess, found in `tcl-process'. If `tcl-process' is nil or dead, start a new process first." nil]) (defalias 'tcl-send-region #[(start end) "\n\n!\f\" {R\" %\n!" [tcl-process comint-check-proc tcl-process-buffer tcl-start-process tcl-default-application comint-simple-send tcl-default-eval " {\n" start end "\n}" tcl-always-show display-buffer] 6 "\ Send region to tcl subprocess, wrapped in `eval { ... }'." "r"]) (defalias 'tcl-send-tcl-region #[nil " \f!\f!\"\f\n {R\" 2!" [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 tcl-default-eval " {\n" "\n}" tcl-always-show display-buffer] 6 "\ Send preset tcl region to tcl subprocess, wrapped in `eval { ... }'." nil]) (defalias 'tcl-send-proc #[nil " ` `) !! \"  \n {R\"6!*" [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 tcl-default-eval " {\n" "\n}" tcl-always-show display-buffer] 6 "\ Send proc around point to tcl subprocess, wrapped in `eval { ... }'." nil]) (defalias 'tcl-send-buffer #[nil "\n\n!\f\" #ed{R\", Q\" 4\n!" [tcl-process comint-check-proc tcl-process-buffer tcl-start-process tcl-default-application buffer-modified-p comint-simple-send tcl-default-eval " {\n" "\n}" "source " buffer-file-name "\n" tcl-always-show display-buffer] 6 "\ Send whole buffer to tcl subprocess, wrapped in `eval { ... }'." nil]) (defalias 'tcl-get-error-info #[nil "\n\n!\f\"\"\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 subprocess and display the tcl buffer." nil]) (defalias 'tcl-restart-with-whole-file #[nil " \n\" " [tcl-kill-process tcl-start-process tcl-default-application tcl-send-buffer] 3 "\ Restart tcl subprocess and send whole file as input." nil]) (defalias 'tcl-show-process-buffer #[nil " !" [display-buffer tcl-process-buffer] 2 "\ Make sure `tcl-process-buffer' is being displayed." nil]) (defalias 'tcl-hide-process-buffer #[nil " !" [delete-windows-on tcl-process-buffer] 2 "\ Delete all windows that display `tcl-process-buffer'." nil]) (byte-code " # # # # # # # # # # # # # #!" [define-key tcl-mode-menu [restart-with-whole-file] ("Restart With Whole File" . tcl-restart-with-whole-file) [kill-process] ("Kill Process" . tcl-kill-process) [hide-process-buffer] ("Hide Process Buffer" . tcl-hide-process-buffer) [get-error-info] ("Get Error Info" . tcl-get-error-info) [show-process-buffer] ("Show Process Buffer" . tcl-show-process-buffer) [end-of-proc] ("End Of Proc" . tcl-end-of-proc) [beginning-of-proc] ("Beginning Of Proc" . tcl-beginning-of-proc) [send-tcl-region] ("Send Tcl-Region" . tcl-send-tcl-region) [set-tcl-regio-end] ("Set Tcl-Region End" . tcl-set-tcl-region-end) [set-tcl-region-start] ("Set Tcl-Region Start" . tcl-set-tcl-region-start) [send-current-line] ("Send Current Line" . tcl-send-current-line) [send-region] ("Send Region" . tcl-send-region) [send-proc] ("Send Proc" . tcl-send-proc) [send-buffer] ("Send Buffer" . tcl-send-buffer) provide tcl-mode] 4)