1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-04 04:52:10 -08:00
Commit graph

616 commits

Author SHA1 Message Date
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
Justin Burkett
bb30f56868 Fix customize type for replacement-alist
Ref #165
2017-04-07 09:05:10 -04:00
Justin Burkett
3c7ecc69d4 Fix replacement of keys when prefix is nil
The prefix is nil at the top-level keymap

Fixes #163
2017-03-15 13:55:01 -04:00
Justin Burkett
0d56e4369b Fix handling of key ranges ("a .. d")
When the last key in the key sequence is a range, extract the whole range
instead of just the final key.

Fixes #161
2017-02-09 10:29:30 -05:00
Justin Burkett
ea6f1dc5aa Version 2.0
Increased major version for replacement list changes
2017-02-07 10:55:14 -05:00
Justin Burkett
49ab7afd93 Add which-key-show-prefix 'mode-line option
See #157
2016-12-22 15:21:37 -05:00
Justin Burkett
a3a989e804 Update README 2016-12-20 16:03:21 -05:00
Justin Burkett
47c6f914c3 Add which-key-max-display-columns
See #157
2016-12-20 15:56:35 -05:00
Justin Burkett
07ff661a0b Remove unused variable 2016-12-15 09:58:32 -05:00
Justin Burkett
3cd9457f96 Fix #156 by allowing multiple replacements
Add which-key-allow-multiple-replacements which can be set to allow multiple
replacements from which-key-replacement-alist to apply to a key binding.

Switch from using assoc-default to find replacements to
which-key--get-replacements.

Adjusts tests and add a new one for multiple replacements.
2016-12-15 09:53:20 -05:00
Justin Burkett
f0eb183af6 Tweak TOC in README and fix a link 2016-12-12 09:04:44 -05:00
Justin Burkett
c34cfd69a9 Add a missing type declaration 2016-12-07 10:14:08 -05:00
Justin Burkett
786d800f61 Prevent display from occurring twice in a row
Found some cases where this could happen with a secondary idle delay.
2016-12-05 14:29:22 -05:00
Justin Burkett
cf698ea25e Add basic timing facility for debugging. 2016-12-05 13:55:25 -05:00
Justin Burkett
22928eeffa Remove old obsolete variables/functions 2016-12-01 07:42:32 -05:00