diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-03 20:41:04 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-03 20:41:04 +0200 |
commit | 277bbc5d1a53e335668f33bf6e9656e16f8acc24 (patch) | |
tree | 61b48130a5995ad7a814ca0b311de470f011b9f8 | |
parent | c1e2a414b56ffd61d03cdfb0eedb7752083ea0c8 (diff) |
Make lists starting with the symbol QUOTE print nicely.
-rw-r--r-- | MLKCons.m | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -17,6 +17,7 @@ */ #import "MLKCons.h" +#import "MLKPackage.h" #import "runtime-compatibility.h" #import <Foundation/NSArray.h> @@ -112,7 +113,11 @@ -(NSString *)descriptionForLisp { - return [NSString stringWithFormat:@"(%@)", [self bareDescriptionForLisp]]; + if ([_cdr isKindOfClass:[MLKCons class]] + && _car == [[MLKPackage findPackage:@"COMMON-LISP"] intern:@"QUOTE"]) + return [NSString stringWithFormat:@"'%@", [_cdr bareDescriptionForLisp]]; + else + return [NSString stringWithFormat:@"(%@)", [self bareDescriptionForLisp]]; } -(void) dealloc |