LISTING FOR >spec>install>1136>vt1xx_keys_ COMPILED BY Multics LISP Compiler, Version 2.13c, July 11, 1983 ON 08/20/86 2252.7 mst Wed IN BEHALF OF Martinson.SysMaint.a ;;; *********************************************************** ;;; * * ;;; * Copyright, (C) Honeywell Information Systems Inc., 1982 * ;;; * * ;;; * Copyright (c) 1978 by Massachusetts Institute of * ;;; * Technology and Honeywell Information Systems, Inc. * ;;; * * ;;; *********************************************************** ;;; HISTORY COMMENTS: ;;; 1) change(86-04-23,Margolin), approve(86-04-23,MCR7325), ;;; audit(86-08-12,Harvey), install(86-08-20,MR12.0-1136): ;;; Added *expr declarations so that it would compile without warnings. ;;; END HISTORY COMMENTS ;;; ;;; Special key definitions for VT1XX terminals: control, meta, control-meta, ;;; and meta-control prefix functions ;;; Created: 11 March 1981 by G. Palter (%include e-macros) (declare (special last-command-triplet-mpfxk last-command-triplet-1)) (declare (array* (notype (key-bindings 128. 2)))) (declare (*expr execute-command last-command-triplet)) ;;; Called as part of function that reads a key name from the minibuffer (defun key-prompt-1 (metap key prefix) (prog (mf1) (and (or prefix (= metap 1)) (< key (1+ (CtoI "z")))(> key (1- (CtoI "a"))) (setq key (- key 40))) (setq mf1 (cond ((eq (key-bindings key 0) 'control-prefix) 'control-prefix) (prefix (arraycall t (key-bindings prefix 0) key)) (t (key-bindings key metap)))) (cond ((eq mf1 'escape) (minibuffer-print-noclear "esc-") (return (key-prompt-1 1 (get-char) nil))) ((eq mf1 'control-prefix) ((lambda (next-char) (cond ((and (> next-char (1- (CtoI "@"))) (< next-char (1+ (CtoI "_")))) (return (key-prompt-1 metap (- next-char (CtoI "@")) prefix))) ((and (> next-char (1- (CtoI "a"))) (< next-char (1+ (CtoI "z")))) (return (key-prompt-1 metap (- next-char (1- (CtoI "a"))) prefix))) (t (display-error "Bad control character: " (printable next-char))))) (get-char))) ;need to look further ((not (symbolp mf1)) (minibuffer-print-noclear (printable key) " (prefix char): ") (return (key-prompt-1 0 (get-char) key))) (t (minibuffer-print-noclear (printable key)) (return (list metap key prefix)))))) ;;; Execute a "key" as an Emacs command: A "key" is the triplet consisting ;;; of a character, "meta"-bit, and prefix character used to determine the ;;; exact command to be executed. (defun execute-key (metap ch prefix) (let ((command)) ;the command to execute (and (or (= metap 1) prefix) (and (< ch (1+ (CtoI "z"))) (> ch (1- (CtoI "a"))) (setq ch (- ch 40)))) (cond ((not prefix) (setq command (key-bindings ch metap))) (t (setq command (arraycall t (key-bindings prefix 0) ch)))) (cond ((symbolp command) ;normal command (setq last-command-triplet-mpfxk (cond ((= metap 1) 'meta) (t prefix)) last-command-triplet-1 ch) (execute-command command (last-command-triplet) nil)) (t ;a prefix character (let ((next-char (get-char))) (cond ((eq (key-bindings next-char 0) 'control-prefix) (let ((the-char (get-char))) ;controllify next character (cond ((and (> the-char (1- (CtoI "@"))) (< the-char (1+ (CtoI "_")))) (execute-key 0 (- the-char (CtoI "@")) ch)) ((and (> the-char (1- (CtoI "a"))) (< the-char (1+ (CtoI "z")))) (execute-key 0 (- the-char (1- (CtoI "a"))) ch)) (t (ring-tty-bell))))) ;can't be control char (t ;ordinary char after prefix (execute-key 0 next-char ch)))))))) ;;; Command that does real work of ESC (defcom escape-dont-exit-minibuf &numeric-argument (&pass) (prog (nxcn numf negate) a (setq nxcn (get-char)) (cond ((and (> nxcn (1- (CtoI "0"))) (< nxcn (1+ (CtoI "9")))) ;number (or numarg (setq numarg 0)) (setq numarg (+ (- nxcn (CtoI "0")) (* 10. numarg))) (setq numf t) (go a)) ((and (not numf) (= nxcn (CtoI "-"))) ;want negative argument (setq negate t numf t) (go a)) ((and (not numf) (= nxcn (CtoI "+"))) ;want positive argument (setq numf t) (go a)) (t (and numf negate ;negative argument (default -1) (setq numarg (- (or numarg 1)))) (cond (numf (process-char nxcn)) ((eq (key-bindings nxcn 0) 'control-prefix) (control-meta-prefix)) ;ESC-^^ -- control-meta (t (execute-key 1 nxcn nil))))))) ;;; Control prefix: reads characters building the numeric argument if fed ;;; digits; when a non-digit is given, executes the control function of ;;; said character (defcom control-prefix &numeric-argument (&pass) (prog (nxcn numf negate) a (setq nxcn (get-char)) (cond ((and (> nxcn (1- (CtoI "0"))) (< nxcn (1+ (CtoI "9")))) ;number (or numarg (setq numarg 0)) (setq numarg (+ (- nxcn (CtoI "0")) (* 10. numarg))) (setq numf t) (go a)) ((and (not numf) (= nxcn (CtoI "-"))) ;want negative argument (setq negate t numf t) (go a)) ((and (not numf) (= nxcn (CtoI "+"))) ;want positive argument (setq numf t) (go a)) (t (and numf negate ;negative argument (default -1) (setq numarg (- (or numarg 1)))) (cond (numf (process-char nxcn)) ((eq (key-bindings nxcn 0) 'escape) (control-meta-prefix)) ;^^-ESC: control-meta ((and (> nxcn (1- (CtoI "@"))) (< nxcn (1+ (CtoI "_")))) (process-char (- nxcn (CtoI "@")))) ((and (> nxcn (1- (CtoI "a"))) (< nxcn (1+ (CtoI "z")))) (process-char (- nxcn (1- (CtoI "a"))))) (t (ring-tty-bell)))))) &documentation "Used to enter control characters when the terminal or network uses those characters for its own purposes. If $$$ is followed by digits or the minus sign (-) or plus sign (+), a numeric argument is collected just as is done for $$escape$. (E.g: Typing $$$123$$go-to-line-number$ will go to line 123). Typing $$$-S is equivalent to typing ^S; typing $$$-$$escape$-S is equivalent to typing $$escape$-^S.") ;;; Control-meta prefix: reads characters building the numeric argument if fed ;;; digits; when a non-digit is given, executes the ESC-control function of ;;; said character (defcom control-meta-prefix &numeric-argument (&pass) (prog (nxcn numf negate) a (setq nxcn (get-char)) (cond ((and (> nxcn (1- (CtoI "0"))) (< nxcn (1+ (CtoI "9")))) ;number (or numarg (setq numarg 0)) (setq numarg (+ (- nxcn (CtoI "0")) (* 10. numarg))) (setq numf t) (go a)) ((and (not numf) (= nxcn (CtoI "-"))) ;want negative argument (setq negate t numf t) (go a)) ((and (not numf) (= nxcn (CtoI "+"))) ;want positive argument (setq numf t) (go a)) (t (and numf negate ;negative argument (default -1) (setq numarg (- (or numarg 1)))) (cond (numf (process-char nxcn)) ((and (> nxcn (1- (CtoI "@"))) (< nxcn (1+ (CtoI "_")))) (execute-key 1 (- nxcn (CtoI "@")) nil)) ((and (> nxcn (1- (CtoI "a"))) (< nxcn (1- (CtoI "z")))) (execute-key 1 (- nxcn (1- (CtoI "a"))) nil)) (t (ring-tty-bell))))))) (set-permanent-key '^^ 'control-prefix) (sstatus uuolinks nil) INCLUDE FILE >spec>install>1136>executable>e-macros.incl.lisp ;;; BEGIN INCLUDE FILE e-macros.incl.lisp ;;; Declares for use by Emacs programs and extenstions. Also loads ;;; in e_macros_, which contains macro definitions. ;;; HISTORY COMMENTS: ;;; 1) change(85-01-01,Margolin), approve(86-02-24,MCR7186), ;;; audit(86-08-12,Harvey), install(86-08-20,MR12.0-1136): ;;; Written: New Year's Day 1985, by excerpting the old e-macros.incl.lisp ;;; and leaving out all the definitions and qwerty junk (don't ask). ;;; 2) change(86-02-24,Margolin), approve(86-02-24,MCR7325), ;;; audit(86-08-12,Harvey), install(86-08-20,MR12.0-1136): ;;; Alphabetized declarations, and added more declarations for documented ;;; functions, and also for some undocumented functions. ;;; END HISTORY COMMENTS (%include backquote) (declare ;basic editor stuff (*expr apply-catenate assert-minor-mode backward-char backward-n-chars charlisten charset-member command-abort command-quit copy-region cur-hpos curline-as-string curbuf-as-string curchar curline-as-string delete-char delete-word destroy-buffer-contents dont-notice-modified-buffer e_cline_ e_lap_$reverse-search-string e_lap_$trim empty-buffer-p error_table_ establish-local-var exchange-point-and-mark firstlinep forward-char forward-n-chars forward-regexp-search-in-line forward-search forward-search-in-line get-char get-search-string go-to-beginning-of-buffer go-to-beginning-of-line go-to-buffer go-to-end-of-buffer go-to-end-of-line go-to-hpos go-to-mark go-to-or-create-buffer insert-char insert-string kill-backwards-to-mark kill-forward-to-mark kill-pop kill-to-end-of-line killsave-string lastlinep loadfile looking-at lowercase map-over-emacs-commands mark-on-current-line-p mark-reached merge-kills-forward merge-kills-reverse move-mark minibuf-response minibuffer-clear negate-minor-mode new-line next-line nullstringp pathname_ pathname_$component point-mark-to-string point>markp prev-line printable process-char produce-named-mark-list read-in-file release-mark reverse-search register-local-var reverse-search-in-line search-back-first-charset-line search-back-first-not-charset-line search-failure-annunciator search-for-first-charset-line search-for-first-not-charset-line set-emacs-epilogue-handler set-buffer-self-destruct set-key set-mark-here set-mark set-perm-key set-the-mark set-the-mark-here skip-to-whitespace skip-to-whitespace-in-line wipe-point-mark wipe-region write-out-file trim-minibuf-response yesp yank) (*fexpr define-autoload-lib)) (declare ;redisplay stuff (*expr end-local-displays init-local-displays ring-tty-bell local-display-generator local-display-generator-nnl next-screen prev-screen local-display-current-line find-buffer-in-window select-buffer-window window-info select-buffer-find-window select-other-window select-window buffer-on-display-in-window redisplay full-redisplay)) (declare ;extended stuff (*expr forward-word backward-word skip-over-whitespace skip-back-whitespace skip-over-whitespace-in-line skip-back-whitespace-in-line skip-back-to-whitespace skip-to-whitespace rubout-char date display-buffer-as-printout delete-white-sides lefthand-char format-to-col whitespace-to-hpos line-is-blank decimal-rep register-option minibuffer-clear)) (declare (*lexpr display-error display-com-error display-error-noabort display-error-remark comout-get-output display-com-error-noabort minibuffer-print minibuffer-response trim-minibuffer-response intern-minibuffer-response minibuffer-remark minibuffer-print-noclear report-error report-error-noabort)) (declare (special TAB NL SPACE ESC curpointpos current-buffer dont-stash numarg der-wahrer-mark fpathname fill-column completion-list curlinel BACKSPACE read-only-flag buffer-modified-flag previous-buffer current-buffer-mode env-dir process-dir minibuffer-end-string NLCHARSTRING undo null-pointer)) ;;; Load in macro packages (eval-when (eval compile) (or (status feature e-defcom) (progn (load (catenate (car (namelist (truename infile))) ">e_define_command_")) (sstatus feature e-defcom))) (or (status feature e-macros) (load (catenate (car (namelist (truename infile))) ">e_macros_")))) ;;; END INCLUDE FILE e-macros.incl.lisp INCLUDE FILE >ldd>include>backquote.incl.lisp ;;; ;;; backquote.incl.lisp - BSG 10/9/79 ;;; Loads lisp_backquote_ into either the compiler or interpreter ;;; environment. ;;; ;;; Modified 10/30/82 by Richard Lamson to use eval-when and ;;; (status feature backquote) ;;; (eval-when (eval compile) (or (status feature backquote) (load (catenate (car (namelist (truename infile))) ">lisp_backquote_")))) Functions Defined Name Offset Offset Name control-prefix 542 0 key-prompt-1 control-meta-prefix 722 220 execute-key escape-dont-exit-minibuf 400 400 escape-dont-exit-minibuf execute-key 220 542 control-prefix key-prompt-1 0 722 control-meta-prefix Functions Referenced control-meta-prefix get-char minibuffer-print-noclear display-error key-prompt-1 printable execute-command last-command-triplet process-char execute-key minibuffer-print-noclear ring-tty-bell ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved