From: David Vázquez Date: Thu, 20 Feb 2014 00:04:47 +0000 (+0100) Subject: Fix SYMBOL-PLIST and (SETF SYMBOL-PLIST) X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=a2bb848e0037e127287781e99528bc4e93ccc2fb;p=jscl.git Fix SYMBOL-PLIST and (SETF SYMBOL-PLIST) --- diff --git a/src/symbol.lisp b/src/symbol.lisp index 0234232..02d9514 100644 --- a/src/symbol.lisp +++ b/src/symbol.lisp @@ -15,8 +15,10 @@ (defun symbol-plist (x) (cond - ((symbolp x) (error "`~a' is not a symbol." x)) - ((in "plist" x) (oget* x "plist")))) + ((not (symbolp x)) + (error "`~a' is not a symbol." x)) + ((in "plist" x) + (oget* x "plist")))) (defun set-symbol-plist (new-value x) (if (symbolp x) @@ -26,12 +28,11 @@ (define-setf-expander symbol-plist (x) (let ((g!x (gensym)) (g!value (gensym))) - (list (list g!x) - (list x) - (list g!value) - `(set-symbol-plist ,g!value ,g!x) - `(symbol-plist ,g!value)))) + (values (list g!x) + (list x) + (list g!value) + `(set-symbol-plist ,g!value ,g!x) + `(symbol-plist ,g!x)))) (defun get (symbol indicator &optional default) (getf (symbol-plist symbol) indicator default)) -