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: Richard Stallman
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)







reply via email to

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