LISTING FOR >spec>install>1136>emacs-history-comment COMPILED BY Multics LISP Compiler, Version 2.13c, July 11, 1983 ON 08/20/86 2249.0 mst Wed IN BEHALF OF Martinson.SysMaint.a ;;; *********************************************************** ;;; * * ;;; * Copyright, (C) Honeywell Information Systems Inc., 1986 * ;;; * * ;;; *********************************************************** ;;; HISTORY COMMENTS: ;;; 1) change(86-02-10,LJAdams), approve(86-02-25,MCR7361), ;;; audit(86-04-17,Margolin), install(86-08-20,MR12.0-1136): ;;; EMACS extension to add history comments while within emacs. ;;; 2) change(86-04-21,Margolin), approve(86-04-21,MCR7361), ;;; audit(86-08-12,Harvey), install(86-08-20,MR12.0-1136): ;;; Added *expr declaration for requote_string_. Made add-history-comment ;;; write out the buffer first. ;;; 3) change(86-05-04,Margolin), approve(86-05-04,MCR7361), ;;; audit(86-08-12,Harvey), install(86-08-20,MR12.0-1136): ;;; Changed hcom:get-summary to skip back over trailing whitespace in the ;;; summary. Changed hcom:add-hcom-apv to use without-saving around its ;;; wipe-point-mark. ;;; END HISTORY COMMENTS (%include e-macros) (declare (*expr create-new-window-and-go-there buffer-kill fill-mode delete-window go-to-or-create-buffer minibuffer-clear-all redisplay-command reverse-string-search requote_string_ save-same-file redisplay-current-window-relative)) (defcom-synonym add-hcom add-history-comment) (defvar hcom:apv-value) (defvar hcom:cfix) (defvar hcom:ctl-arg) (defvar hcom:orig-buffer) (defvar hcom:pathname) (defvar hcom:summary) (defvar nuwindows) (defcom add-history-comment &doc "Adds a history comment to the current source program." (setq hcom:orig-buffer current-buffer) (if (not fpathname) (display-error "Current buffer has not been written to a file.")) (if buffer-modified-flag (save-same-file)) (setq hcom:pathname fpathname) (create-new-window-and-go-there) ;if user has one window split the screen ;if user has multiple windows dont destroy what he has (go-to-or-create-buffer 'hcom/ Result/ Buffer) (fill-mode) (setq fill-column 72.) (minibuffer-print "Type in summary. Type ^X^S to end summary") (set-key '^X^S 'hcom:get-summary)) (defcom hcom:get-summary () &doc "Gets the summary and approve value." (minibuffer-clear) (go-to-beginning-of-buffer) (skip-over-whitespace) (go-to-beginning-of-line) ;skip any leading blank lines (with-mark mark (go-to-end-of-buffer) (skip-back-whitespace) ;trim any trailing whitespace (setq hcom:summary (requote_string_ (point-mark-to-string mark)))) (hcom:get-approve-value)) (defun hcom:get-approve-value () (setq hcom:apv-value (trim-minibuffer-response "Type approve value: ")) (if (samepnamep hcom:apv-value "") ;null string treated as no approve value (hcom:put-hcom-napv) else (requote_string_ hcom:apv-value) (if (samepnamep "fix_" (substr hcom:apv-value 1 4)) (setq hcom:cfix t) (setq hcom:ctl-arg " -cfix") else (setq hcom:ctl-arg "") (setq hcom:cfix nil)) (hcom:put-hcom-apv))) (defun hcom:put-hcom-apv () (hcom:add-hcom-apv t) (go-to-beginning-of-buffer) (if (eolp) ;hcom returns a blank line if there is no error (if hcom:cfix ;no database checking is done for cfixes (hcom:display) else (if (yesp "OK?") ;user verifies if mcr number is all right (hcom:add-hcom-apv nil) (if (not (eolp)) ;error was found (find-buffer-in-window hcom:orig-buffer) (display-buffer-as-printout) (end-local-displays) (hcom:error) else (hcom:display)) else (hcom:get-approve-value))) ;wrong mcr entered else (hcom:error))) (defun hcom:display () (if (> nuwindows 1) (select-other-window) (delete-window nuwindows)) (minibuffer-clear-all) (read-in-file hcom:pathname) (if (not (forward-search "END HISTORY COMMENTS")) (go-to-beginning-of-buffer)) (redisplay-current-window-relative -1) (buffer-kill 'hcom/ Result/ Buffer)) (defun hcom:error () (ring-tty-bell) (if (yesp "re-enter approve value?") (hcom:get-approve-value) else (hcom:display))) (defun hcom:add-hcom-apv (get-question) (go-to-or-create-buffer hcom:orig-buffer) (comout-get-output (if get-question "answer no" else "answer yes -brief") (requote_string_ (catenate "history_comment add " (requote_string_ hcom:pathname) " -approve " hcom:apv-value " -summary " hcom:summary hcom:ctl-arg))) (if get-question (go-to-end-of-buffer) (if (reverse-string-search "OK?") (go-to-beginning-of-line) (with-mark mark (go-to-end-of-buffer) (without-saving (wipe-point-mark mark)))) (display-buffer-as-printout) (end-local-displays))) (defun hcom:put-hcom-napv () (go-to-or-create-buffer hcom:orig-buffer) (comout-get-output "history_comment add " (requote_string_ hcom:pathname) " -no_approve -summary " hcom:summary) (go-to-beginning-of-buffer) (if (eolp) (hcom:display) else (hcom:error))) 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 add-history-comment 0 0 add-history-comment hcom:add-hcom-apv 315 46 hcom:get-summary hcom:display 242 106 hcom:get-approve-value hcom:error 302 166 hcom:put-hcom-apv hcom:get-approve-value 106 242 hcom:display hcom:get-summary 46 302 hcom:error hcom:put-hcom-apv 166 315 hcom:add-hcom-apv hcom:put-hcom-napv 431 431 hcom:put-hcom-napv Functions Referenced buffer-kill go-to-or-create-buffer requote_string_ catenate hcom:add-hcom-apv reverse-string-search comout-get-output hcom:display ring-tty-bell comout-get-output hcom:error samepnamep create-new-window-and-go-there hcom:get-approve-value save-same-file delete-window hcom:put-hcom-apv select-other-window display-buffer-as-printout hcom:put-hcom-napv set-key display-error minibuffer-clear set-mark end-local-displays minibuffer-clear-all skip-back-whitespace fill-mode minibuffer-print skip-over-whitespace find-buffer-in-window point-mark-to-string substr forward-search read-in-file trim-minibuffer-response go-to-beginning-of-buffer redisplay-current-window-relative wipe-point-mark go-to-beginning-of-line release-mark yesp go-to-end-of-buffer ----------------------------------------------------------- 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