1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-22 07:51:17 -08:00
Commit graph

742 commits

Author SHA1 Message Date
Justin Burkett
4e592ed7b9 Fix type usage and arglists for new functions 2021-06-21 14:29:29 -04:00
Justin Burkett
fffd3e5ebf Fix default of which-key-replacement-alist 2021-06-21 14:00:54 -04:00
Justin Burkett
8a558e6a79 Update tests 2021-06-21 13:59:56 -04:00
Justin Burkett
fc8855187f Remove pseudo binding stuff
It's not necessary anymore with manual parsing of the keymaps
2021-06-21 13:36:25 -04:00
Justin Burkett
a55b90844c Alternative approach to retrieving bindings (WIP) 2021-06-21 12:15:22 -04:00
Jonas Bernoulli
12f743c695
Fix whitespace 2021-06-15 19:19:44 +02:00
Justin Burkett
fc29864395 Fix whitespace 2021-05-31 22:52:43 -04:00
Justin Burkett
7e854d0203 Fix recent commit 2021-05-31 22:48:53 -04:00
Justin Burkett
81d93952af Fix README links 2021-05-31 22:34:08 -04:00
Justin Burkett
ef1fc43fcb Reference issues #93 and #175 in README
Fixes #291
2021-05-31 22:30:32 -04:00
Justin Burkett
fa1b4c9b38
Merge pull request #303 from tarsiiformes/posframe
Support packages that use another frame to display bindings
2021-05-31 22:21:44 -04:00
Jonas Bernoulli
f6ce67d705
Get which-key--buffer's window from any frame
Previously we assumed the buffer was being displayed in a window
of the current frame, which isn't the case if e.g. a child frame
is being used.

