* WHERE-IS library doc * Gather keyboard files, add VIRTUAL.TEDIT * add UNIXCOMM.TEDIT * rest of TEdit library files * save table of contents index for reworking * Don't move around VIRTUALKEYBOARDS files; will move in separate commit * Add MATMULT from Envos/Medley
48 lines
47 KiB
Plaintext
48 lines
47 KiB
Plaintext
1
|
||
|
||
Lisp Library Modules, Medley Release 1.15, TEXTMODULES
|
||
1
|
||
|
||
Lisp Library Modules, Medley Release 1.15, TEXTMODULES
|
||
TEXTMODULES
|
||
1
|
||
|
||
TEXTMODULES
|
||
1
|
||
|
||
|
||
TEXTMODULES
|
||
6
|
||
|
||
(TEXTMODULES NIL NIL NIL NIL 289)TEXTMODULES converts source code files from File Manager format to Common Lisp style plain text and back again. When exporting to plain text, a small number of File Manager coms types are supported. When importing from a plain text file, several convenience features are available including comment upgrade and conversion of specific named defmacros into defdefiners.
|
||
Note: The Text File Translator changes source code format only; this is not an Interlisp to Common Lisp translator.
|
||
All symbols described in this section are in the TEXTMODULES package, nicknamed TM.
|
||
This section describes the load and make processes, and the static format of text files and their File Manager counterparts. The File Manager counterparts are discussed in increasing detail until their programmability is covered.
|
||
Overview
|
||
1
|
||
|
||
The Text File Translator supports the development of portable Common Lisp source code in the Lisp Environment. It brings portable Common Lisp sources into the File Manager without losing any of their contents. It also makes new text files based on the File Manager's "filecoms."
|
||
The original file's function and ordering are retained, but exact formatting is not. The pretty printer causes all comments and expressions on the text file to be uniformly formatted.
|
||
Exporting a source file into text and back again will lose grouping of definitions under their coms.
|
||
Installation
|
||
1
|
||
|
||
Load TEXTMODULES.DFASL from the library.
|
||
Dependencies
|
||
1
|
||
|
||
Special support for editing and printing of comments is required. This are provided by the SEDIT-COMMONLISP file. Some caveats on the editing of presentations are mentioned below.
|
||
The support file is automatically loaded by the TEXTMODULES file. SEDIT-COMMONLISP cannot operate without TEXTMODULES and must be loaded by it or after it.
|
||
File Manager source files created with load-textmodule depend on having TEXTMODULES and SEDIT-COMMONLISP loaded.
|
||
Programmer's Interface
|
||
1
|
||
|
||
|
||
load-textmodule(LOAD-TEXTMODULE (Function) load-textmodule NIL NIL 290) pathname &key module install package upgrade-comment-length join-comments convert-loaded-files defdefiner-macros
|
||
[Function]
|
||
Like lisp:load; the file indicated by pathname is loaded, but in addition filecoms ar created and other information is stored for the File Manager. Key arguments are described below.
|
||
(See below under Text File Format for a description of the format of text files which can be read by load-textmodule).
|
||
Local bindings of reader affecting variables are established and set to Common Lisp defaults, except for the readtable.
|
||
A special readtable is used which creates internal representations for objects normally lost during reading (see below under Presentation types).
|
||
If there are some simple forms to set up the read environment at the front of the file, they are recognized and moved into a newly created makefile environment (see below under Makefile Environment for a complete description of this).
|
||
Each form is read from the file (one at a time). If the form is recognized a description of it is given to the File Manager and its definition is installed. If the form is not recognized it is wrapped in a "top level form" filecom and then installed by stripping presentation objects and evaluating.
|
||
defun in a let at top-level is treated like any top-level form. Such forms should be edited directly in the filecoms. Not doing this can have curious consequences, since calling ed on the function name will not modify the definition in the let (which remains in the FILECOMS as a top level form).
|
||
No forms after the read environment forms should change the reader's environment.
|
||
When the file has been completely read its content description is given to the File Manager. Also added to the content description are properties declaring its il:filetype as :compile-file and makefile-environment as that of the text file (whether given by setting forms at the front of the file or by default).
|
||
Several key options are available:
|
||
module A string or symbol used to create the symbol used as the File Manager's name of this module. Strings have their case preserved. Symbols have their name strings taken. Defaults to the uppercased root name of the path.
|
||
install T or NIL. Indicates whether the definitions in the file should be installed in the running system. Any package setup makes it mandatory to install the definitions in a source file; e. g. since :INSTALL NIL means forms in the file are not evaluated, any IN-PACKAGE form would not be evaluated and the file would be read in the wrong package. This can sometimes be worked around using the :PACKAGE argument.
|
||
package A package name or package, defaults to USER. This is the package the file will be read into.
|
||
upgrade-comment-length A number or NIL. Defaults to the value of *upgrade-comment-length* (which defaults to 40). The length, in characters, at which single semicolon comments are upgraded to double semicolon comments.
|
||
join-comments T or NIL. Defaults to the value of *join-comments* (which defaults to T). Causes comments of the same level in the coms to be joined together. This makes for more efficient editor operation, but loses all formatting inside of comments; e.g. inter-comment line breaks are not preserved.
|
||
convert-loaded-files T, :QUERY or NIL. Defaults to the value of *convert-loaded-files* (which defaults to :QUERY). If a REQUIRE or LOAD statement is noticed at top level a recursive call to LOAD-TEXTMODULE will be made. With :QUERY turned on the user is first prompted. If the pathname specified in the LOAD or REQUIRE is computed based on variables in the file being loaded :INSTALL must be true. Complex systems that contain special loading functions will not be handled by this mechanism.
|
||
defdefiner-macros A list of defmacro names. Defaults to the value of *defdefiner-macros* (which defaults to NIL). If a top-level defmacro is found whose name is on this list, the defmacro will be translated into an IL:FUNCTIONS defdefiner form. The defdefiner form then creates a macro that builds definers. Definers are the basic definition units maintained by the File Manager. DEFUN is itself a defdefiner macro. A particular DEFUN form is a definer for the named function (see the Lisp Release Notes, 4. Changes to Interlisp-D in Lyric/Medley, Section 17.8.2 Defining New File Manager Types, for more information on the defdefiner form).
|
||
Warning: Names on this list must be in the correct package, i.e. the one the file will be read in. A typical way to use this feature is:
|
||
<EFBFBD><EFBFBD> |