(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "XCL" BASE 10)(filecreated "29-Sep-88 17:02:58" |{EG:PARC:XEROX}<JELLINEK>LISPUSERS>HARDCOPY-RETAIN.;3| 3423         |changes| |to:|  (vars hardcopy-retaincoms)      |previous| |date:| "29-Dec-87 14:01:40" |{EG:PARC:XEROX}<JELLINEK>LISPUSERS>HARDCOPY-RETAIN.;2|); Copyright (c) 1987, 1988 by Xerox Corporation.  All rights reserved.(prettycomprint hardcopy-retaincoms)(rpaqq hardcopy-retaincoms ((functions hardcopyimagew.tofile&printer install-option) (declare\: donteval@load docopy (p (install-option)))))(cl:defun hardcopyimagew.tofile&printer (&optional xcl-user::window) "Send hardcopy of WINDOW to a printer and a file." (let ((xcl-user::result (|GetImageFile|))) (cl:when xcl-user::result (let ((xcl-user::printer-name (|GetPrinterName|))) (destructuring-bind (xcl-user::file . type) xcl-user::result (hardcopy.somehow xcl-user::window xcl-user::file type) (cl:when xcl-user::printer-name (let ((xcl-user::full-name (packfilename.string (quote host) (cl:pathname-host xcl-user::file) (quote device) (cl:pathname-device xcl-user::file) (quote directory) (cl:pathname-directory xcl-user::file) (quote name) (cl:pathname-name xcl-user::file) (quote extension) (or (cl:first (cl:second (cl:assoc (quote extension) (cl:rest (cl:assoc type printfiletypes))))) type) (quote body) (cl:namestring *default-pathname-defaults*)))) (send.file.to.printer xcl-user::full-name xcl-user::printer-name))))))))(cl:defun install-option nil "Install the new Hardcopy option." (cl:labels ((xcl-user::get-subitems (xcl-user::item) (and (eq (cl:first (cl:fourth xcl-user::item)) (quote subitems)) (cl:rest (cl:fourth xcl-user::item)))) (xcl-user::find-place-wm (xcl-user::item) (let ((xcl-user::subitems (xcl-user::get-subitems xcl-user::item))) (cl:when xcl-user::subitems (cl:if (eq (car xcl-user::item) (quote |Hardcopy|)) (cl:unless (* \; "Install if not already there.") (cl:find (quote hardcopyimagew.tofile&printer) xcl-user::subitems :key (cl:function (cl:lambda (xcl-user::x) (cl:second (cl:second xcl-user::x)))) :test (cl:function eq)) (nconc xcl-user::subitems (list (list "To a file and a printer" (quote (quote hardcopyimagew.tofile&printer)) "Sends image to a printer of your choosing, retaining the printer version of the file.")))) (cl:mapc (cl:function xcl-user::find-place-wm) xcl-user::subitems))))) (xcl-user::find-place-bm (xcl-user::item) (let ((xcl-user::subitems (xcl-user::get-subitems xcl-user::item))) (cl:when xcl-user::subitems (cl:if (eq (car xcl-user::item) (quote |Hardcopy|)) (cl:unless (* \; "Install if not already there.") (cl:find (quote hardcopyimagew.tofile&printer) xcl-user::subitems :key (cl:function (cl:lambda (xcl-user::x) (cl:first (cl:second (cl:second xcl-user::x))))) :test (cl:function eq)) (nconc xcl-user::subitems (list (list "To a file and a printer" (quote (quote (hardcopyimagew.tofile&printer))) "Sends image to a printer of your choosing, retaining the printer version of the file.")))) (cl:mapc (cl:function xcl-user::find-place-bm) xcl-user::subitems)))))) (cl:mapc (cl:function xcl-user::find-place-wm) |WindowMenuCommands|) (cl:mapc (cl:function xcl-user::find-place-bm) |BackgroundMenuCommands|) (cl:setq |WindowMenu| nil) (cl:setq |BackgroundMenu| nil)))(declare\: donteval@load docopy (install-option))(putprops hardcopy-retain copyright ("Xerox Corporation" 1987 1988))(declare\: dontcopy  (filemap (nil)))stop