summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-03 20:41:04 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-03 20:41:04 +0200
commit277bbc5d1a53e335668f33bf6e9656e16f8acc24 (patch)
tree61b48130a5995ad7a814ca0b311de470f011b9f8
parentc1e2a414b56ffd61d03cdfb0eedb7752083ea0c8 (diff)
Make lists starting with the symbol QUOTE print nicely.
-rw-r--r--MLKCons.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/MLKCons.m b/MLKCons.m
index f56cfd7..5bc761a 100644
--- a/MLKCons.m
+++ b/MLKCons.m
@@ -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