We also cannot assume that the third-party code that sets up such
a child frame also deletes it.  `which-key-posframe' for example
merely hides it.
2021-05-30 21:32:50 +02:00
Jonas Bernoulli
016b9bbf86 Cosmetics 2021-05-30 21:10:04 +02:00
Jonas Bernoulli
1f5e532852
Avoid code-duplication in which-key--hide-popup 2021-05-30 20:17:49 +02:00
Jonas Bernoulli
aa91a7cd83
Fix nesting-level of "God-mode" section 2021-05-30 20:16:53 +02:00
Jiangbin Zhao
7927209c1b fix which-key--show-keymap for which-key-enable-extended-define-key
With which-key-enable-extended-define-key set to 't, given the keymap
and bindings below:

  (setq a-map (make-sparse-keymap))
  (bind-keys :map a-map
             ("a" . ("key 1" . command-1))
             ("b" . ("key b" . command-2)))

The output of (which-key--get-keymap-bindings a-map) was having
"unknown" as the key descriptions.

This change fixes it therefore allows the following to work as
expected:

(which-key--show-keymap "A map" a-map)
2021-05-23 14:48:29 -07:00
Frank Terbeck
5fb30301cb Unset header-line-format format in " *which-key*" buffer
Similarly to mode-line-format, header-line-format just takes up space and
currently also breaks window size calculations for the buffer. This sets
it to nil in order to suppress its display.

Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
2021-04-06 20:28:00 -04:00
Celestial Nebula
c632dbf27a
Update reference to obsolete variable in DOCSTRING (#285) 2021-03-24 14:21:16 -04:00
Justin Burkett
c0608e812a Version 3.5.1 2021-01-31 13:37:08 -05:00
Justin Burkett
428aedfce0 Further simplify which-key--pseudo-key 2020-12-16 12:20:14 -05:00
Daniel Mendler
3908719ff2
simplify pseudo key 2020-12-15 23:58:39 +01:00
BlaCk_Void
ca268fd313
REAMDE code's Number of parentheses pairs (#270) 2020-11-12 20:22:08 -05:00
Justin Burkett
c011b26819 Add tests for keymap-based-bindings 2020-10-19 11:15:35 -04:00
Justin Burkett
427c3f4a53 Clarify README's description of keymap-based replacement 2020-10-18 15:34:53 -04:00
Justin Burkett
ae59b7edb0 Version 3.5.0 2020-09-08 19:01:44 -04:00
Justin Burkett
5b37abcbe7 Fix which-key--next-page-hint
prefix-keys might be a vector.

Fixes #265
2020-09-08 18:59:30 -04:00
Justin Burkett
a70fc16adc Hide paging hint when prefix is help-char
We can't do paging in this case.
2020-09-08 14:18:21 -04:00
Justin Burkett
d794c4a0af Improve keymap-based-replacement description in README
Ref #263
2020-09-04 16:07:31 -04:00
Justin Burkett
2b10b8e77d Remove use of focus-{in,out}-hook
Fix #259 #260 #262
2020-09-01 21:35:43 -04:00
Justin Burkett
e5543269fc Remove testing badge from README
Github integrates the results into the interface already, and it doesn't seem to
work.
2020-08-28 10:27:24 -04:00
Justin Burkett
e048b2ae6b Stop testing against v24.5
It's old enough now
2020-08-28 10:24:31 -04:00
Justin Burkett
ebb4e92b3c Add which-key-add-keymap-based-replacements
This is an alternative to advising define-key using
which-key-enable-extended-define-key, but functions the same beneath the
surface.

Ref #226 #261
2020-08-28 10:17:40 -04:00
Rudi Grinberg
e48e190a75
Fix #257 (#258)
* Add test for #257

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

* Fix #257

Explicitly distinguish between replacing with `nil` and not replacing at
all.

I'm also simplifying the code by making all the branches more explicit.
This is a little longer, but makes all the clauses obvious.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2020-08-17 19:58:31 -04:00
Rudi Grinberg
3642c11d5e Speed up which-key--maybe-replace
The first optimization is avoiding the intermediate list created by
append. Instead we just iterate over the two lists in turn

The second opimitization occurs where
which-key-allow-multiple-replacements is nil, in which case we can stop
the iteration once we've found a replacement

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2020-07-21 15:27:24 -04:00
Justin Burkett
ce25fb2600 Add basic PR template 2020-07-21 10:18:05 -04:00
N V
8f2427a69b
Fix which-key--propertize-description use make-text-button return value (#249)
As of:

7ac79872ae

make-text-button no longer modifies a string when it is passed as the
first argument. which-key--propertize-description relied on the mutation
of the string argument. Using the return value of make-text-button will
return the propertized string with both the new and old behavior.

Fixes #248
2020-07-01 22:19:37 -04:00
Justin Burkett
8b49ae978c Fix last commit 2020-02-16 18:22:45 -05:00
Justin Burkett
7bc87e0f93 Test once a month 2020-02-16 13:54:20 -05:00
Justin Burkett
9550707d52 Merge remote-tracking branch 'hlissner/patch-1' 2020-02-16 13:50:34 -05:00
Yunhao Zhao
f9d8d49d1f
Fix prefix argument for which-key-show-major-mode (#239) 2020-02-16 08:50:11 -05:00
Justin Burkett
7b068f3e95 Fix case sorting in alpha sort functions 2020-02-12 09:23:18 -05:00
Justin Burkett
9ff54fffbb Fix short windows being resized
fit-window-to-buffer defaults to a min height of 4. For some reason, the order
in which fit-window-to-buffer is called in display-buffer-in-side-window seems
to have changed. This makes the order not matter.
2020-02-11 21:48:57 -05:00
Justin Burkett
6e4b4c5419 Simplify last commit 2020-02-07 22:40:28 -05:00
Justin Burkett
d5a42732a6 Replace use of xor
Apparently this is a recent function
2020-02-07 22:34:41 -05:00
Justin Burkett
a135e6f2c8 Change name of workflow 2020-02-07 22:32:41 -05:00
Justin Burkett
90d10a8fb3 Fix sorting of keys and add test
Fixes #233
2020-02-07 22:29:40 -05:00
Justin Burkett
c4b7aaefc1 Revive Cask file 2020-02-07 10:02:52 -05:00
Justin Burkett
cf44641485 Replace travis badge with github workflow badge 2020-02-06 21:57:18 -05:00
Justin Burkett
190310d59e Disable travis and cask 2020-02-06 21:54:34 -05:00
Justin Burkett
12310164a4 More workflow fixes 2020-02-06 21:50:04 -05:00