Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove motion remap #705

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add global-map to transparent keypad leader
  • Loading branch information
DogLooksGood committed Jan 11, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 3a5c11a14f9c2cd93c9e0404a8506d42ea9fbfe0
12 changes: 9 additions & 3 deletions meow-keypad.el
Original file line number Diff line number Diff line change
@@ -440,9 +440,15 @@
(meow--keypad-quit)
(if (or (eq t meow-keypad-leader-transparent)
(eq meow--keypad-previous-state meow-keypad-leader-transparent))
(let* ((local (lookup-key (current-local-map) (meow--parse-input-event last-input-event)))
(cmd (command-remapping local)))
(call-interactively (or cmd local 'undefined)))
(let* ((key (meow--parse-input-event last-input-event))
(local (lookup-key (current-local-map) key))
(global (lookup-key (current-global-map) key))
(origin-cmd (or local global))
(remapped-cmd (command-remapping origin-cmd))
(cmd-to-call (if (member remapped-cmd '(undefined nil))
(or origin-cmd 'undefined)
remapped-cmd)))
(call-interactively cmd-to-call))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use keypad-execute instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess you are right!

(message "%s is undefined" key-str))
t)))))

@@ -454,7 +460,7 @@
(meow--keypad-quit)
(setq last-command-event last-input-event)
(let ((kbd (single-key-description input-event)))
(if-let* ((cmd (keymap-lookup meow-keypad-state-keymap kbd)))

Check failure on line 463 in meow-keypad.el

GitHub Actions / check (27.1, true)

You should depend on (emacs "29.1") or the compat package if you need `keymap-lookup'.

Check warning on line 463 in meow-keypad.el

GitHub Actions / check (28.2, true)

the function ‘keymap-lookup’ is not known to be defined.

Check failure on line 463 in meow-keypad.el

GitHub Actions / check (28.2, true)

You should depend on (emacs "29.1") or the compat package if you need `keymap-lookup'.
(call-interactively cmd)
(meow--keypad-handle-input-event input-event)))))

@@ -557,3 +563,3 @@

(provide 'meow-keypad)
;;; meow-keypad.el ends here
Loading