1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-26 01:40:53 -08:00
Commit graph

630 commits

Author SHA1 Message Date
Justin Burkett
caa18b2086 Fix descriptions of keys involving meta when showing keymaps 2018-02-24 16:29:33 -05:00
Justin Burkett
ca991b0d3a Autoload the show keymap functions 2018-02-23 13:48:51 -05:00
Justin Burkett
506c34829c Add which-key-show-full-keymap
Command to show all bindings in a keymap recursively.

Add test for new which-key--get-keymap-bindings functionality.
2018-02-23 13:46:08 -05:00
Justin Burkett
6a4d2c2cc0 Extract which-key--ignore-keys-regexp and which-key-show-keymap-1 2018-02-23 13:32:19 -05:00
Justin Burkett
fce520f8af Improve which-key--format-and-replace
Do a better job with nil descriptions
2018-01-31 09:06:19 -05:00
Justin Burkett
e5db4b6256 Handle null description in which-key--propertize-description
Fixes #186
2018-01-31 09:02:55 -05:00
Justin Burkett
adc0d660ad Use safe version of propertize
Should fix #186
2018-01-31 08:58:15 -05:00
Justin Burkett
5493d22489 Fix description truncation when showing docstrings 2018-01-31 08:04:24 -05:00
Justin Burkett
0aae4c8634 Improve which-key-show-docstrings option
Add setting docstring-only to omit command names. Add which-key-docstring-face.

See #185
2018-01-31 07:46:17 -05:00
Justin Burkett
c71fbbbc3e Add option to show docstrings in which-key buffer
Implements a simple version of the suggestion in #185
2018-01-30 20:29:51 -05:00
Justin Burkett
1219622b75 Remove debugging message 2018-01-08 22:30:21 -05:00
Justin Burkett
1dd91df436 Implement #182
Allow single digit arg to be set after C-h
2018-01-08 22:26:05 -05:00
Justin Burkett
7559a79e95 Version 3.1.0 2018-01-08 20:19:10 -05:00
Justin Burkett
ef384e781e Fix and improve define-key based replacements
Check for equality of definition as well as the key sequence. Unless it's a
prefix binding, in which case only check the key sequence.

Make sure we apply kbd when looking up pseudo bindings.

Move the logic into which-key--get-pseudo-binding.
2017-12-17 22:16:24 -05:00
Justin Burkett
c7e5f766d1
Merge pull request #183 from tarsiiformes/silencio
Define which-key--current-key-list before using it
2017-12-17 13:17:13 -05:00
Jonas Bernoulli
cd8d24d024 Define which-key--current-key-list before using it
Actually move the definition of the caller which-key--pseudo-key
instead.
2017-12-17 18:57:03 +01:00
Justin Burkett
6247cb5e28 Simplify implementation of define-key based replacements
When a description is provided through define-key using a definition
like ("description" . def) place a additional binding in the map to a "pseudo
key" making it easy for which-key to find these descriptions on the fly and at
the right time (i.e., when the binding is active).

which-key-enable-extended-define-key must be enabled for this to have an
effect.
2017-12-16 22:11:59 -05:00
Justin Burkett
1694c6d179 Improve which-key--process-define-key-args
Specify Prefix Command as an explicit match string to cut down on false
positives.
2017-12-15 14:18:30 -05:00
Justin Burkett
7150aa9795 Announce which-key-enable-extended-define-key in README 2017-12-13 21:12:50 -05:00
Justin Burkett
555c5c1da8 Demote errors in which-key--process-define-key-args 2017-12-13 20:52:09 -05:00
Justin Burkett
b6d04b3e9c Fix .travis.yml
Didn't install cask
2017-12-13 13:06:55 -05:00
Justin Burkett
0a212c71fe Fix travis build
Add support for 25.3. Remove for 24.3
2017-12-13 13:02:51 -05:00
Justin Burkett
3ff8f48193 Allow null DEF in which-key--process-define-key-args
This is useful for naming prefixes
2017-12-13 11:10:05 -05:00
Justin Burkett
f516b84eab Add which-key-enable-extended-define-key customization option
Adds supporting which-key--process-define-key-args.

The docstring for the option is

Advise `define-key' to make which-key aware of definitions of the form

  (define-key KEYMAP KEY '("DESCRIPTION" . DEF))

With the advice, this definition will have the side effect of creating a
replacement in `which-key-replacement-alist' that replaces DEF with DESCRIPTION
when the key sequence ends in KEY. Using a cons cell like this is a valid
definition for `define-key'. All this does is to make which-key aware of it.

Since many higher level keybinding functions use `define-key' internally, this
will affect most if not all of those as well.

