From: SourceForge.net <no...@so...> - 2005-01-26 09:43:03
|
Bugs item #1109730, was opened at 2005-01-26 10:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1109730&group_id=1355 Category: clisp Group: lisp error Status: Open Resolution: None Priority: 5 Submitted By: Jörg Höhle (hoehle) Assigned to: Sam Steingold (sds) Summary: (setf values-list) broken Initial Comment: Hi, although places.lisp: defmacro setf contains code like this: ((and (eq (first place) 'THE) (eql (length place) 3)) `(SETF ,(third place) (THE ,(second place) ,value)) ) ((and (eq (first place) 'VALUES-LIST) (eql (length place) 2)) `(VALUES-LIST (SETF ,(second place) (MULTIPLE-VALUE-LIST ,value) ) ) ) the expansion for (setf (values-list ...)) does not work as one would guess from the above snippet of code (which strictly implements what impnotes documents): (macroexpand-1'(setf (values-list x) (values 1 2 3))) (LET* ((#:G6659 X)) ((SETF VALUES-LIST) (VALUES 1 2 3) #:G6659)) ; While the other code snippet with (setf THE) works: (macroexpand-1'(setf (the x integer) (values 1 2 3))) (SETF INTEGER (THE X (VALUES 1 2 3))) ; Did I miss the obvious? As a result, (let (x) (setf (values-list x) (values 1 2 3))) errors out with *** - EVAL: undefined function (SETF VALUES-LIST) while the documented transformation (let (x) (values-list (setf x (multiple-value-list (values 1 2 3))))) works. Regards, Jörg Höhle. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1109730&group_id=1355 |