GNU bug report logs - #52523
29.0.50; defcustom :type 'key-sequence not following key-valid-p format

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Wed, 15 Dec 2021 20:36:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Richard Stallman <rms <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 52523 <at> debbugs.gnu.org
Subject: bug#52523: 29.0.50; defcustom :type 'key-sequence not following key-valid-p format
Date: Tue, 21 Dec 2021 23:16:02 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Now that we prefer the key-valid-p format, we should think about what to
  > do about defcustom as well.  We currently have that:

  >     (defcustom foo "C-a" "" :type 'key-sequence)

That defcustom seems to use incorrect syntax for its initial value.
Here are two real ones:

    (defcustom outline-minor-mode-prefix "\C-c@"
      "Prefix key to use for Outline commands in Outline minor mode.
    The value of this variable is checked as part of loading Outline mode.
    After that, changing the prefix key requires manipulating keymaps."
      :type 'key-sequence
      :initialize 'custom-initialize-default
      ...)

    (defcustom gud-key-prefix "\C-x\C-a"
      "Prefix of all GUD commands valid in C buffers."
      :type 'key-sequence)

They both use the literal string syntax, rather than our new
user-friendly `kbd' syntax, but the value is a valid key sequence.

  > Followed by `M-x customize-option RET foo RET' leads to a customize
  > buffer where this is displayed as "C - a".  IOW, there is only support
  > for the legacy format "\C-a".

M-x customize-option RET gud-key-prefix RET shows this:

    Hide Gud Key Prefix: Key sequence: C-x C-a
       [ State ]: STANDARD.
       Prefix of all GUD commands valid in C buffers.
    Groups: [Gud]

It seems that all is working correctly, and nothing
needs to be fixed.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






This bug report was last modified 3 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.