bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52523: 29.0.50; defcustom :type 'key-sequence not following key-vali


From: Eli Zaretskii
Subject: bug#52523: 29.0.50; defcustom :type 'key-sequence not following key-valid-p format
Date: Tue, 28 Dec 2021 14:51:08 +0200

> From: Stefan Kangas <stefan@marxist.se>
> Date: Mon, 27 Dec 2021 19:08:42 -0800
> Cc: 52523@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
> 
> Having looked over the documentation to these functions, I actually
> think "key" is the least confusing name here.
> 
> How does the attached patch look?
> 
>  
> +@item key
> +The value is a valid key according to @kbd{key-valid-p}, and suitable
> +for use with, for example @code{keymap-set}.

But the doc string of key-valid-p says:

  Say whether KEYS is a valid ‘kbd’ sequence.
  A ‘kbd’ sequence is a string consisting of one and more key
  strokes.  The key strokes are separated by a space character.

So just referring to key-valid-p is not enough, because it accepts a
more general kind of objects.

>  (define-widget 'key-sequence 'restricted-sexp
> -  "A key sequence."
> +  "A key sequence.  Now obsolete; use the `key' type instead."

Please drop the "Now" part: it doesn't fare well with time.  Instead,
say something like "This is obsolete; ...".





reply via email to

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