# HG changeset patch # User Richard M. Stallman # Date 807426774 0 # Node ID 4bb9477d762a7cf7b57464c17841cbfae06b6984 # Parent dd9049c5c51db80e50b53d4581cbbcc1c6a7aed6 (tpu-control-keys): New initial value, nil. (tpu-help): Back up one page at a time. (tpu-set-control-keys): New function. (tpu-edt-on): Call tpu-set-control-keys. diff -r dd9049c5c51d -r 4bb9477d762a lisp/emulation/tpu-edt.el --- a/lisp/emulation/tpu-edt.el Thu Aug 03 00:02:07 1995 +0000 +++ b/lisp/emulation/tpu-edt.el Thu Aug 03 05:12:54 1995 +0000 @@ -364,7 +364,7 @@ "True when TPU-edt is operating in the forward direction.") (defvar tpu-reverse nil "True when TPU-edt is operating in the backward direction.") -(defvar tpu-control-keys t +(defvar tpu-control-keys nil "If non-nil, control keys are set to perform TPU functions.") (defvar tpu-xkeys-file nil "File containing TPU-edt X key map.") @@ -983,7 +983,7 @@ (scroll-other-window -8) (error nil))) (t - (backward-page 2) + (backward-page) (forward-line 1) (tpu-line-to-top-of-window)))) ((not (equal tpu-help-return fkey)) @@ -2261,26 +2261,25 @@ ;;; -;;; Map control keys +;;; Functions to set, reset, and toggle the control key bindings ;;; -(define-key global-map "\C-\\" 'quoted-insert) ; ^\ -(define-key global-map "\C-a" 'tpu-toggle-overwrite-mode) ; ^A -(define-key global-map "\C-b" 'repeat-complex-command) ; ^B -(define-key global-map "\C-e" 'tpu-current-end-of-line) ; ^E -(define-key global-map "\C-h" 'tpu-next-beginning-of-line) ; ^H (BS) -(define-key global-map "\C-j" 'tpu-delete-previous-word) ; ^J (LF) -(define-key global-map "\C-k" 'tpu-define-macro-key) ; ^K -(define-key global-map "\C-l" 'tpu-insert-formfeed) ; ^L (FF) -(define-key global-map "\C-r" 'recenter) ; ^R -(define-key global-map "\C-u" 'tpu-delete-to-bol) ; ^U -(define-key global-map "\C-v" 'tpu-quoted-insert) ; ^V -(define-key global-map "\C-w" 'redraw-display) ; ^W -(define-key global-map "\C-z" 'tpu-exit) ; ^Z +(defun tpu-set-control-keys nil + "Set control keys to TPU style functions." + (define-key global-map "\C-\\" 'quoted-insert) ; ^\ + (define-key global-map "\C-a" 'tpu-toggle-overwrite-mode) ; ^A + (define-key global-map "\C-b" 'repeat-complex-command) ; ^B + (define-key global-map "\C-e" 'tpu-current-end-of-line) ; ^E + (define-key global-map "\C-h" 'tpu-next-beginning-of-line) ; ^H (BS) + (define-key global-map "\C-j" 'tpu-delete-previous-word) ; ^J (LF) + (define-key global-map "\C-k" 'tpu-define-macro-key) ; ^K + (define-key global-map "\C-l" 'tpu-insert-formfeed) ; ^L (FF) + (define-key global-map "\C-r" 'recenter) ; ^R + (define-key global-map "\C-u" 'tpu-delete-to-bol) ; ^U + (define-key global-map "\C-v" 'tpu-quoted-insert) ; ^V + (define-key global-map "\C-w" 'redraw-display) ; ^W + (define-key global-map "\C-z" 'tpu-exit) ; ^Z + (setq tpu-control-keys t)) - -;;; -;;; Functions to reset and toggle the control key bindings -;;; (defun tpu-reset-control-keys (tpu-style) "Set control keys to TPU or emacs style functions." (let* ((tpu (and tpu-style (not tpu-control-keys))) @@ -2444,7 +2443,7 @@ ((not tpu-edt-mode) ;; we use picture-mode functions (require 'picture) - (tpu-reset-control-keys t) + (tpu-set-control-keys) (cond (tpu-emacs19-p (and window-system (tpu-load-xkeys nil)) (tpu-arrow-history))