LISTING FOR >spec>install>1136>emacs-overwrite-mode COMPILED BY Multics LISP Compiler, Version 2.13c, July 11, 1983 ON 08/20/86 2255.9 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. * ;;; * * ;;; *********************************************************** ;;; ;;; Modified: 1 July 1981 RMSoley to use Multics rubout character ;;; and to add overwrite-mode-off. ;;; Modified: 3 December 1983 B. Margolin to fix overwrite-mode-off ;;; to correctly reset ^D. ;;; (%include e-macros) (declare (special MCS-editing-characters) (*expr self-insert)) (defun rubout-character macro (form) '(ItoC (cadr MCS-editing-characters))) (defun overwrite-mode () (assert-minor-mode 'overwrite) (set-key 'esc-D 'overwrite-mode-delete-word) (set-key 'esc-# 'overwrite-mode-rubout-word) (set-key 'esc-\177 'overwrite-mode-rubout-word) (set-key (rubout-character) 'overwrite-mode-rubout-char) (set-key '\177 'overwrite-mode-rubout-char) (set-key '^D 'overwrite-mode-delete-char) (map-over-emacs-commands '(lambda (sym fun arg) (and (eq fun 'self-insert) (set-key sym 'overwrite-mode-self-insert)) arg) nil)) (defprop overwrite-off overwrite-mode-off expr) (defprop overwriteoff overwrite-mode-off expr) (defun overwrite-mode-off () (negate-minor-mode 'overwrite) (set-key 'esc-D 'delete-word) (set-key 'esc-# 'rubout-word) (set-key 'esc-\177 'rubout-word) (set-key (rubout-character) 'rubout-char) (set-key '\177 'rubout-char) (set-key '^D 'delete-char) (map-over-emacs-commands '(lambda (sym fun arg) (and (eq fun 'overwrite-mode-self-insert) (set-key sym 'self-insert)) arg) nil)) (defun overwrite-mode-self-insert () (or (eolp)(delete-char)) (self-insert)) (defun overwrite-mode-delete-char () (if (not (eolp)) (delete-char) (insert-char " "))) ;;; old delete-char left cursor in same place, "gobbled" chars ;;;(defun overwrite-mode-delete-char () ;;; (if (not (eolp)) ;;; (if (at-white-char)(forward-char) ;;; else (delete-char) ;;; (save-excursion ;;; (skip-to-whitespace) ;;; (insert-string " "))))) (defun overwrite-mode-rubout-char () (or (bolp)(progn (backward-char) (delete-char) (insert-char " ") (backward-char)))) (defprop overwrite-mode-delete-word forward kills) (defun overwrite-mode-delete-word () (with-mark m (forward-word) (let ((hp (cur-hpos))) (kill-backwards-to-mark m) (spaces-to-hpos hp))) (merge-kills-forward)) (defprop overwrite-mode-rubout-word reverse kills) (defun overwrite-mode-rubout-word () (with-mark m (let ((hpos (cur-hpos))) (backward-word) (kill-forward-to-mark m) (merge-kills-reverse) (save-excursion (spaces-to-hpos hpos))))) (defun spaces-to-hpos (x) (do ((hpdiff (- x (cur-hpos)) (1- hpdiff))) ((< hpdiff 1)) (insert-char " "))) (defun overwrite-mode-insert-string (string) (with-mark start (let ((start-pos curpointpos)) (go-to-end-of-line) (if (< (- curpointpos start-pos) (stringlength string)) (kill-backwards-to-mark start) else (go-to-mark start) (do-times (stringlength string) (delete-char))))) (insert-string string)) 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 overwrite-mode 0 0 overwrite-mode overwrite-mode-delete-char 156 63 overwrite-mode-off overwrite-mode-delete-word 210 146 overwrite-mode-self-insert overwrite-mode-insert-string 362 156 overwrite-mode-delete-char overwrite-mode-off 63 173 overwrite-mode-rubout-char overwrite-mode-rubout-char 173 210 overwrite-mode-delete-word overwrite-mode-rubout-word 246 246 overwrite-mode-rubout-word overwrite-mode-self-insert 146 336 spaces-to-hpos spaces-to-hpos 336 362 overwrite-mode-insert-string Functions Referenced ItoC go-to-mark negate-minor-mode assert-minor-mode insert-char release-mark backward-char insert-string self-insert backward-word kill-backwards-to-mark set-key cur-hpos kill-forward-to-mark set-mark delete-char map-over-emacs-commands spaces-to-hpos forward-word merge-kills-forward stringlength go-to-end-of-line merge-kills-reverse ----------------------------------------------------------- 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