Number: 589

Date: 10-Apr-84 11':08':20

Submitter: Sannella.PA

Source: DonC@ISIF

Subject: PQUOTE doesn''t handle seprs

Assigned To: DONC@ISIF

Attn: Release

Status: Fixed

In/By: 

Problem Type: Bug

Impact: Annoying

Difficulty: 

Frequency: Intermittent

Priority: Hopefully

System: Language Support

Subsystem: Read and Print

Machine: 

Disk: 

Lisp Version: 

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: [this is the PQUOTE on [eris]<LispUsers>, so I will mark this Fixed]'
["Masinter.pa" "18-Sep-84 15':40':30" Assigned% To': Attn': Status':(Open->Fixed) Impact':(Minor->Annoying) Disposition':]

Description: '
Date':  7 APR 84 23':10 PST'
From': MASINTER.PA'
Subject': AR, read & print, Minor, Subject': PQUOTE doesn''t handle seprs'
To':   lispsupport'
'
    196, 10 JAN, To': LispSupport -- problems with PQUOTE'
 -  192, 10 JAN, To': ... -- [Don.Cohen <DONC@USC-ISIF.ARPA>': lispuser packages]'
'
'
'
192  *********************'
Date': 10 Jan 84 12':47 PST'
From': masinter.pa'
Subject': [Don.Cohen <DONC@USC-ISIF.ARPA>': lispuser packages]'
To': 1100Support'
cc': LispSupport, masinter.pa'
'
Don Cohen is primarily an Interlisp-VAX user, but he has submitted a number of LispUsers packages.'
'
'
     ----- Fowarded Messages -----'
'
Received': from USC-ISIF.ARPA by PARC-MAXC.ARPA; 10 JAN 84 12':20':42 PST'
Date': 10 Jan 84 12':19 PST'
Subject': lispuser packages'
From': Don.Cohen <DONC@USC-ISIF.ARPA>'
To': masinter.PA'
cc': lipkis@USC-ISIF.ARPA'
'
I''ve just been talking with Tom Lipkis, who showed me the new lisp manual'
and various documentation for lispusers packages.  I noticed that TRACEIN'
was in the list (but not described), and that ALL, COMMENTS, WAKEUP were'
not mentioned.  I believe that LOSTLISTS is the only package that is PDP10'
specific.  The others certainly work on the VAX and, except for WAKEUP, '
I''ve seen them work on dolphins.  WAKEUP should work on a dolphin, but it'
loses some of its value since the dolphin has no auditory output.'
I also noticed a package called PQUOTE.  I have something like that, but'
it was nontrivial to build, so I suspected that PQUOTE might be wrong. '
Tom agreed with me, so I have now extracted the pieces of my version and'
I send them along.  I can explain the various pitfalls if you''re'
interested.  This is <DONC>PQUOTE on ISIF - If you want it I''ll write'
documentation. '
'
(FILECREATED "10-Jan-84 12':07':33" <DONC>PQUOTE..2 1183   '
'
      changes to':  (VARS PQUOTECOMS)'
'
      previous date': "10-Jan-84 12':00':55" <DONC>PQUOTE..1)'
'
'
(PRETTYCOMPRINT PQUOTECOMS)'
'
(RPAQQ PQUOTECOMS ((FNS READ'' PRINTQUOTE)			       |'
		   (P (SETSYNTAX 39 (QUOTE (MACRO FIRST NONIMMEDIATE   |'
						  NOESCQUOTE READ''))   |'
				 T)				       |'
		      (SETSYNTAX 39 (GETSYNTAX 39 T)		       |'
				 FILERDTBL)			       |'
		      (SETQ PRETTYPRINTMACROS			       |'
			    (CONS (CONS (QUOTE QUOTE)		       |'
					(QUOTE PRINTQUOTE))	       |'
				  PRETTYPRINTMACROS))		       |'
		      (* ALISTS and ADDVARS fail here))))'
(DEFINEQ'
'
(READ'''
  (LAMBDA (FILE RDTBL)'
    (KWOTE (READ FILE RDTBL))))'
'
(PRINTQUOTE'
  (LAMBDA (X)'
    (COND'
      ((AND (LISTP (CDR X))'
	    (NULL (CDDR X)))'
	(PRIN1 "''")'
	(PRINTDEF (CADR X)'
		  (POSITION))'
	NIL)'
      (T X))))'
)'
(SETSYNTAX 39 (QUOTE (MACRO FIRST NONIMMEDIATE NOESCQUOTE READ''))'
	   T)'
(SETSYNTAX 39 (GETSYNTAX 39 T)'
	   FILERDTBL)'
(SETQ PRETTYPRINTMACROS (CONS (CONS (QUOTE QUOTE)'
				    (QUOTE PRINTQUOTE))'
			      PRETTYPRINTMACROS))'
(* ALISTS and ADDVARS fail here)'
(DECLARE': DONTCOPY'
  (FILEMAP (NIL (646 892 (READ'' 658 . 721) (PRINTQUOTE 725 . 889)))))'
STOP'
-------'
'
     ----- End of Forwarded Messages -----196  *********************'
Date': 10 JAN 84 15':10 PST'
From': MASINTER.PA'
Subject': problems with PQUOTE'
To':   LispSupport'
'
Received': from USC-ISIF.ARPA by PARC-MAXC.ARPA; 10 JAN 84 14':53':25 PST'
Date': 10 Jan 84 14':52 PST'
Subject': Re': lispuser packages'
From': Don.Cohen <DONC@USC-ISIF.ARPA>'
To': masinter.pa'
In-Reply-To': Your message of 10 Jan 84 12':46 PST'
'
Now that I''ve had a chance to look at your PQUOTE, here''s the problem':'
READ'' doesn''t read right if there''s a CR after the ''.  With your PQUOTE'
I was able to get the prettyprinter to print '' followed by CR followed by'
a list on the next line.  My solution was to change READ'' so that it would'
read the right thing in that case.  The only difference is that in my version'
when you type (at the terminal) '' followed by CR (or any sepr) the next thing'
gets quoted - which I don''t think is unreasonable.  I was glad to see that'
you caught the nasty cases of "fake" quotes, as in (BQUOTE (QUOTE , x)).'
The * problem would go away with my new READ''.  What''s more, the current'
READ'' will mess up if someone invents a new prettyprintmacro that sticks'
in a sepr char.  (I can tell I''m about to get a mass of counterarguments...)'
-------'


Workaround: 

Test Case: 

Edit-By: Masinter.pa

Edit-Date: 18-Sep-84 15':40':31