Fix :version tag for 'which-key' custom data

* lisp/which-key.el (which-key-idle-delay)
(which-key-idle-secondary-delay, which-key-echo-keystrokes)
(which-key-max-description-length)
(which-key-min-column-description-width)
(which-key-add-column-padding, which-key-unicode-correction)
(which-key-dont-use-unicode, which-key-separator)
(which-key-ellipsis, which-key-prefix-prefix)
(which-key-compute-remaps, which-key-replacement-alist)
(which-key-allow-multiple-replacements)
(which-key-show-docstrings, which-key-highlighted-command-list)
(which-key-special-keys, which-key-buffer-name)
(which-key-show-prefix, which-key-popup-type)
(which-key-min-display-lines, which-key-max-display-columns)
(which-key-side-window-location, which-key-side-window-slot)
(which-key-side-window-max-width)
(which-key-side-window-max-height, which-key-frame-max-width)
(which-key-frame-max-height)
(which-key-allow-imprecise-window-fit)
(which-key-show-remaining-keys, which-key-sort-order)
(which-key-sort-uppercase-first, which-key-paging-prefixes)
(which-key-paging-key, which-key-use-C-h-commands)
(which-key-show-early-on-C-h, which-key-is-verbose)
(which-key-preserve-window-configuration)
(which-key-hide-alt-key-translations, which-key-delay-functions)
(which-key-allow-regexps, which-key-inhibit-regexps)
(which-key-show-transient-maps, which-key-init-buffer-hook)
(which-key-key-face, which-key-separator-face)
(which-key-note-face, which-key-command-description-face)
(which-key-local-map-description-face)
(which-key-highlighted-command-face)
(which-key-group-description-face, which-key-special-key-face)
(which-key-docstring-face)
(which-key-custom-popup-max-dimensions-function)
(which-key-custom-hide-popup-function)
(which-key-custom-show-popup-function, which-key-lighter)
(which-key-inhibit-display-hook)
(which-key-this-command-keys-function)
(which-key-allow-evil-operators)
(which-key-show-operator-state-maps): Rename :version to
:package-version and add new :version tags indicating that
'which-key' was added with Emacs 30.
This commit is contained in:
Philip Kaludercic 2024-06-15 21:24:46 +02:00
parent f2077bca79
commit 43a2240119
No known key found for this signature in database

View file

