;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:52:21 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/terminal.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`terminal.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303\304\305\306\307%\207" [require ehelp custom-declare-group terminal nil "Terminal emulator for Emacs." :group terminals] 6)
#@336 *All characters except for this are passed verbatim through the
terminal-emulator.  This character acts as a prefix for commands
to the emulator program itself.  Type this character twice to send
it through the emulator.  Type ? after typing it for a list of
possible commands.
This variable is local to each terminal-emulator buffer.
(custom-declare-variable 'terminal-escape-char '30 '(#$ . -776) :type 'character :group 'terminal)
#@228 *If non-nil, the terminal-emulator will losingly `scroll' when output occurs
past the bottom of the screen.  If nil, output will win and `wrap' to the top
of the screen.
This variable is local to each terminal-emulator buffer.
(custom-declare-variable 'terminal-scrolling 't '(#$ . -1217) :type 'boolean :group 'terminal)
#@91 *If non-nil, do more-processing.
This variable is local to each terminal-emulator buffer.
(custom-declare-variable 'terminal-more-processing 't '(#$ . -1545) :type 'boolean :group 'terminal)
#@240 *Maximum number of characters which will be processed by the
terminal-emulator before a screen redisplay is forced.
Set this to a large value for greater throughput,
set it smaller for more frequent updates but overall slower
performance.
(custom-declare-variable 'terminal-redisplay-interval '5000 '(#$ . -1743) :type 'integer :group 'terminal)
(byte-code "\301B\306\301!\204\f \307\302B\306\302!\204 \310\n\204( \311 \312\313\314#\210)\304B\306\304!\2044 \310\f\204P \311 \312\315\314#\210\312\316\317#\210\312\320\n#\210)\305B\306\305!\204\\ \310\204\314 \311 \312\321\322#\210\323@@\324H\325X\203\211 \312@\326#\210@\324@\324HTI\210\202l )\312\327\330#\210\312\331\332#\210\312\333\334#\210\312\335\336#\210\312\337\340#\210\312\341\342#\210\312\343\344#\210\312\345\346#\210\312\347\350#\210\312\351A!\350#\210)\352B\306\352!\204\331 \310**\204\341 \353*\354B\306\354!\204\356 \310,,\204!\311 \312\355\356#\210\312\351A!\357#\210\312\360\361#\210\312\335\336#\210\312\337\362#\210\312\363\364#\210,)\365B\306\365!\204.\3105\366B\306\366!\204;\3106\367B\306\367!\204H\3107\370B\306\370!\204U\3108\371B\306\371!\204b\3109\372B\306\372!\204o\310:\373B\306\373!\204|\310;\374B\375B\306\375!\204\215\310=\376B\306\376!\204\232\310>\377B\306\377!\204\247\310?\201B B\306\201B !\204\270\310B\201C B\306\201C !\204\311\310C\310\207" [current-load-list terminal-more-break-insertion terminal-meta-map map terminal-map terminal-escape-map boundp "*** More break -- Press space to continue ***" nil make-sparse-keymap define-key [t] te-pass-through [t] [switch-frame] handle-switch-frame "" [t] undefined "0" 0 57 digit-argument "b" switch-to-buffer "o" other-window "e" te-set-escape-char "\f" redraw-display "" te-flush-pending-output "m" te-toggle-more-processing "x" te-escape-extended-command "w" te-edit "?" te-escape-help char-to-string te-escape-command-alist (("Set Escape Character" . te-set-escape-char) ("Edit" . te-edit) ("Refresh" . redraw-display) ("Record Output" . te-set-output-log) ("Photo" . te-set-output-log) ("Tofu" . te-tofu) ("Stuff Input" . te-stuff-string) ("Flush Pending Output" . te-flush-pending-output) ("Enable More Processing" . te-enable-more-processing) ("Disable More Processing" . te-disable-more-processing) ("Scroll at end of page" . te-do-scrolling) ("Wrap at end of page" . te-do-wrapping) ("Switch To Buffer" . switch-to-buffer) ("Other Window" . other-window) ("Kill Buffer" . kill-buffer) ("Help" . te-escape-help) ("Set Redisplay Interval" . te-set-redisplay-interval)) terminal-more-break-map [t] te-more-break-unread te-more-break-help " " te-more-break-resume te-more-break-flush-pending-output "" te-more-break-advance-one-line te-process te-log-buffer te-height te-width te-more-count te-redisplay-count te-pending-output te-saved-point te-more-old-point te-more-old-local-map te-more-old-filter s help-char te-more-old-mode-line-format te-pending-output-info] 4)
#@51 Prefix used for terminal type names for Terminfo.
(defconst te-terminal-name-prefix "emacs-em" (#$ . 4776))
#@69 Directory used for run-time terminal definition files for Terminfo.
(defconst te-terminfo-directory (byte-code "\301\302\303\"!\207" [temporary-file-directory file-name-as-directory expand-file-name "emacs-terminfo"] 4) (#$ . 4890))
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list te-terminal-name boundp nil] 2)
(defalias 'te-escape #[nil "\306\307 \310 \311\216\312!\210\313!\210\314\f\203  \315\316\317\f!\"\202! \320!)\321\322!\210\n;\203A \n\323\324\"\230\203A \325\326 )\202M \327\n\"\211\205M \330\n!+\207" [global local s terminal-escape-map current-prefix-arg terminal-escape-char nil current-local-map current-global-map ((byte-code "\302!\210\303	!\207" [global local use-global-map use-local-map] 2)) use-global-map use-local-map read-key-sequence format "Emacs Terminal escape> %d " prefix-numeric-value "Emacs Terminal escape> " message "" make-string 1 -259 te-pass-through lookup-key call-interactively last-command-char] 5 nil nil])
#@73 Provide help on commands available after terminal-escape-char is typed.
(defalias 'te-escape-help #[nil "\302\303!\210\304!\305\306!)\207" [terminal-escape-char char message "Terminal emulator escape help..." single-key-description with-electric-help #[nil "\305\306\307\211\211\211%!\210\305\310\311!!\210\305\306\312\313\314	\315#\314#!\210\316\317!\203+ \317\320\n!\321\"\2021 \322\320\n!\323\"\211\203k \324@A!\206? \325\326\327\f\"\203M \f\330\211\224O\305\331!\210\305@@!\210\305\332!\210\305\f!\210\333\334!\210)A\211\2046 )\335\207" [char terminal-escape-map te-escape-command-alist l doc princ format "Terminal-emulator escape, invoked by \"%s\"\nType \"%s\" twice to send a single \"%s\" through.\n\nOther chars following \"%s\" are interpreted as follows:\n" substitute-command-keys "\\{terminal-escape-map}\n" "\nSubcommands of \"%s\" (%s)\n" where-is-internal te-escape-extended-command t fboundp sortcar copy-sequence string< sort #[(a b) "@	@\231\207" [a b] 2] documentation "Not documented" string-match "\n" 0 "  \"" "\":\n     " write-char 10 nil] 8]] 2 (#$ . 5882) nil])
(defalias 'te-escape-extended-command #[nil "\303\304\305	\306\303$)\211\205 \307\310\215)\207" [completion-ignore-case te-escape-command-alist c t completing-read "terminal command: " nil foo (byte-code "\227	\n\205& \n@@\227\230\203 \303\304\305\n@A!\"\210\202 \nA\211\204	 \306)\207" [c te-escape-command-alist l throw foo call-interactively nil] 5)] 6 nil nil])
(defalias 'te-escape-extended-command-unread #[nil "\301\302 !\303 \207" [unread-command-events listify-key-sequence this-command-keys te-escape-extended-command] 2 nil nil])
#@48 Change the terminal-emulator escape character.
(defalias 'te-set-escape-char #[(c) "\303	\nU\203 \304\202 \305\306\n!\306	!#\210\n\211)\207" [terminal-escape-char o c message "\"%s\" is the escape char" "\"%s\" is now the escape; \"%s\" passes through" single-key-description] 5 (#$ . 7541) "cSet escape character to: "])
#@151 Read a string to send to through the terminal emulator
as though that string had been typed on the keyboard.

Very poor man's file transfer protocol.
(defalias 'te-stuff-string #[(string) "\302	\"\207" [te-process string process-send-string] 3 (#$ . 7875) "sStuff string: "])
#@55 Record output from the terminal emulator in a buffer.
(defalias 'te-set-output-log #[(name) "\203\n \302\232\203 \303\304\305!\207\306!\204' \212\307!q\210\310 \210\311p!\210\312 \210)\306!\304\313\314	!\"\207" [name te-log-buffer "" nil message "Output logging off." get-buffer get-buffer-create fundamental-mode buffer-disable-undo erase-buffer "Recording terminal emulator output into buffer \"%s\"" buffer-name] 4 (#$ . 8158) (list (if te-log-buffer nil (read-buffer "Record output in buffer: " (format "%s output-log" (buffer-name (current-buffer))) nil)))])
#@25 Discontinue output log.
(defalias 'te-tofu #[nil "\300\301!\207" [te-set-output-log nil] 2 (#$ . 8736) nil])
(defalias 'te-toggle #[(sym arg) "	\247\204\n 	\202! 	\302U\203 J?\202! 	\303W\203  \304\202! \305L\207" [sym arg 1 0 nil t] 3])
(defalias 'te-toggle-more-processing #[(arg) "\303\304\301\"\203\f \305\202 \306!\210	\205 \307\211\207" [arg terminal-more-processing te-more-count message te-toggle "More processing on" "More processing off" -1] 4 nil "p"])
(defalias 'te-toggle-scrolling #[(arg) "\301\302\303\"\203\f \304\202 \305!\207" [arg message te-toggle terminal-scrolling "Scroll at end of page" "Wrap at end of page"] 4 nil "p"])
#@30 Enable ** MORE ** processing
(defalias 'te-enable-more-processing #[nil "\300\301!\207" [te-toggle-more-processing t] 2 (#$ . 9397) nil])
#@31 Disable ** MORE ** processing
(defalias 'te-disable-more-processing #[nil "\300\301!\207" [te-toggle-more-processing nil] 2 (#$ . 9541) nil])
#@30 Scroll at end of page (yuck)
(defalias 'te-do-scrolling #[nil "\300\301!\207" [te-toggle-scrolling t] 2 (#$ . 9689) nil])
#@38 Wrap to top of window at end of page
(defalias 'te-do-wrapping #[nil "\300\301!\207" [te-toggle-scrolling nil] 2 (#$ . 9817) nil])
#@202 Set the maximum interval (in output characters) between screen updates.
Set this number to large value for greater throughput,
set it smaller for more frequent updates (but overall slower performance.
(defalias 'te-set-redisplay-interval #[(arg) "\303]\211\304\211\207" [arg terminal-redisplay-interval te-redisplay-count 1 0] 3 (#$ . 9955) "NMax number of output chars between redisplay updates: "])
(put 'te-more-break-unread 'suppress-keymap t)
(defalias 'te-more-break-unread #[nil "	=\203\n \304\305!\207\306\307\310!\311 #\210\312\313 \210\314\315 )\207" [last-input-char terminal-escape-char te-more-count terminal-more-processing call-interactively te-escape message "Continuing from more break (\"%s\" typed, %d chars output pending...)" single-key-description te-pending-output-length 259259 te-more-break-unwind nil te-pass-through] 4 nil nil])
#@77 Proceed past the **MORE** break,
allowing the next page of output to appear
(defalias 'te-more-break-resume #[nil "\300\301!\210\302 \207" [message "Continuing from more break" te-more-break-unwind] 2 (#$ . 10825) nil])
#@74 Provide help on commands available in a terminal-emulator **MORE** break
(defalias 'te-more-break-help #[nil "\300\301!\210\302\303!\210\304\305!\207" [message "Terminal-emulator more break help..." sit-for 0 with-electric-help #[nil "\301\302!\210\301\303\304\305\306\307#\310\306!#!\210\301\311\312!!\210\301\313!\210\314\207" [terminal-more-break-map princ "Terminal-emulator more break.\n\n" format "Type \"%s\" (te-more-break-resume)\n%s\n" where-is-internal te-more-break-resume t documentation substitute-command-keys "\\{terminal-more-break-map}\n" "Any other key is passed through to the program\nrunning under the terminal emulator and disables more processing until\nall pending output has been dealt with." nil] 7]] 2 (#$ . 11051) nil])
#@75 Allow one more line of text to be output before doing another more break.
(defalias 'te-more-break-advance-one-line #[nil "\301\302 \207" [te-more-count 1 te-more-break-unwind] 1 (#$ . 11807) nil])
#@129 Discard any output which has been received by the terminal emulator but
not yet processed and then proceed from the more break.
(defalias 'te-more-break-flush-pending-output #[nil "\300 \210\301 \207" [te-more-break-unwind te-flush-pending-output] 1 (#$ . 12013) nil])
#@89 Discard any as-yet-unprocessed output which has been received by
the terminal emulator.
(defalias 'te-flush-pending-output #[nil "A\204	 \302\303!\207\304 \302\305	\"\210\306\307\310	\"D\311 \210\312\313!\210\314\306!)\207" [te-pending-output length message "(There is no output pending)" te-pending-output-length "Flushing %d chars of pending output" 0 format "\n*** %d chars of pending output flushed ***\n" te-update-pending-output-display te-process-output nil sit-for] 4 (#$ . 12288) nil])
#@198 Character is passed to the program running under the terminal emulator.
One characters is treated specially:
the terminal escape character (normally C-^)
lets you type a terminal emulator command.
(defalias 'te-pass-through #[nil "	=\203\n \305\306!\2079\203 \307N\203 \307N\250\203. \310\311\312\"!\204. \311\313\"\314\\\250\203L \n\203@ A\204@ \315\316!\210\317\f\320\321\"\"\210\322\323!\207\324\325\326!\"\207" [last-input-char terminal-escape-char terminal-more-processing te-pending-output te-process call-interactively te-escape ascii-character zerop logand -134217728 127 128 te-set-more-count nil send-string make-string 1 te-process-output t message "Function key `%s' ignored" single-key-description] 5 (#$ . 12793) nil])
(defalias 'te-set-window-start #[nil "\303p!\211\205 \304!?\206= 	`eZ\nT\245Y\203# \305e\"\202= 	d`Z\nT\245Y\203< \305d	\nT_Z\306Z\"\202= \307*\207" [w h te-width get-buffer-window window-height set-window-start -1 nil] 6])
(defalias 'te-pending-output-length #[nil "@A	\203 \n	@G\\	A\211\204\n \n*\207" [te-pending-output tem length] 3])
(byte-code "\301B\302\301!\204\f \303	\204 \304 \305	\306\307#\210\310\311\312\313#\207" [current-load-list terminal-edit-map boundp nil make-sparse-keymap define-key "" terminal-cease-edit put terminal-edit-mode mode-class special] 4)
#@227 Major mode for editing the contents of a terminal-emulator buffer.
The editing commands are the same as in Fundamental mode,
together with a command \<terminal-edit-map>to return to terminal emulation: \[terminal-cease-edit].
(defalias 'terminal-edit-mode #[nil "\305!\210\306\307\310\303!\311\312\313!\207" [terminal-edit-map major-mode mode-name mode-line-modified mode-line-process use-local-map terminal-edit-mode "Terminal Edit" default-value nil run-hooks terminal-edit-mode-hook] 2 (#$ . 14144)])
#@74 Start editing the terminal emulator buffer with ordinary Emacs commands.
(defalias 'te-edit #[nil "\300 \210\301 \210\302\303!\304=\203 \305\306!\207\305\307\310\311!\"\207" [terminal-edit-mode force-mode-line-update key-binding "" terminal-cease-edit message "Editing: Type C-c C-c to return to Terminal" "%s" substitute-command-keys "Editing: Type \\[terminal-cease-edit] to return to Terminal"] 4 (#$ . 14659) nil])
#@57 Finish editing message; switch back to Terminal proper.
(defalias 'terminal-cease-edit #[nil "\306~\210\307 	\nSeb\210\310Y\203\214 `\311\312\f\\\313#\2036 \314u\210\315\316\f`ZZ\"\210\317u\210\202l m\203G \315\316\f`ZZ\"\210\202l g\320U\203S \317u\210\202l `\311\312\306\321#\203g `S|\210\202l d|\210)\310U\203~ m\204\205 `d|\210\202\205 m\203\205 \320c\210S\211\202 b\210\306\211\223\210`\310\314,\322\323!\324!\210\325\326\327\211\207" [buffer-read-only te-width te-height h width opoint nil point-marker 0 search-forward "\n" move -1 insert-char 32 1 10 t default-value mode-line-modified use-local-map terminal-mode "terminal" (":%s") p te-saved-point te-redisplay-count te-more-count terminal-map major-mode mode-name mode-line-process] 6 (#$ . 15087) nil])
(defalias 'te-more-break #[nil "\306\307!\210\310\300!\210`\310\301!\210\311 \312\n!\210\310\304!\210\313!\310\314!\210\f\315\316E\317\320\"\210\321 \210\322\323 !p=\203? \324\325!\210m\204X \203X \212\326u\210``\\|\210c\210)\327\330!\210\331\332!\210\333\334\307\"\207" [te-more-old-point te-more-old-local-map terminal-more-break-map te-process te-more-old-filter mode-line-format te-set-more-count t make-local-variable current-local-map use-local-map process-filter te-more-old-mode-line-format "--   **MORE**  " "%-" set-process-filter #[(process string) "\212\303!q\210	\nC\244)\304 \207" [process te-pending-output string process-buffer te-update-pending-output-display] 2] te-update-pending-output-display window-buffer selected-window message "More break " 1 run-hooks terminal-more-break-hook sit-for 0 throw te-process-output mode-line-buffer-identification terminal-more-break-insertion te-width] 3])
(defalias 'te-more-break-unwind #[nil "\306!\210\307	\n\"\210b\210\f\310 \210\311m\2041 \2031 \312u\210``G\\|\210\313\314\"\210b\210\311\315\316 \210*\317\320!\207" [te-more-old-local-map te-process te-more-old-filter te-more-old-point te-more-old-mode-line-format mode-line-format use-local-map set-process-filter force-mode-line-update nil 1 insert-char 32 259259 te-newline te-process-output t buffer-read-only terminal-more-break-insertion te-width te-more-count] 3])
(defalias 'te-set-more-count #[(newline) "`eZT\245\n\203 	T	U\203 \211\202N 	SU\203' \211\202N 	\305\245W\2047 	Z\306V\203? 	Z\211\202N \211\306V\203J \305\202K \307Z\211)\207" [te-width line newline te-height te-more-count 2 10 1] 3])
#@120 Move down a line, optionally do more processing, perhaps wrap/scroll,
move to start of new line, clear to end of line.
(defalias 'te-newline #[nil "\304\210\203  	S\211\305W\203 \306\307!\210\202  	\305=\203  \310 \210m\203> ee\n\\|\210eb\210\203G \311\312!\210db\210\313c\210\202G \312u\210``\n\\|\210\314\315\n\"\210\316 \210\317 \207" [terminal-more-processing te-more-count te-width terminal-scrolling nil 0 te-set-more-count t te-more-break delete-char 1 10 insert-char 32 beginning-of-line te-set-window-start] 3 (#$ . 17570)])
(defalias 'te-move-to-position #[nil "\305 \306Z\305 \306Z\nV\204  	V\204  e\\	\nT_\\b\210*\307\211\207" [x y te-width te-height te-more-count te-get-char 32 -1] 3])
(defalias 'te-clear-rest-of-line #[nil "\212`\301\210`Z``\\|\210\302\303[\"*\207" [n nil insert-char 32] 3])
(defalias 'te-clear-rest-of-screen #[nil "\212\301 \210\302\210m?\205  \303u\210\302\210`Z`|\210\304\305\"\210\202 )\207" [te-width te-clear-rest-of-line nil 1 insert-char 32] 3])
(defalias 'te-clear-screen #[nil "\304 \210\305	W\203 T\306\307\n\"\210\310c\210\202 )dSd|\210eb\210\311\211\207" [i te-height te-width te-more-count erase-buffer 0 insert-char 32 10 -1] 3])
(defalias 'te-insert-lines #[nil "n\203F \212`eZ	T\245Z\306Z\307 \310Z\n^\311d	T_Zd|\210`d=\203+ \312c\210\fW\203E \fT\313\310	\"\210\f\n=\204+ \312c\210\202+ ,\306\211\207" [te-height te-width line n i te-more-count -1 te-get-char 32 0 10 insert-char] 3])
(defalias 'te-delete-lines #[nil "n\203B `eZ	T\245Z\306Z\307 \310Z\n^\311``	T_\\d^|\210\212db\210\fW\203A \fT\312\310	\"\210\f\n=\204' \313c\210\202' ,\306\211\207" [te-height te-width line n i te-more-count -1 te-get-char 32 0 insert-char 10] 4])
(defalias 'te-beginning-of-line #[nil "\300 \207" [beginning-of-line] 1])
(defalias 'te-backward-char #[nil "n?\205 \300u\207" [-1] 1])
(defalias 'te-forward-char #[nil "l?\205 \300u\207" [1] 1])
(defalias 'te-delete #[nil "n?\205 `S`|\210\300c\210\301u\207" [32 -1] 2])
(defalias 'te-beep #[nil "\300 \207" [beep] 1])
(defalias 'te-insert-spaces #[nil "`\302 \303Z\304\210`Z^\211\305X\204! \306	[!\210b\210\307\303	\"\210b*\207" [p n te-get-char 32 nil 0 delete-char insert-char] 4])
(defalias 'te-delete-char #[nil "`\302 \303Z\304\210`Z^\211\305X\204  \306\303	\"\210b\210\307	!\210b*\207" [p n te-get-char 32 nil 0 insert-char delete-char] 4])
(defalias 'te-losing-unix #[nil "\300\207" [nil] 1])
(defalias 'te-output-tab #[nil "`\211\303 \210`Z\304\305	\306\"Z\307\210`Z^\n\\b+\207" [p x l beginning-of-line 8 logand 7 nil] 5])
#@51 Move down a line vertically, or scroll at bottom.
(defalias 'te-down-vertically-or-scroll #[nil "i\302\210m\203' ee	\\|\210eb\210\303\304!\210db\210\305c\210\306\307	\"\210\310 \210\202* \304y\210\311!\210)\312 \207" [column te-width nil delete-char 1 10 insert-char 32 beginning-of-line move-to-column te-set-window-start] 3 (#$ . 20158)])
(defalias 'te-filter #[(process string) "p\306\216\307	!q\210\nb\210\310!\203, \311!\204 \312\202, q\210db\210\313\f!\210\307	!q\210\fC\244\314 \210\315p\316\317 !=!\210\307	!q\210`\211*\207" [obuf process te-saved-point te-log-buffer string te-pending-output ((set-buffer obuf)) process-buffer bufferp buffer-name nil insert-before-markers te-update-pending-output-display te-process-output window-buffer selected-window] 4])
(defalias 'te-process-output #[(preemptible) "\301\302\303\215\210\304\305!\207" [preemptible t te-process-output (byte-code "\306\211\211\211\211\211A\203;\f@A@\211\nH\nT\211\fG=\203@ \307AAB\307A@\310 \210\202E \n\240\210	\311V\203		\312W\203	l\203v \n\307=\203j \307\313\314	\"ABB\202p \nS\240\210\315 \210\202)\f\204\210 \316\314!\210	c\210\317\314!\210\202)\f=\203\222 \206\236 \320\321\f\n#\211\206\236 \fG\316\314!\210	c\210`\306\210\n`	Z\\^	b\210=\203\302 \306``\nZ\\|\210\n\307=\203\335 \fG=\203\335 \f\202\342 \f\nOc\210\fG=\203\367 \307AAB\202\375 \240\210\317\nZT!\210)\202)	\322=\203\323 \324\236A\206#\325\202#	\326\236A\206#\325 \210\317\314!\210\203\f \327 \203\f \330\331\332\"\210\202\f .\306\207" [matchpos char start ostring string buffer-read-only nil 0 te-update-pending-output-display 31 255 make-string 1 te-newline delete-char te-redisplay-if-necessary string-match "[ --\377]" 16 te-get-char ((61 . te-move-to-position) (99 . te-clear-rest-of-line) (67 . te-clear-rest-of-screen) (15 . te-insert-lines) (11 . te-delete-lines) (1 . te-beginning-of-line) (2 . te-backward-char) (100 . te-delete-char) (95 . te-insert-spaces) (6 . te-forward-char) (7 . te-beep) (10 . te-down-vertically-or-scroll) (12 . te-clear-screen)) te-losing-unix ((10 . te-newline) (127 . te-delete) (13 . te-beginning-of-line) (7 . te-beep) (8 . te-backward-char) (9 . te-output-tab)) input-pending-p throw te-process-output t te-pending-output end preemptible] 7) walk-windows #[(w) "\301 =?\205 \302!p=\205 \303`\"\207" [w selected-window window-buffer set-window-point] 3]] 2])
(defalias 'te-get-char #[nil "A\203( @A@	\nH\nT\211	G=\203\" \303AAB\202& \n\240\210*\207\304\305\215\207" [te-pending-output string start 0 char (byte-code "\302!\303\216\304\305\"\210\306!*\207" [te-process filter process-filter ((set-process-filter te-process filter)) set-process-filter #[(p s) "G\302=\204 \302D\303\304\305H\"\207" [s te-pending-output 1 throw char 0] 4] accept-process-output] 3)] 3])
(defalias 'te-redisplay-if-necessary #[(length) "	Z\211\303X\205\" p\304\305 !=\205\" \306 \205\" \307 \210\310\303!\210\n\211\207" [te-redisplay-count length terminal-redisplay-interval 0 window-buffer selected-window waiting-for-user-input-p te-update-pending-output-display sit-for] 3])
(defalias 'te-update-pending-output-display #[nil "A\204\n \303\202\" \304 \211\305W\203 \303\202! \306\307\n\310\\\311\245\")\312 \207" [te-pending-output te-pending-output-info length "" te-pending-output-length 1500 format "(%dK chars output pending) " 512 1024 force-mode-line-update] 5])
(defalias 'te-sentinel #[(process message) "\304!\305=\206B \306\307!!?\206B p\212\307!q\210\310\311 \210db\210\312 \210\313 \210\314\315\261\210)	\307!=\205A \316 \205A db\210\317\320!)\207" [process b buffer-read-only message process-status run buffer-name process-buffer nil fundamental-mode delete-blank-lines delete-horizontal-space "\n*******\n" "*******\n" waiting-for-user-input-p recenter -1] 3])
#@60 Shell command to set terminal modes for terminal emulator.
(defvar te-stty-string "stty -nl erase '^?' kill '^u' intr '^c' echo pass8" (#$ . 24043))
#@75 *If non-nil, is file name to use for explicitly requested inferior shell.
(custom-declare-variable 'explicit-shell-file-name 'nil '(#$ . -24198) :type '(choice (const :tag "None" nil) file) :group 'terminal)
#@1396 Under a display-terminal emulator in BUFFER, run PROGRAM on arguments ARGS.
ARGS is a list of argument-strings.  Remaining arguments are WIDTH and HEIGHT.
BUFFER's contents are made an image of the display generated by that program,
and any input typed when BUFFER is the current Emacs buffer is sent to that
program as keyboard input.

Interactively, BUFFER defaults to "*terminal*" and PROGRAM and ARGS
are parsed from an input-string using your usual shell.
WIDTH and HEIGHT are determined from the size of the current window
-- WIDTH will be one less than the window's width, HEIGHT will be its height.

To switch buffers and leave the emulator, or to give commands
to the emulator itself (as opposed to the program running under it),
type Control-^.  The following character is an emulator command.
Type Control-^ twice to send it to the subprogram.
This escape character may be changed using the variable `terminal-escape-char'.

`Meta' characters may not currently be sent through the terminal emulator.

Here is a list of some of the variables which control the behaviour
of the emulator -- see their documentation for more information:
terminal-escape-char, terminal-scrolling, terminal-more-processing,
terminal-redisplay-interval.

This function calls the value of terminal-mode-hook if that exists
and is non-nil after the terminal buffer has been set up and the
subprocess started.
(defalias 'terminal-emulator #[(buffer program args &optional width height) "\306!\210	\204 \307\310 !S\n\204 \311\310 !S\312 \210	\n\313!\313\f!Q&\314\315\f#\316D'\317(\320 \210)\317)\321p!\211)\203d \322\314\323\324)!\"!\203Y \325)!\210\202< \326\327\324)!\"\210\202< )\330\331\332\217\210\333*\334+!\210\335\336!\210\337\340\341,!\342\341\343\344-\333#\345##\207" [buffer width height te-width te-height te-terminal-name-prefix switch-to-buffer window-width selected-window window-height terminal-mode number-to-string format "Emacs terminal %dx%d: %%b  " te-pending-output-info nil te-clear-screen get-buffer-process y-or-n-p "Kill process %s? " process-name delete-process error "Process %s not killed" err (byte-code "\306P\307\310 P\311\312 P	BBB\313\314p\315\316\317\320\n\321\322\fB\323##%\324\325\"\210\326\327\"\210)\310\207" [te-terminal-name process-environment te-stty-string program args te-process "TERM=" "TERMCAP=" te-create-termcap "TERMINFO=" te-create-terminfo start-process "terminal-emulator" "/bin/sh" "-c" format "%s; exec %s" mapconcat te-quote-arg-for-sh " " set-process-filter te-filter set-process-sentinel te-sentinel] 12) ((error (byte-code "\301 \210\302@A\"\207" [err fundamental-mode signal] 3))) t use-local-map run-hooks terminal-mode-hook message "Entering emacs terminal-emulator...  Type %s %s for help" single-key-description mapconcat where-is-internal te-escape-help " " te-terminal-name mode-line-buffer-identification buffer-read-only process inhibit-quit terminal-map terminal-escape-char terminal-escape-map] 9 (#$ . 24414) (byte-code "\212\304\305!q\210\306\307\300!\203 \203 \310!\311=\204 p\202  \312\305!!)\313	\2064 \314\315!\2064 \314\316!\2064 \317\320\321\322\n\"!\211\323\232\203H \n\324D\202K \325!*!B\207" [te-process explicit-shell-file-name default-s s get-buffer-create "*terminal*" buffer-name boundp process-status run generate-new-buffer append getenv "ESHELL" "SHELL" "/bin/sh" read-string format "Run program in emulator: (default %s) " "" nil te-parse-program-and-args] 7)])
(defalias 'te-parse-program-and-args #[(s) "\304\305\"\203A \306\307	\2037 \304\310	#\203+ 	\311\225O\307\225\211G=\2031 \306\2021 	\306O\306\nB\202 \n\237\211@\nA*D\207\304\312\"\203V \313!\204V \314\315PDD\207\306D\207" [s p l shell-file-name string-match "\\`\\([-a-zA-Z0-9+=_.@/:]+[ 	]*\\)+\\'" nil 0 "\\([-a-zA-Z0-9+=_.@/:]+\\)\\([ 	]+\\)*" 1 "[ 	]" file-exists-p "-c" "exec "] 5])
(put 'terminal-mode 'mode-class 'special)
#@134 Set up variables for use with the terminal-emulator.
One should not call this -- it is an internal function
of the terminal-emulator
(defalias 'terminal-mode #[nil "\306 \210\307p!\210\310\311\312\313\313\314\305!\210\315\305!\314\316!\210\315\316!\314\317!\210\315\317!\314\320!\210\315\320!\314\321!\210\314\322!\210\314\323!\210\314\324!\210\325C\314\326!\210e\314\327!\210\330\314\331!\210\314\332!\210\333\314\334!\210\335\314\336!\210\211\207" [major-mode mode-name mode-line-process buffer-read-only truncate-lines terminal-escape-char kill-all-local-variables buffer-disable-undo terminal-mode "terminal" (":%s") t make-local-variable default-value terminal-scrolling terminal-more-processing terminal-redisplay-interval te-width te-height te-process te-pending-output 0 te-saved-point te-pending-output-info "" inhibit-quit te-log-buffer nil te-more-count -1 te-redisplay-count] 2 (#$ . 28342)])
(defalias 'te-quote-arg-for-sh #[(string) "\304\305\"\203	 \207\304\306\"\204 \307!\207\310\311\211\nGY\204I \304\312\n#\211\2045 \n\313OP\202I \n	O\314	\211TOR	T\211\202 \315\315Q+\207" [string end start harder string-match "\\`[-a-zA-Z0-9+=_.@/:]+\\'" "[$]" prin1-to-string "" 0 "[\"\\$]" nil "\\" "\""] 7])
#@131 Create and compile a terminfo entry for the virtual terminal. This is kept
in the directory specified by `te-terminfo-directory'.
(defalias 'te-create-terminfo #[nil "\203W \306	\n\307\310O\311R!\204W \312\313\f$\314\315\316\317\320\321\260	\322Q \323	\324\"\210\212\325!q\210 c\210\326!\210\327\330!\210)\331\332	!P!B!\333\334\335\330\335$\336\"\210+\332	!\207" [system-uses-terminfo te-terminfo-directory te-terminal-name-prefix te-terminal-name te-width te-height file-exists-p 0 1 "/" format "%s,\n	mir, xon,cols#%d, lines#%d," "bel=^P^G, clear=^P\\f, cr=^P^A, cub1=^P^B, cud1=^P\\n," "cuf1=^P^F, cup=^P=%p1%'\\s'%+%c%p2%'\\s'%+%c," "dch=^Pd%p1%'\\s'%+%c, dch1=^Pd!, dl=^P^K%p1%'\\s'%+%c," "dl1=^P^K!, ed=^PC, el=^Pc, home=^P=\\s\\s," "ich=^P_%p1%'\\s'%+%c, ich1=^P_!, il=^P^O%p1%'\\s'%+%c," "il1=^P^O!, ind=^P\\n, nel=\\n,\n" ".tif" make-directory t create-file-buffer write-file kill-buffer nil "TERMINFO=" directory-file-name set-process-sentinel start-process "tic" te-tic-sentinel file-name terminfo process-environment] 7 (#$ . 29611)])
#@49 Create a termcap entry for the virtual terminal
(defalias 'te-create-termcap #[nil "\304\305	\n\203 \306\202 \307%\310\311\312\313\314\315\260\207" [te-terminal-name te-width te-height terminal-scrolling format "%s:co#%d:li#%d:%s" "" "ns:" "cm=^p=%+ %+ :cr=^p^a:le=^p^b:nd=^p^f:" "nw=^j:ce=^pc:cd=^pC:cl=^p^l:bl=^p^g:" "IC=^p_%+ :DC=^pd%+ :AL=^p^o%+ :DL=^p^k%+ :" "LP:NF:" "ic=^p_!:dc=^pd!:al=^p^o!:dl=^p^k!:ho=^p=  :" "im=:ei=:dm=:ed=:mi:do=^p^j:nl=^p^j:bs:"] 7 (#$ . 30682)])
#@43 If tic has finished, delete the .tif file
(defalias 'te-tic-sentinel #[(proc state-change) "\303\232\205\f \304	\n\305Q!\207" [state-change te-terminfo-directory te-terminal-name "finished\n" delete-file ".tif"] 4 (#$ . 31171)])
(provide 'terminal)
