4.3BSD-Reno/contrib/lib/emacs/lisp/terminal.elc
(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 t "\
*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 ʎ!!\"