From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:f42::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id wNJ4CGz0zGGdXQAAsNZ9tg (envelope-from ); Wed, 29 Dec 2021 23:51:08 +0000 Received: from out0.migadu.com ([2001:41d0:2:267::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QGZWCGz0zGHCJgEAauVa8A (envelope-from ); Thu, 30 Dec 2021 00:51:08 +0100 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1640821868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4yzxT/4gxecy3mv+yVqBC+vIEjkqM/7PZ6osdPY1pNo=; b=BEuvEne0lj2K+EjZE2EzeMCHJ+ya8+VNajiUdZus4ZIaYsFcxFAll/2eYURqvdJebYMZ4s 7PdottvCnL4fyw3tnjjO+4ArP+xxOVYJvTxiXLxfkqc2GxxqHkc0zOer0MhOyw+97V7BGn XvAJ5rj+tm3c9F4CZrEbatxHkcFNw6yvBMT/i3vumwEKNWJ3ZNhDwCtq1181JWBVeaJkwz Qb0rdm12UASbjJO3Emx31qjzYFtgLPApwtrAZNcDT4igw+lkBeeJzDsBBBnZsEG9gqvNHm KhSp/a2LThmHbn76iuJc76cg6avHmjcAhgcuoEGvo9rwoAam/jTi77qgmI/4qw== From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [RFC PATCH 09/14] piem-am-create: Move info argument to the end Date: Wed, 29 Dec 2021 18:50:31 -0500 Message-Id: <20211229235036.372313-10-kyle@kyleam.com> In-Reply-To: <20211229235036.372313-1-kyle@kyleam.com> References: <20211229235036.372313-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyleam.com X-TUID: mIpf7MoVPIZ+ The new -extend variant will share all the same arguments except for INFO, so move that to the end. --- piem-b4.el | 6 +++--- piem.el | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/piem-b4.el b/piem-b4.el index 01004c4b..d2370124 100644 --- a/piem-b4.el +++ b/piem-b4.el @@ -164,11 +164,11 @@ (defun piem-b4-am-from-mid-create (mid &optional args toggle-worktree) (unwind-protect (piem-am-create mbox-file nil + coderepo + toggle-worktree (with-temp-buffer (insert-file-contents (or cover mbox-file)) - (piem-extract-mbox-info)) - coderepo - toggle-worktree) + (piem-extract-mbox-info))) (when clean-fn (funcall clean-fn))))) diff --git a/piem.el b/piem.el index 1c00cab8..cb931489 100644 --- a/piem.el +++ b/piem.el @@ -948,13 +948,13 @@ (defun piem-am--arguments () ;; downstream code know. (list (cons :interactive mbox) format - (piem-extract-mbox-info mbox) (or piem-edit-patch--coderepo (piem-inbox-coderepo-maybe-read)) - current-prefix-arg))) + current-prefix-arg + (piem-extract-mbox-info mbox)))) ;;;###autoload -(defun piem-am-create (mbox &optional format info coderepo toggle-worktree) +(defun piem-am-create (mbox &optional format coderepo toggle-worktree info) "Create a new branch by feeding an am-ready mbox to `git am'. MBOX is a buffer whose contents are an am-ready mbox (obtained @@ -963,16 +963,16 @@ (defun piem-am-create (mbox &optional format info coderepo toggle-worktree) am'. \"mbox\" and \"mboxrd\" are valid values, and \"mboxrd\" is the default. -INFO is a plist that with information to help choose a default -branch name or starting point (see `piem-default-branch-function' -for a list of possible properties). - CODEREPO, if given, indicates the code repository to operate within. If not specified, the default directory is used. When prefix argument TOGGLE-WORKTREE is non-nil, invert the meaning of `piem-am-create-worktree'. With the default value, -this triggers the creation of a new worktree." +this triggers the creation of a new worktree. + +INFO is a plist that with information to help choose a default +branch name or starting point (see `piem-default-branch-function' +for a list of possible properties)." (interactive (piem-am--arguments)) (let* ((default-directory (or coderepo default-directory)) (am-directory default-directory) -- 2.34.0