From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Moving kbd to subr.el Date: Thu, 14 Oct 2021 04:50:31 -0700 Message-ID: References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <20211004081727.4F24921048@vcs0.savannah.gnu.org> <871r4qcs8s.fsf@gnus.org> <87o87ubcnl.fsf@gnus.org> <87h7dm9en7.fsf@gnus.org> <87czoa9e7p.fsf@gnus.org> <878ryxakv9.fsf@gnus.org> <834k9km5no.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28342"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 14 13:52:23 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mazHb-00078l-9S for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 13:52:23 +0200 Original-Received: from localhost ([::1]:46456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mazHa-0004a0-7w for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 07:52:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mazG6-0002Kn-8X for emacs-devel@gnu.org; Thu, 14 Oct 2021 07:50:50 -0400 Original-Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:34332) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mazFq-0006ih-KI; Thu, 14 Oct 2021 07:50:49 -0400 Original-Received: by mail-pg1-x52c.google.com with SMTP id 133so5313111pgb.1; Thu, 14 Oct 2021 04:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=rh+lg7XM60ir6G8jJpqBub+rsJlI9aPhmL7hsy4Dyf0=; b=DAqhQ+Sdw2K1a067Mr2YjcqOWqhQQGnuL2kUN1N9v5MNHAdTQWXK2coM2IdLoI74xF PJSVmYnF9QCWyA3u7ES9cWbDrLN/qYnmX7He4l1CTDvrDidMj1/wTNfor38MW/XHHi1F tZrpZqYYX75KH7cCBKKCgwx7WRr3L8jMEuIScJujvxyOmvincwDvd7K2dKGvSxRwBGkY fEFiqGJ4IdPzohDnfZkzv+kUGDs+qyxHSCxineay7KLupShKDFonoslybqff6XGoKqm2 QxUASSX1WNbCgJWjjTCMZxrlALZf7Zr5zGRgupPKwzPl/RFNuDNtdJcQnfwrWwqPtglu gFgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=rh+lg7XM60ir6G8jJpqBub+rsJlI9aPhmL7hsy4Dyf0=; b=RVrT1rvu9ThHozHvNMr5KTA1Vz2AXkO0+CE+NrIdlkW3ccDLWD3G9Y+RSAzfT4gLGC gN3bB00P0sC29qbVjWUC7RK7D+QEvgjKOHrLo0zVyOCRWAcC1VF05FXTEGK/1FUmnrhu 9yoWfVZJZqrgwXZk6VhqnUp/q9tOfvRNP9yWdiZ4hE60B6/vuhMFhoe58wHQCDUoxKPA Sj6LHEOtuXReUjaOq6PN/WKpU5o77Z2hGrDH78kMa2ApJMFsz4oFN9VLhKMvY9awS39a GDC4LyhVtsE2ei/aumu9vm85LzUFUp9pHDsvy0LHHEi/ntewd00Q53erBw7RojwuTCxh jPzA== X-Gm-Message-State: AOAM531xo+lYZmPcJ6ffUA6FmZu59hsNXQVG8JepWlT767wgaJ3/3TZn 02XXC4NDZvssholhmqxye3oMEimdyurHA4B1ZyTlg4qM X-Google-Smtp-Source: ABdhPJyK8eyt3P8b0CQF71G+N5hbgbWSoTysFZyPVjy+sA4rXJIJiPmFjiMfbq2hvSqrre75w3yNzFwK7Hu4wdevdEo= X-Received: by 2002:a63:7559:: with SMTP id f25mr1207421pgn.114.1634212231705; Thu, 14 Oct 2021 04:50:31 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 14 Oct 2021 04:50:31 -0700 In-Reply-To: <834k9km5no.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=stefankangas@gmail.com; helo=mail-pg1-x52c.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:276993 Archived-At: Eli Zaretskii writes: >> definition of 'read-kbd-macro' into it, and adjusting it to no longer >> use CL-Lib functions. > > No NEWS entry? I consider this as an internal change that should have no user impact. So I'm not sure this needs a NEWS-entry; if you think it does, please clarify what you think we should put in it. >> * lisp/subr.el (internal--kbd): Factor out from 'kbd'. Change >> this new function to be suitable for calling from both 'kbd' and >> 'edmacro-parse-keys'. >> * lisp/edmacro.el (edmacro-parse-keys): Replace definition with a >> call to 'internal-kbd'. > > No sure I understand: the rationale for introducing internal--kbd > instead of using kbd directly is because we need an extra optional > argument? if so, why not add that argument to kbd itself? We could, but I feel like that's an implementation detail: an artifact of the fact that kbd and edmacro-parse-keys share code. I don't think the parameter will be useful to users of kbd, and therefore risks confusing instead. So adding a new internal function seemed like a small price to pay. I have added this comment to the beginning of the function to make the reasoning clear: ;; NB. This function exists mainly to avoid adding a "need-vector" ;; argument to the user-facing function `kbd'.