;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:52:11 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/tcl-mode.el ;;; emacs version 19.28.90.26. ;;; 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)) #@54 Default tcl/tk application to run in tcl subprocess. (defvar tcl-default-application "wish" (#$ . 510)) #@78 Command switches for `tcl-default-application'. Should be a list of strings. (defvar tcl-default-command-switches nil (#$ . 620)) #@60 The active tcl subprocess corresponding to current buffer. (defvar tcl-process nil (#$ . 756)) #@71 Buffer used for communication with tcl subprocess for current buffer. (defvar tcl-process-buffer nil (#$ . 857)) #@68 *Non-nil means display tcl-process-buffer after sending a command. (defvar tcl-always-show t (#$ . -976)) #@28 Keymap used with tcl mode. (defvar tcl-mode-map nil (#$ . 1088)) #@35 Prefix for all tcl-mode commands. (defvar tcl-prefix-key "" (#$ . 1159)) #@38 Hooks called when tcl mode fires up. (defvar tcl-mode-hook nil (#$ . 1239)) #@48 Start of special region for tcl communication. (defvar tcl-region-start (make-marker) (#$ . 1321)) #@46 End of special region for tcl communication. (defvar tcl-region-end (make-marker) (#$ . 1426)) #@50 Amount by which tcl subexpressions are indented. (defvar tcl-indent-level 4 (#$ . 1527)) #@44 Default command used when sending regions. (defvar tcl-default-eval "eval" (#$ . 1622)) #@29 Keymap for tcl-mode's menu. (defvar tcl-mode-menu (make-sparse-keymap "Tcl-Mode") (#$ . 1716)) #@84 Major mode for editing tcl scripts. The following keys are bound: \{tcl-mode-map}  (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 (#$ . 1817) nil]) #@165 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-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 (#$ . 2768)]) #@80 Indent current line as tcl code. Return the amount the indentation changed by. (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 (#$ . 3609)]) #@121 Return appropriate indentation for current line as tcl code. In usual case returns an integer: the column to indent to. (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 (#$ . 4017)]) #@37 Insert `}' and indent line for tcl. (defalias 'tcl-electric-brace #[(arg) " !\" " [insert-char 125 prefix-numeric-value arg tcl-indent-line blink-matching-open] 4 (#$ . 4515) "P"]) #@235 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. (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 (#$ . 4712) "P"]) #@225 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. (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 (#$ . 5221) "P"]) #@50 Start a tcl process named NAME, running PROGRAM. (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 (#$ . 5703)]) #@37 Kill tcl subprocess and its buffer. (defalias 'tcl-kill-process #[nil "!" [tcl-process-buffer kill-buffer] 2 (#$ . 6066) nil]) #@57 Set start of region for use with `tcl-send-tcl-region'. (defalias 'tcl-set-tcl-region-start #[(&optional arg) " `“" [tcl-region-start arg nil] 3 (#$ . 6206) nil]) #@55 Set end of region for use with `tcl-send-tcl-region'. (defalias 'tcl-set-tcl-region-end #[(&optional arg) " `“" [tcl-region-end arg nil] 3 (#$ . 6381) nil]) #@122 Send current line to tcl subprocess, found in `tcl-process'. If `tcl-process' is nil or dead, start a new process first. (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 (#$ . 6551) nil]) #@59 Send region to tcl subprocess, wrapped in `eval { ... }'. (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 (#$ . 6961) "r"]) #@70 Send preset tcl region to tcl subprocess, wrapped in `eval { ... }'. (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 (#$ . 7316) nil]) #@70 Send proc around point to tcl subprocess, wrapped in `eval { ... }'. (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 (#$ . 7740) nil]) #@65 Send whole buffer to tcl subprocess, wrapped in `eval { ... }'. (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 (#$ . 8151) nil]) #@75 Send string `set errorInfo' to tcl subprocess and display the tcl buffer. (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 (#$ . 8560) nil]) #@54 Restart tcl subprocess and send whole file as input. (defalias 'tcl-restart-with-whole-file #[nil " \n\" " [tcl-kill-process tcl-start-process tcl-default-application tcl-send-buffer] 3 (#$ . 8874) nil]) #@52 Make sure `tcl-process-buffer' is being displayed. (defalias 'tcl-show-process-buffer #[nil " !" [display-buffer tcl-process-buffer] 2 (#$ . 9091) nil]) #@55 Delete all windows that display `tcl-process-buffer'. (defalias 'tcl-hide-process-buffer #[nil " !" [delete-windows-on tcl-process-buffer] 2 (#$ . 9252) 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)