[comp.sys.xerox] Editing Portable Common Lisp Files

fons@cs.vu.nl (Fons Botman) (01/21/88)

; Is anyone editing portable Common Lisp files under Lyric? I mean the
; kind of file that is littered with things like
; 	#+symbolics (defmacro .....)
; or 
; 	(defun foo (x) ...
; 		#+xerox (OPENW ...)
; 		...)

I know the problem <DEEP SIGH>.
Once you can get something to run on a xerox, you cant use it anywhere else :-)

I do not know about PORT-CLFILE, i wrote a simple loader myself which converts
recognizable constructs (and comments between functions) to proper filemanager
commands.  Comments inside functions is also preserved by redefining the ";"
macro to something which returns an Interlisp comment, so you see the comment
in SEdit later.

I was planning to allow for #+ #x #. etc. constructs in the same way by
redefining REMOVE-COMMENTS to take care of these cases also. 
< REMOVE-COMMENTS now only removes Common Lisp comments from the ORIGINAL
definition to create an executable one during execution of the cl:defun>

#+kcl SI:LOOP-TEQUAL
INSIDE a function can be converted to something like 
(IF-FEATURE-PRESENT KCL SI:LOOP-TEQUAL)
but a safer solution would be 
(IF-FEATURE-PRESENT KCL (READ-FROM-STRING "SI:LOOP-TEQUAL"))
in case the the expression is unreadable on a Xerox, e.g. an unknown package
name.

#xFFFF can be converted to (HEX-READ-MACRO "FFFF") and
#.(something else) to (EVAL-READ-MACRO (something else))

If some SEdit expert/hacker could give me some hints how to convince SEdit to
show an expression as (HEX-READ-MACRO "FFFF") as #xFFFF 
AND allow me to edit it the same way as the cl:comments i would be helped.

In this way al the "portable" CL constructs can be retained under XCL.  It
will not be hard to train MAKEFILE or another function to print out these
constructs again in an portablecommonlispy way.

REMOVE-COMMENTS can convert/include/exlude/execute the constructs to
create an executable definition. In this way it acts as a kind of reader.

Is this proposal workable or does anyone know of examples which defy this
scheme? 

Current problems are:
#+xerox (defun ...)
which can only be converted to a file manager (P (defun ...)) command
and cannot be seen as a definition.

(#+xerox defdefiner #-xerox defun ....)
same

(; this is crummy
 defvar jopie 'blond "I could not resist")
Which is not recognized now because is is read as 
   ((il:* il:|;| "this is crummy")  defvar jopie 'blond "I could not resist")
but this can be fixed

Multiple definitions of the same function in a file (yakkie).

--
P.S.

Is it worth the trouble?  Although i like SEdit, i am beginning to believe
that a few extentions to TEdit (parenthesis matching, eval a selection,
prettyprint the selection etc.)  and a function (Tedit-fn 'foo) which would
open a tedit window on the part of the file where "foo" is defined would make
life a lot easier for common lisp programmers.  

< Boy, would i like an emacs under XCL >

				Awaiting responses,

						Fons Botman
						fons@cs.vu.nl