From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36294 invoked by alias); 23 Apr 2017 19:24:56 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 36284 invoked by uid 89); 23 Apr 2017 19:24:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=Application, connectivity, Hx-languages-length:1197, chaw X-HELO: homiemail-a21.g.dreamhost.com Received: from sub3.mail.dreamhost.com (HELO homiemail-a21.g.dreamhost.com) (69.163.253.7) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 23 Apr 2017 19:24:54 +0000 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id AB06E1C0065; Sun, 23 Apr 2017 12:24:54 -0700 (PDT) Received: from vereq.eip10.org (cpe-74-75-122-130.maine.res.rr.com [74.75.122.130]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: chaw@eip10.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id 87FDE1C0063; Sun, 23 Apr 2017 12:24:54 -0700 (PDT) Received: from chaw by vereq.eip10.org with local (Exim 4.84_2) (envelope-from ) id 1d2N7t-0001Us-Jj; Sun, 23 Apr 2017 15:24:53 -0400 To: Per Bothner cc: kawa Subject: Re: Using #!optional, #!rest, and #!key together From: "Sudarshan S Chawathe" Reply-To: "Sudarshan S Chawathe" In-reply-to: Your message of "Sat, 22 Apr 2017 18:11:57 -0700." <792B84DD-C6FA-4C57-9241-4FC0E59A9F3C@bothner.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5756.1492975493.1@vereq.eip10.org> Date: Sun, 23 Apr 2017 19:24:00 -0000 Message-ID: <5757.1492975493@vereq.eip10.org> X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00029.txt.bz2 > I'm in a location with unexpectedly very bad connectivity. Check the > invoke branch. It allows #!Rest *after* #!Key. See Application and > arguments list in manual. Thanks for the suggestion! (I'm not sure why I switched back to master from invoke a while back.) I just switched over to the invoke branch and "rest after key" arguments seems to work as expected (and also seems forgiving about ignoring extra arguments). The rest is just for completeness, in case it helps someone down the road... (define-syntax list/names (syntax-rules () ((_ name ...) (list (cons 'name name) ...)))) (define test-args-2 (lambda (a b #!optional c d #!key (f 'vf) (g 'vg) #!rest e) (list/names a b c d f g e))) (test-args-2 1 2 3 4 f: 6 g: 7 5) ;; => ((a . 1) (b . 2) (c . 3) (d . 4) (f . 6) (g . 7) (e 5)) (test-args-2 1 2 3 4 f: 7 g: 8 5 6) ;; => ((a . 1) (b . 2) (c . 3) (d . 4) (f . 7) (g . 8) (e 5 6)) ;; The next two are really errors. (test-args-2 1 2 3 4 5 f: 6 g: 7) ;; => ((a . 1) (b . 2) (c . 3) (d . 4) (f . 6) (g . 7) (e)) (test-args-2 1 2 3 4 5 6 f: 7 g: 8) ;; => ((a . 1) (b . 2) (c . 3) (d . 4) (f . 7) (g . 8) (e)) Regards, -chaw