From patchwork Mon Mar 29 10:18:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 28163 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BAC1927BC65; Mon, 29 Mar 2021 11:19:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6BB7C27BC66 for ; Mon, 29 Mar 2021 11:19:31 +0100 (BST) Received: from localhost ([::1]:59442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQoza-0006qR-K3 for patchwork@mira.cbaines.net; Mon, 29 Mar 2021 06:19:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQozK-0006ou-Cp for guix-patches@gnu.org; Mon, 29 Mar 2021 06:19:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQoz9-0003mD-Mo for guix-patches@gnu.org; Mon, 29 Mar 2021 06:19:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQoz9-0008LV-Ip for guix-patches@gnu.org; Mon, 29 Mar 2021 06:19:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47464] [PATCH 4/8] scripts: edit: Replace 'args-fold*' by 'parse-command-line'. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 29 Mar 2021 10:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47464 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47464@debbugs.gnu.org Cc: zimoun Received: via spool by 47464-submit@debbugs.gnu.org id=B47464.161701311131985 (code B ref 47464); Mon, 29 Mar 2021 10:19:03 +0000 Received: (at 47464) by debbugs.gnu.org; 29 Mar 2021 10:18:31 +0000 Received: from localhost ([127.0.0.1]:47907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQoyb-0008Jn-UB for submit@debbugs.gnu.org; Mon, 29 Mar 2021 06:18:30 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:35551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQoyS-0008Ia-Pz for 47464@debbugs.gnu.org; Mon, 29 Mar 2021 06:18:21 -0400 Received: by mail-wr1-f52.google.com with SMTP id j18so12267783wra.2 for <47464@debbugs.gnu.org>; Mon, 29 Mar 2021 03:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8v341+EHxxi+k3WdjfIHURxKm/O3/7PHLXMJvPUn9ao=; b=TWavfS/eVzlvuYM4TTqZ9zFOUvWxZJe8Kgzf40hOLWOw1+uG4npMV6qlxe+h2M5y7F jZkwWPcbL4hDoe0jLjAl8r9bwGS0PSz/7ilghphOF+6sHTaQfgt/Cea3sNQ1uwgutJ36 +E1OqeMetl90ubMA1dAca2ukOEE5YHiwdhKG0DFLPkN36Z/4oaQ0tjZDYYBFrqaQ1c61 FNuaoMawhePLjjFdfcAfom/rRgJCQ5WoRVUcRQZJAI+xVdY2ZuhLSQfm+hnqnOTvAIDW m2PXx61V03O3HJ+2AMtRAZDCK1eq9RYSFtaJTWOABtduXOhjeyoeUp2Orw7iq2xIi0bK 968Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8v341+EHxxi+k3WdjfIHURxKm/O3/7PHLXMJvPUn9ao=; b=NVlTiXrTC2VvcyOceaZwf8PgoVvPcY0Mt0eYN9I4K0WDc7fHGo1aGWU8c5RSsw9zrx 450aVW2hoA/lpaeOH18dDNezQTFM7L5XH4RJeOrRki5u67lzighBNM8rr3VMt5jhj3Z7 +r0oR6vidbwWVPy7BRXO6jB6GIgkdq4VPLksgVaYNpyotL4cgfhBywOcy/DgAowvmI2H 8fiAYu0FSzvXsuC75Y2523jrhhfM9JdnFHT9572ZeLzVYRQ0wz5lRJSbQIlDgw/vKbWs Aqrz/8u2PnUDT6SBJXbHo/kCNotDIdWcB4b0b3/Cb458LunXQ0lcPbpEmCYO8kivjoMB Wt3w== X-Gm-Message-State: AOAM531tgjupoeGEx2YxU0Tt2yGDwTBLgJdDkZW6uSMnyIoozDORzruL 3+wMSa35/1zAUFAr99hxDGjaearxAkY= X-Google-Smtp-Source: ABdhPJyUY/e7hayUL7G7Eq59Fyvr7OZlFnTYJ1VLkkBIYt+PNllMVLmuvMcfI4YORS6mpoJScd/nJg== X-Received: by 2002:a5d:5083:: with SMTP id a3mr28073628wrt.38.1617013095286; Mon, 29 Mar 2021 03:18:15 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.110]) by smtp.gmail.com with ESMTPSA id 135sm25291792wma.44.2021.03.29.03.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 03:18:15 -0700 (PDT) From: zimoun Date: Mon, 29 Mar 2021 12:18:02 +0200 Message-Id: <20210329101806.54004-4-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210329101806.54004-1-zimon.toutoune@gmail.com> References: <20210329101806.54004-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/scripts/edit.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. --- guix/scripts/edit.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm index 49c9d945b6..b4c0507591 100644 --- a/guix/scripts/edit.scm +++ b/guix/scripts/edit.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2016, 2019, 2020 Ludovic Courtès ;;; Copyright © 2015 Mathieu Lirzin -;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2020, 2021 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -84,11 +84,9 @@ line." (define (parse-arguments) ;; Return the list of package names. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - cons - '())) + (parse-command-line args %options (list (list)) + #:build-options? #f + #:argument-handler cons)) (with-error-handling (let* ((specs (reverse (parse-arguments)))