Changeset 11135


Ignore:
Timestamp:
02/15/07 11:37:08 (15 years ago)
Author:
piso
Message:

MULTIPLE-VALUE-SETQ: return the primary value of the value-form, even if varlist is empty (Eric Marsden).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/multiple-value-setq.lisp

    r6396 r11135  
    11;;; multiple-value-setq.lisp
    22;;;
    3 ;;; Copyright (C) 2004 Peter Graves
    4 ;;; $Id: multiple-value-setq.lisp,v 1.1 2004-03-31 02:51:38 piso Exp $
     3;;; Copyright (C) 2004-2007 Peter Graves
     4;;; $Id: multiple-value-setq.lisp,v 1.2 2007-02-15 11:37:08 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2525  (unless (and (listp varlist) (every #'symbolp varlist))
    2626    (error "~S is not a list of symbols." varlist))
    27   `(values (setf (values ,@varlist) ,value-form)))
     27  ;; MULTIPLE-VALUE-SETQ is required always to return the primary value of the
     28  ;; value-form, even if varlist is empty.
     29  (if varlist
     30    `(values (setf (values ,@varlist) ,value-form))
     31    `(values ,value-form)))
Note: See TracChangeset for help on using the changeset viewer.