;ELC ;;; compiled by kwzh@psilocin.gnu.ai.mit.edu on Sun Jul 7 20:03:45 1996 ;;; from file /gd/gnu/emacs/19.0/lisp/tcl-mode.el ;;; emacs version 19.31.91.1. ;;; 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.29"))) (error "`tcl-mode.el' was compiled for Emacs 19.29 or later")) (require (quote comint)) #@54 Default tcl/tk application to run in tcl subprocess. (defvar tcl-default-application "wish" (#$ . 505)) #@78 Command switches for `tcl-default-application'. Should be a list of strings. (defvar tcl-default-command-switches nil (#$ . 615)) #@60 The active tcl subprocess corresponding to current buffer. (defvar tcl-process nil (#$ . 751)) #@71 Buffer used for communication with tcl subprocess for current buffer. (defvar tcl-process-buffer nil (#$ . 852)) #@68 *Non-nil means display tcl-process-buffer after sending a command. (defvar tcl-always-show t (#$ . -971)) #@28 Keymap used with tcl mode. (defvar tcl-mode-map nil (#$ . 1083)) #@35 Prefix for all tcl-mode commands. (defvar tcl-prefix-key "" (#$ . 1154)) #@38 Hooks called when tcl mode fires up. (defvar tcl-mode-hook nil (#$ . 1234)) #@48 Start of special region for tcl communication. (defvar tcl-region-start (make-marker) (#$ . 1316)) #@46 End of special region for tcl communication. (defvar tcl-region-end (make-marker) (#$ . 1421)) #@50 Amount by which tcl subexpressions are indented. (defvar tcl-indent-level 4 (#$ . 1522)) #@44 Default command used when sending regions. (defvar tcl-default-eval "eval" (#$ . 1617)) #@29 Keymap for tcl-mode's menu. (defvar tcl-mode-menu (make-sparse-keymap "Tcl-Mode") (#$ . 1711)) #@48 Default expressions to highlight in TCL modes. (defvar tcl-font-lock-keywords (quote (("\\<\\(itcl_class\\|method\\|proc\\)\\>[ ]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) "\\<\\(break\\|c\\(ase\\|on\\(structor\\|tinue\\)\\)\\|de\\(fault\\|structor\\)\\|e\\(lse\\(\\|if\\)\\|rror\\|val\\|xit\\)\\|for\\(\\|_\\(array_keys\\|file\\|recursive_glob\\)\\|each\\)\\|i\\([fn]\\|tcl_class\\)\\|loop\\|proc\\|return\\|switch\\|then\\|uplevel\\|while\\)\\>" ("\\<\\(common\\|global\\|inherit\\|p\\(rotected\\|ublic\\)\\|upvar\\)\\>" . font-lock-type-face))) (#$ . 1812)) #@73 Imenu generic expression for tcl-mode. See `imenu-generic-expression'. (defvar tcl-imenu-generic-expression (quote ((nil "^[ ]*proc[ ]+\\(\\(\\s_\\|\\sw\\)+\\)" 1))) (#$ . 2419)) #@84 Major mode for editing tcl scripts. The following keys are bound: \{tcl-mode-map}  (defalias 'tcl-mode #[nil " !L!L!!L!L!L!L!L!G ! !\"\"eb!!{L唃b!L`Wp!`X~ !C\" ~g=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 "# *" font-lock-defaults (tcl-font-lock-keywords nil nil ((95 . "w"))) imenu-generic-expression tcl-imenu-generic-expression 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 (#$ . 2607) 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 (#$ . 3671)]) #@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 (#$ . 4512)]) #@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 (#$ . 4920)]) #@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 (#$ . 5422) "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 (#$ . 5619) "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 (#$ . 6128) "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 (#$ . 6610)]) #@37 Kill tcl subprocess and its buffer. (defalias 'tcl-kill-process #[nil "!" [tcl-process-buffer kill-buffer] 2 (#$ . 6973) 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 (#$ . 7113) 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 (#$ . 7288) 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 (#$ . 7458) 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 (#$ . 7868) "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 (#$ . 8223) 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 (#$ . 8647) 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 (#$ . 9058) 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 (#$ . 9467) 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 (#$ . 9781) nil]) #@52 Make sure `tcl-process-buffer' is being displayed. (defalias 'tcl-show-process-buffer #[nil " !" [display-buffer tcl-process-buffer] 2 (#$ . 9998) nil]) #@55 Delete all windows that display `tcl-process-buffer'. (defalias 'tcl-hide-process-buffer #[nil " !" [delete-windows-on tcl-process-buffer] 2 (#$ . 10159) 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)