@ -62,7 +62,7 @@ A value of zero might lead to issues, so a non-zero value is
recommended
(see https://github.com/justbur/emacs-which-key/issues/134)."
:type 'float
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-idle-secondary-delay nil
"Seconds to wait for which-key to pop up after initial display.
@ -70,7 +70,7 @@ This makes it possible to shorten the delay for subsequent popups
in the same key sequence. The default is for this value to be
nil, which disables this behavior."
:type '(choice float (const :tag "Disabled" nil))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-echo-keystrokes (if (and echo-keystrokes
(> (+ echo-keystrokes 0.01)
@ -83,7 +83,7 @@ This only applies if `which-key-popup-type' is minibuffer or
`which-key-idle-delay' or else the keystroke echo will erase the
which-key popup."
:type 'float
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-max-description-length 27
"Truncate the description of keys to this length.
@ -96,17 +96,17 @@ before. Truncation is done using `which-key-ellipsis'."
(integer :tag "Width in characters")
(float :tag "Use fraction of available width")
function)
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-min-column-description-width 0
"Every column should at least have this width."
:type 'natnum
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-add-column-padding 0
"Additional spaces to add to the left of each key column."
:type 'integer
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-unicode-correction 3
"Correction for wide unicode characters.
@ -122,14 +122,14 @@ additional ASCII character in the which-key buffer. Increase this
number if you are seeing characters get cutoff on the right side
of the which-key popup."
:type 'integer
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-dont-use-unicode nil
"If non-nil, don't use any unicode characters in default setup.
For affected settings, see `which-key-replacement-alist', `which-key-ellipsis'
`which-key-separator'."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-separator
(if which-key-dont-use-unicode " : " "")
@ -137,7 +137,7 @@ For affected settings, see `which-key-replacement-alist', `which-key-ellipsis'
Default is \" \", unless `which-key-dont-use-unicode' is non
nil, in which case the default is \" : \"."
:type 'string
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-ellipsis
(if which-key-dont-use-unicode ".." "")
@ -146,20 +146,20 @@ Default is \"…\", unless `which-key-dont-use-unicode' is non nil,
in which case the default is \"..\". This can also be the empty
string to truncate without using any ellipsis."
:type 'string
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-prefix-prefix "+"
"Prefix string to indicate a key bound to a keymap.
Default is \"+\"."
:type 'string
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-compute-remaps nil
"If non-nil, show remapped commands.
This applies to commands that have been remapped given the
currently active keymaps."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-replacement-alist
`(((nil . "which-key-show-next-page-no-cycle") . (nil . "wk next pg"))
@ -202,7 +202,7 @@ non-nil value."
(choice regexp (const nil)))
:value-type (cons (choice string (const nil))
(choice string (const nil))))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-allow-multiple-replacements nil
"Allow a key binding to be modified by multiple elements.
@ -211,7 +211,7 @@ patterns in `which-key-replacement-alist'. When nil, only the
first match is used to perform replacements from
`which-key-replacement-alist'."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-show-docstrings nil
"If non-nil, show each command's docstring in the which-key popup.
@ -224,7 +224,7 @@ you use this feature."
(const :tag "Do not show docstrings" nil)
(const :tag "Add docstring to command names" t)
(const :tag "Replace command name with docstring" docstring-only))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-highlighted-command-list '()
"Rules used to highlight certain commands.
@ -234,7 +234,7 @@ matching command names and use
the element is a cons cell, it should take the form (regexp .
face to apply)."
:type '(repeat (choice string (cons regexp face)))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-special-keys '()
"These keys will automatically be truncated to one character.
@ -243,12 +243,12 @@ is disabled by default. An example configuration is
\(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\" \"ESC\" \"DEL\")\)"
:type '(repeat string)
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-buffer-name " *which-key*"
"Name of which-key buffer."
:type 'string
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-show-prefix 'echo
"Whether to and where to display the current prefix sequence.
@ -260,7 +260,7 @@ and nil. nil turns the feature off."
(const :tag "In the echo area" echo)
(const :tag "In the mode-line" mode-line)
(const :tag "Hide" nil))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-popup-type 'side-window
"Supported types are minibuffer, side-window, frame, and custom."
@ -268,18 +268,18 @@ and nil. nil turns the feature off."
(const :tag "Show in side window" side-window)
(const :tag "Show in popup frame" frame)
(const :tag "Use your custom display functions" custom))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-min-display-lines 1
"Minimum number of horizontal lines to display in the which-key buffer."
:type 'integer
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-max-display-columns nil
"Maximum number of columns to display in the which-key buffer.
A value of nil means don't impose a maximum."
:type '(choice integer (const :tag "Unbounded" nil))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-side-window-location 'bottom
"Location of which-key popup when `which-key-popup-type' is side-window.
@ -293,7 +293,7 @@ location is tried."
(const top)
(const (right bottom))
(const (bottom right)))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-side-window-slot 0
"The `slot' to use for `display-buffer-in-side-window'.
@ -307,31 +307,31 @@ preceding (that is, above or on the left of) the middle slot. A
positive value means use a slot following (that is, below or on
the right of) the middle slot. The default is zero."
:type 'integer
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-side-window-max-width 0.333
"Maximum width of which-key popup when type is side-window.
This variable can also be a number between 0 and 1. In that case,
it denotes a percentage out of the frame's width."
:type 'float
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-side-window-max-height 0.25
"Maximum height of which-key popup when type is side-window.
This variable can also be a number between 0 and 1. In that case, it denotes
a percentage out of the frame's height."
:type 'float
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-frame-max-width 60
"Maximum width of which-key popup when type is frame."
:type 'natnum
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-frame-max-height 20
"Maximum height of which-key popup when type is frame."
:type 'natnum
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-allow-imprecise-window-fit (not (display-graphic-p))
"Allow which-key to use a simpler method for resizing the popup.
@ -341,13 +341,13 @@ this on may help.
See https://github.com/justbur/emacs-which-key/issues/130
and https://github.com/justbur/emacs-which-key/issues/225."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-show-remaining-keys nil
"Show remaining keys in last slot, when keys are hidden."
:type '(radio (const :tag "Yes" t)
(const :tag "No" nil))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-sort-order #'which-key-key-order
"Order in which the key bindings are sorted.
@ -367,25 +367,25 @@ information."
(function-item which-key-description-order)
(function-item which-key-prefix-then-key-order)
(function-item which-key-local-then-key-order))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-sort-uppercase-first t
"If non-nil, uppercase comes before lowercase in sorting.
This applies to the function chosen in
`which-key-sort-order'. Otherwise, the order is reversed."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-paging-prefixes '()
"Enable paging for these prefixes."
:type '(repeat string)
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-paging-key "<f5>"
"Key to use for changing pages.
Bound after each of the prefixes in `which-key-paging-prefixes'"
:type 'string
:version "1.0")
:package-version "1.0" :version "30.1")
;; (defcustom which-key-undo-key nil
;; "Key (string) to use for undoing keypresses. Bound recursively
@ -404,7 +404,7 @@ Normally `help-char' after a prefix calls
`describe-prefix-bindings'. This changes that command to a
which-key paging command when `which-key-mode' is active."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-show-early-on-C-h nil
"Allow \\`C-h' (`help-char') to trigger which-key popup before timer.
@ -420,12 +420,12 @@ using \\`C-h'.
Note that `which-key-idle-delay' should be set before turning on
`which-key-mode'."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-is-verbose nil
"Whether to warn about potential mistakes in configuration."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-preserve-window-configuration nil
"Save and restore window configuration around which-key popup display.
@ -435,7 +435,7 @@ prevents which-key from changing window position of visible
buffers. Only takken into account when popup type is
side-window."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defvar which-key-C-h-map-prompt
(concat " \\<which-key-C-h-map>"
@ -503,7 +503,7 @@ of terminals issue META modifier for the Alt key.
See Info node `(emacs)Modifier Keys'."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-delay-functions nil
"List of functions that may delay the which-key popup.
@ -519,7 +519,7 @@ this list to return a value is the value that is used.
The delay time is effectively added to the normal
`which-key-idle-delay'."
:type '(repeat function)
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-allow-regexps nil
"A list of regexp strings to use to filter key sequences.
@ -527,7 +527,7 @@ When non-nil, for a key sequence to trigger the which-key popup
it must match one of the regexps in this list. The format of the
key sequences is what is produced by `key-description'."
:type '(repeat regexp)
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-inhibit-regexps nil
"A list of regexp strings to use to filter key sequences.
@ -535,7 +535,7 @@ When non-nil, for a key sequence to trigger the which-key popup
it cannot match one of the regexps in this list. The format of
the key sequences is what is produced by `key-description'."
:type '(repeat regexp)
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-show-transient-maps nil
"Show keymaps created by `set-transient-map' when applicable.
@ -544,7 +544,7 @@ More specifically, detect when `overriding-terminal-local-map' is
set (this is the keymap used by `set-transient-map') and display
it."
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(make-obsolete-variable
'which-key-enable-extended-define-key
@ -555,7 +555,7 @@ it."
(defcustom which-key-init-buffer-hook '()
"Hook run when which-key buffer is initialized."
:type 'hook
:version "1.0")
:package-version "1.0" :version "30.1")
;;;; Faces
@ -568,56 +568,56 @@ it."
'((t . (:inherit font-lock-constant-face)))
"Face for which-key keys."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-separator-face
'((t . (:inherit font-lock-comment-face)))
"Face for the separator (default separator is an arrow)."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-note-face
'((t . (:inherit which-key-separator-face)))
"Face for notes or hints occasionally provided."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-command-description-face
'((t . (:inherit font-lock-function-name-face)))
"Face for the key description when it is a command."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-local-map-description-face
'((t . (:inherit which-key-command-description-face)))
"Face for the key description when it is found in `current-local-map'."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-highlighted-command-face
'((t . (:inherit which-key-command-description-face :underline t)))
"Default face for the command description when it is a command
and it matches a string in `which-key-highlighted-command-list'."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-group-description-face
'((t . (:inherit font-lock-keyword-face)))
"Face for the key description when it is a group or prefix."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-special-key-face
'((t . (:inherit which-key-key-face :inverse-video t :weight bold)))
"Face for special keys (\\`SPC', \\`TAB', \\`RET')."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
(defface which-key-docstring-face
'((t . (:inherit which-key-note-face)))
"Face for docstrings."
:group 'which-key-faces
:version "1.0")
:package-version "1.0" :version "30.1")
;;;; Custom popup
@ -628,14 +628,14 @@ return the maximum height in lines and width in characters of the
which-key popup in the form a cons cell (height . width)."
:group 'which-key
:type '(choice function (const nil))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-custom-hide-popup-function nil
"Set a custom hide-popup function.
It takes no arguments and the return value is ignored."
:group 'which-key
:type '(choice function (const nil))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-custom-show-popup-function nil
"Set a custom show-popup function.
@ -644,13 +644,13 @@ width) in lines and characters respectively. The return value is
ignored."
:group 'which-key
:type '(choice function (const nil))
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-lighter " WK"
"Minor mode lighter to use in the mode-line."
:group 'which-key
:type 'string
:version "1.0")
:package-version "1.0" :version "30.1")
(defvar which-key-inhibit nil
"Prevent which-key from popping up momentarily.
@ -667,7 +667,7 @@ popup. If any function returns a non-nil value, the popup will
not display."
:group 'which-key
:type 'hook
:version "1.0")
:package-version "1.0" :version "30.1")
(defvar which-key-keymap-history nil
"History of keymap selections.
@ -798,7 +798,7 @@ allow which-key to support packages that insert non-standard
`keys' into the key sequence being read by Emacs."
:group 'which-key
:type 'function
:version "1.0")
:package-version "1.0" :version "30.1")
;;;; Evil
@ -812,7 +812,7 @@ setting this to non-nil will override this behavior for evil
operators."
:group 'which-key
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defcustom which-key-show-operator-state-maps nil
"Show the keys following an evil command that reads a motion.
@ -822,7 +822,7 @@ might be some valid keys missing and it might be showing some
invalid keys."
:group 'which-key
:type 'boolean
:version "1.0")
:package-version "1.0" :version "30.1")
(defun which-key-evil-this-operator-p ()
(and which-key-allow-evil-operators