emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving kbd to subr.el


From: Eli Zaretskii
Subject: Re: Moving kbd to subr.el
Date: Thu, 14 Oct 2021 10:23:07 +0300

> From: Stefan Kangas <stefankangas@gmail.com>
> 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 <stefan@marxist.se>
> 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."?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]