chiark / gitweb /
lib/keyword.c (kw_parseempty): Use correct variable scanning `kwval' list.
[sod] / src / pset-proto.lisp
index 2620585e645feb3347abe61dfd5fb07f11ff10e3..f03ec51376746f0aaede4dceb291252b241a13bc 100644 (file)
@@ -43,9 +43,9 @@ (defstruct (property
             (:predicate propertyp)
             (:conc-name p-)
             (:constructor %make-property
-                          (name value
-                           &key type location seenp
-                           &aux (key (property-key name)) (%type type))))
+                (name value
+                 &key type location seenp
+                 &aux (key (property-key name)) (%type type))))
   "A simple structure for holding a property in a property set.
 
    The main useful feature is the ability to tick off properties which have
@@ -66,14 +66,8 @@ (define-access-wrapper p-type p-%type :read-only t)
 (export 'decode-property)
 (defgeneric decode-property (raw)
   (:documentation "Decode a RAW value into a TYPE, VALUE pair.")
-  (:method ((raw symbol)) (values :symbol raw))
-  (:method ((raw integer)) (values :int raw))
-  (:method ((raw string)) (values :string raw))
-  (:method ((raw character)) (values :char raw))
   (:method ((raw property)) (values (p-type raw) (p-value raw)))
-  (:method ((raw cons)) (values (car raw) (cdr raw)))
-  (:method ((raw function)) (values :func raw))
-  (:method ((raw c-type)) (values :type raw)))
+  (:method ((raw cons)) (values (car raw) (cdr raw))))
 
 (export 'make-property)
 (defun make-property (name raw-value &key type location seenp)
@@ -99,9 +93,10 @@ (defgeneric coerce-property-value (value type wanted)
   ;; say it didn't work.
   (:method (value type wanted)
     (if (eql type wanted) value
-       (error "Incorrect type: expected ~A but found ~A" wanted type)))
+       (error "Incorrect type: expected ~(~A~) but found ~(~A~)"
+              wanted type)))
 
-  ;; If the caller asks for type T then give him the raw thing.
+  ;; If the caller asks for type T then give them the raw thing.
   (:method (value type (wanted (eql t)))
     (declare (ignore type))
     value))