@@ -238,8 +238,8 @@ face to apply)."
238
238
239
239
(defcustom which-key-special-keys '()
240
240
" These keys will automatically be truncated to one character.
241
- They also have `which-key-special-key-face' applied to them. This
242
- is disabled by default. An example configuration is
241
+ They also have `which-key-special-key-face' applied to them. This
242
+ is disabled by default. An example configuration is
243
243
244
244
\( setq which-key-special-keys \\= '(\" SPC\" \" TAB\" \" RET\" \" ESC\" \" DEL\" )\) "
245
245
:type '(repeat string)
596
596
597
597
(defface which-key-highlighted-command-face
598
598
'((t . (:inherit which-key-command-description-face :underline t )))
599
- " Default face for the command description when it is a command
600
- and it matches a string in `which-key-highlighted-command-list' ."
599
+ " Default face for command description.
600
+ To be highlighted, it must be a command and match a string in
601
+ `which-key-highlighted-command-list' ."
601
602
:group 'which-key-faces
602
603
:package-version " 1.0" :version " 30.1" )
603
604
@@ -762,17 +763,17 @@ Used when `which-key-popup-type' is frame.")
762
763
763
764
(defsubst which-key--safe-lookup-key (keymap key )
764
765
" Version of `lookup-key' that allows KEYMAP to be nil.
765
- Also convert numeric results of `lookup-key' to nil. KEY is not
766
- checked."
766
+ Also convert numeric results of `lookup-key' to nil.
767
+ KEY is not checked."
767
768
(when (keymapp keymap)
768
769
(let ((result (lookup-key keymap key)))
769
770
(when (and result (not (numberp result)))
770
771
result))))
771
772
772
773
(defsubst which-key--safe-lookup-key-description (keymap key )
773
774
" Version of `lookup-key' that allows KEYMAP to be nil.
774
- Also convert numeric results of `lookup-key' to nil. KEY
775
- should be formatted as an input for `kbd' ."
775
+ Also convert numeric results of `lookup-key' to nil.
776
+ KEY should be formatted as an input for `kbd' ."
776
777
(let ((key (ignore-errors (kbd key))))
777
778
(when (and key (keymapp keymap))
778
779
(let ((result (lookup-key keymap key)))
@@ -1006,12 +1007,12 @@ but more functional."
1006
1007
;;;### autoload
1007
1008
(defun which-key-add-keymap-based-replacements (keymap key replacement &rest more )
1008
1009
" Replace the description of KEY using REPLACEMENT in KEYMAP.
1009
- KEY should take a format suitable for use in `kbd' . REPLACEMENT
1010
+ KEY should take a format suitable for use in `kbd' . REPLACEMENT
1010
1011
should be a cons cell of the form \( STRING . COMMAND\) for each
1011
1012
REPLACEMENT, where STRING is the replacement string and COMMAND
1012
1013
is a symbol corresponding to the intended command to be
1013
- replaced. COMMAND can be nil if the binding corresponds to a key
1014
- prefix. An example is
1014
+ replaced. COMMAND can be nil if the binding corresponds to a key
1015
+ prefix. An example is
1015
1016
1016
1017
\( which-key-add-keymap-based-replacements global-map
1017
1018
\" C-x w\" \\= '\(\" Save as\" . write-file\)\) .
@@ -1038,8 +1039,8 @@ for REPLACEMENT will eventually be removed."
1038
1039
(defun which-key-add-key-based-replacements
1039
1040
(key-sequence replacement &rest more)
1040
1041
" Replace the description of KEY-SEQUENCE with REPLACEMENT.
1041
- KEY-SEQUENCE is a string suitable for use in `kbd' . REPLACEMENT
1042
- may either be a string, as in
1042
+ KEY-SEQUENCE is a string suitable for use in `kbd' .
1043
+ REPLACEMENT may either be a string, as in
1043
1044
1044
1045
\( which-key-add-key-based-replacements \" C-x 1\" \" maximize\"\)
1045
1046
@@ -1260,7 +1261,7 @@ is shown, or if there is no need to start the closing timer."
1260
1261
(&optional window &rest params)
1261
1262
" Slightly modified version of `fit-buffer-to-window' .
1262
1263
Use &rest params because `fit-buffer-to-window' has a different
1263
- call signature in different emacs versions"
1264
+ call signature in different Emacs versions"
1264
1265
(let ((fit-window-to-buffer-horizontally t )
1265
1266
(window-min-height 1 ))
1266
1267
(apply #'fit-window-to-buffer window params)))
@@ -1364,7 +1365,7 @@ Display window alist: %s"
1364
1365
(defun which-key--popup-max-dimensions ()
1365
1366
" Return maximum dimension available for popup.
1366
1367
Dimension functions should return the maximum possible (height
1367
- . width) of the intended popup. SELECTED-WINDOW-WIDTH is the
1368
+ . width) of the intended popup. SELECTED-WINDOW-WIDTH is the
1368
1369
width of currently active window, not the which-key buffer
1369
1370
window."
1370
1371
(cl-ecase which-key-popup-type
@@ -1738,7 +1739,7 @@ cell" el)))))
1738
1739
(description group local hl-face &optional original-description)
1739
1740
" Add face to DESCRIPTION.
1740
1741
The face chosen depends on whether the description represents a
1741
- group or a command. Also make some minor adjustments to the
1742
+ group or a command. Also make some minor adjustments to the
1742
1743
description string, like removing a \" group:\" prefix.
1743
1744
1744
1745
ORIGINAL-DESCRIPTION is the description given by
@@ -1813,7 +1814,7 @@ return the docstring."
1813
1814
" Make list of key bindings with separators and descriptions.
1814
1815
Take a list of (key . desc) cons cells in UNFORMATTED, add
1815
1816
faces and perform replacements according to the three replacement
1816
- alists. Returns a list (key separator description)."
1817
+ alists. Return a list (key separator description)."
1817
1818
(let ((sep-w-face
1818
1819
(which-key--propertize which-key-separator
1819
1820
'face 'which-key-separator-face ))
@@ -1949,8 +1950,8 @@ EVIL is non-nil, extract active evil bidings."
1949
1950
(defun which-key--get-bindings (&optional prefix keymap filter recursive )
1950
1951
" Collect key bindings.
1951
1952
If KEYMAP is nil, collect from current buffer using the current
1952
- key sequence as a prefix. Otherwise, collect from KEYMAP. FILTER
1953
- is a function to use to filter the bindings. If RECURSIVE is
1953
+ key sequence as a prefix. Otherwise, collect from KEYMAP. FILTER
1954
+ is a function to use to filter the bindings. If RECURSIVE is
1954
1955
non-nil, then bindings are collected recursively for all prefixes."
1955
1956
(let* ((unformatted
1956
1957
(cond ((keymapp keymap)
@@ -2020,7 +2021,7 @@ that width."
2020
2021
2021
2022
(defun which-key--list-to-pages (keys avl-lines avl-width )
2022
2023
" Convert list of KEYS to columns based on dimensions AVL-LINES and AVL-WIDTH.
2023
- Returns a `which-key--pages' object that holds the page strings,
2024
+ Return a `which-key--pages' object that holds the page strings,
2024
2025
as well as metadata."
2025
2026
(let ((cols-w-widths (mapcar (lambda (c ) (which-key--pad-column c avl-width))
2026
2027
(which-key--partition-list avl-lines keys)))
@@ -2063,7 +2064,7 @@ as well as metadata."
2063
2064
(keys available-lines available-width &optional min-lines vertical)
2064
2065
" Create page strings using `which-key--list-to-pages' .
2065
2066
Will try to find the best number of rows and columns using the
2066
- given dimensions and the length and widths of ITEMS. Use VERTICAL
2067
+ given dimensions and the length and widths of ITEMS. Use VERTICAL
2067
2068
if the ITEMS are laid out vertically and the number of columns
2068
2069
should be minimized."
2069
2070
(let ((result (which-key--list-to-pages
@@ -2088,7 +2089,7 @@ should be minimized."
2088
2089
(defun which-key--create-pages (keys &optional prefix-keys prefix-title )
2089
2090
" Create page strings using `which-key--list-to-pages' .
2090
2091
Will try to find the best number of rows and columns using the
2091
- given dimensions and the length and wdiths of KEYS. SEL-WIN-WIDTH
2092
+ given dimensions and the length and wdiths of KEYS. SEL-WIN-WIDTH
2092
2093
is the width of the live window."
2093
2094
(let* ((max-dims (which-key--popup-max-dimensions))
2094
2095
(max-lines (car max-dims))
@@ -2209,7 +2210,7 @@ Include prefix arguments."
2209
2210
(which-key--propertize dash 'face 'which-key-key-face )))))
2210
2211
2211
2212
(defun which-key--get-popup-map ()
2212
- " Generate transient- map for use in the top level binding display."
2213
+ " Generate transient map for use in the top level binding display."
2213
2214
(unless which-key--automatic-display
2214
2215
(let ((map (make-sparse-keymap )))
2215
2216
(define-key map (kbd which-key-paging-key) #'which-key-C-h-dispatch )
@@ -2406,7 +2407,7 @@ Usually this is `describe-prefix-bindings'."
2406
2407
(defun which-key-show-major-mode (&optional all )
2407
2408
" Show top-level bindings in the map of the current major mode.
2408
2409
This function will also detect evil bindings made using
2409
- `evil-define-key' in this map. These bindings will depend on the
2410
+ `evil-define-key' in this map. These bindings will depend on the
2410
2411
current evil state."
2411
2412
(interactive " P" )
2412
2413
(let ((map-sym (intern (format " %s -map" major-mode))))
0 commit comments