From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Moving kbd to subr.el Date: Thu, 14 Oct 2021 10:23:07 +0300 Message-ID: <834k9km5no.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10417"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 14 09:24:06 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 1mav5y-0002Rd-5X for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 09:24:06 +0200 Original-Received: from localhost ([::1]:37514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mav5x-0003UE-2L for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 03:24:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mav54-0001mx-U3 for emacs-devel@gnu.org; Thu, 14 Oct 2021 03:23:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36782) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mav54-0006sm-CW; Thu, 14 Oct 2021 03:23:10 -0400 Original-Received: from [87.69.77.57] (port=2181 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mav54-0003py-1K; Thu, 14 Oct 2021 03:23:10 -0400 In-Reply-To: (message from Stefan Kangas on Wed, 13 Oct 2021 15:28:36 -0700) 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:276970 Archived-At: > From: Stefan Kangas > Date: Wed, 13 Oct 2021 15:28:36 -0700 > Cc: emacs-devel@gnu.org > > From e732aed70f61b6822f37987312d55b8d6a0be223 Mon Sep 17 00:00:00 2001 > From: Stefan Kangas > Date: Wed, 13 Oct 2021 01:40:14 +0200 > Subject: [PATCH 1/2] Make kbd usable during bootstrap > > * lisp/subr.el (kbd): Make kbd usable during bootstrap by copying the Please quote the 2nd instance of "kbd". > definition of 'read-kbd-macro' into it, and adjusting it to no longer > use CL-Lib functions. No NEWS entry? > * 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? > +(defun internal--kbd (string &optional need-vector) > "Convert KEYS to the internal Emacs key representation. > -KEYS should be a string in the format returned by commands such > -as `C-h k' (`describe-key'). > -This is the same format used for saving keyboard macros (see > -`edmacro-mode'). > - > -For an approximate inverse of this, see `key-description'." > +This is an internal function, and should not be used directly. > +See instead `kbd'." ^^^^^^^^^^^^^^^^^ This sounds awkward. Why not "Use `kbd' instead."?