This variable must be set before loading which-key.
2017-12-13 10:56:25 -05:00
Justin Burkett
78a2943478 Fix ordering of default replacement-alist
When which-key-allow-multiple-replacements is nil, this order is required to get
the intended behavior with left and right.

Ref #181
2017-12-07 17:31:41 -05:00
Justin Burkett
159f0f9b78 Add notes about paging commands not working with minibuffer 2017-12-05 07:17:47 -05:00
Justin Burkett
1234342878 Re-indent README 2017-11-14 10:10:43 -05:00
Justin Burkett
29348528d2 Mention which-key-show-major-mode in README 2017-11-14 10:04:31 -05:00
Justin Burkett
6e8df961f4 Consolidate use of binding filters 2017-11-14 10:00:14 -05:00
Justin Burkett
917d2ba291 Improve echo area note for which-key-show-major-mode 2017-11-14 09:52:37 -05:00
Justin Burkett
70d63a8bab Add which-key-show-major-mode
This is a new function to discover bindings, including evil ones, in the keymap
of the current major mode. It should be considered experimental at the moment.
2017-11-13 15:21:40 -05:00
Justin Burkett
6d2e17c949 Update which-key version for GNU ELPA 2017-08-17 14:07:50 -04:00
Justin Burkett
7c01092e65 Make minor changes to commentary in which-key.el 2017-08-08 20:05:37 -04:00
Justin Burkett
527113d06e Assign copyright to FSF for ELPA 2017-08-07 16:27:12 -04:00
Justin Burkett
3144b4c1fc Fix which-key-show-remaining-keys option 2017-05-30 08:26:33 -04:00
Justin Burkett
3ff303b504 Version 3.0.1 2017-05-28 10:06:07 -04:00
Justin Burkett
000d7a68d1 Handle C-h when buffer not showing
which-key-C-h-dispatch was not doing anything different if the which-key buffer
was not showing. This makes it fall back to the standard Emacs behavior.

Fixes #172
2017-05-27 17:48:10 -04:00
Justin Burkett
32dad608ab Merge pull request #171 from wyuenho/patch-1
Customize which-key-sort-order with list
2017-05-21 08:49:54 -04:00
Jimmy Yuen Ho Wong
1c280772c3 Customize which-key-sort-order with list
This will display a list the user can choose from in customize instead of having them to type
2017-05-20 23:46:12 +01:00
Justin Burkett
c61e63e971 Adhere to 80 chars per column 2017-05-19 17:55:13 -04:00
Justin Burkett
5dcf5d9b06 Use regexp-opt for regexps
* which-key.el (which-key--get-keymap-bindings): Update
2017-05-19 17:53:43 -04:00
Justin Burkett
23ca489988 Fixup previous commit
* which-key.el (which-key--compute-binding): Need to copy name of remapped
  command

Fixes #170
2017-05-19 17:38:02 -04:00
Justin Burkett
e8db06ec42 Add which-key-compute-remaps option
* which-key.el (which-key--compute-binding): Add
(which-key--get-current-bindings): Modify to use prev function
(which-key-compute-remaps): Add option

Fixes #169
2017-05-19 15:48:56 -04:00
Justin Burkett
bd20f56ad9 Version 3.0 2017-05-16 08:37:06 -04:00
Justin Burkett
20146731c2 Prepare for ELPA release
Update min emacs version to 24.4 to remove backported functions. Remove outdated
comments.
2017-05-16 08:34:44 -04:00
Justin Burkett
806ef24390 Add .cask to gitignore 2017-05-16 08:34:13 -04:00
Justin Burkett
9a97df02c2 Update emacs versions for Travis 2017-05-16 07:35:36 -04:00
Justin Burkett
9d2ba1bcba Make -init-buffer-hook a custom var 2017-05-01 08:44:32 -04:00
Justin Burkett
cd43104579 Add option to show transient maps
Set which-key-show-transient-maps to a non-nil value to use this feature.

When a transient map is active and it is not a hydra, show the keys from the
map.

Fixes #164
2017-04-26 20:57:49 -04:00
Justin Burkett
2e855196c7 Improve which-key--any-match-p 2017-04-18 08:01:40 -04:00