Path: utzoo!mnetor!uunet!husc6!think!ames!pasteur!ucbvax!XEROX.COM!"Lennart_Lovstrand.EuroPARC" From: "Lennart_Lovstrand.EuroPARC"@XEROX.COM Newsgroups: comp.sys.xerox Subject: Re: can't find package error message Message-ID: <880307-093637-1863@Xerox> Date: 7 Mar 88 17:34:58 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 31 For those who do not have source or ARPANET access or who does not like to modify system code, here's a cleaner alternative which makes use of a read macro to achieve the same result as SUBREADPATCH. (Thanks to Larry Masinter for suggesting this technique.) Again, this read macro properly installed will stop colons from being interpreted as package delimiters inside symbols beginning with a left brace. This allows you to merrily enter NS file names without bothering to manually quote the colons in the host name or be forced to make a detour into SEdit each time you forget. Good for your blood pressure too. --Lennart (DEFINEQ (READNSFILENAME (LAMBDA (STREAM RDTBL) (LET ((colonSyntax (GETSYNTAX (CHARCODE %:) RDTBL)) (braceSyntax (GETSYNTAX (CHARCODE {) RDTBL)) fileAtom) (CL:UNWIND-PROTECT (PROGN (SETSYNTAX (CHARCODE %:) 'OTHER RDTBL) (SETSYNTAX (CHARCODE {) 'OTHER RDTBL) (CL:UNREAD-CHAR #\{ STREAM) (SETQ fileAtom (READ STREAM RDTBL))) (SETSYNTAX (CHARCODE %:) colonSyntax RDTBL) (SETSYNTAX (CHARCODE {) braceSyntax RDTBL)) fileAtom)))) (SETSYNTAX (CHARCODE {) '(MACRO FIRST NOESCQUOTE READNSFILENAME) (FIND-READTABLE "INTERLISP")) (SETSYNTAX (CHARCODE {) '(MACRO FIRST NOESCQUOTE READNSFILENAME) (FIND-READTABLE "XCL"))