123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- (provide (quote terminal))
- (require (quote ehelp))
- (defvar terminal-escape-char 30 "\
- *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.")
- (defvar terminal-scrolling nil "\
- *If non-nil, the terminal-emulator will `scroll' when output occurs
- past the bottom of the screen. If nil, output will `wrap' to the top
- of the screen.
- This variable is local to each terminal-emulator buffer.")
- (defvar terminal-more-processing t "\
- *If non-nil, do more-processing.
- This variable is local to each terminal-emulator buffer.")
- (defvar terminal-redisplay-interval 5000 "\
- *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.")
- (defvar terminal-more-break-insertion "*** More break -- Press space to continue ***")
- (defvar terminal-escape-map nil)
- (defvar terminal-map nil)
- (defvar terminal-more-break-map nil)
- (if terminal-map nil (let ((map (make-keymap))) (fillarray map (quote te-pass-through)) (setq terminal-map map)))
- (if terminal-escape-map nil (let ((map (make-keymap))) (fillarray map (quote undefined)) (let ((s "0")) (while (<= (aref s 0) 57) (define-key map s (quote digit-argument)) (aset s 0 (1+ (aref s 0))))) (define-key map "b" (quote switch-to-buffer)) (define-key map "o" (quote other-window)) (define-key map "e" (quote te-set-escape-char)) (define-key map "" (quote redraw-display)) (define-key map "" (quote te-flush-pending-output)) (define-key map "m" (quote te-toggle-more-processing)) (define-key map "x" (quote te-escape-extended-command)) (define-key map "?" (quote te-escape-help)) (define-key map (char-to-string help-char) (quote te-escape-help)) (setq terminal-escape-map map)))
- (defvar te-escape-command-alist nil)
- (if te-escape-command-alist nil (setq te-escape-command-alist (quote (("Set Escape Character" . te-set-escape-char) ("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)))))
- (if terminal-more-break-map nil (let ((map (make-keymap))) (fillarray map (quote te-more-break-unread)) (define-key map (char-to-string help-char) (quote te-more-break-help)) (define-key map " " (quote te-more-break-resume)) (define-key map "" (quote redraw-display)) (define-key map "" (quote te-more-break-flush-pending-output)) (define-key map "
" (quote te-more-break-advance-one-line)) (setq terminal-more-break-map map)))
- (defun te-escape nil (interactive) (byte-code "LjÇÈ É ÊŽË!ˆÌ!ˆÍƒ\"
|