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

Add (undefine-key) functionality #1727

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

Encryptoid
Copy link
Contributor

Overview

I noticed this here, and wasn't going to look into it. But I started getting into paredit myself, so I encountered the same issue. Now it's personal..

Issue: feature: the undefine-key function to delete an existing key in a keymap.

Change Description

Add public function: undefine-keys and marco undefine-keys. These are very much in the same style as their define counterparts.

Testing

I tested both functionality in my own config:

(undefine-key *paredit-mode-keymap* "C-k")

(undefine-keys *paredit-mode-keymap* ("C-k")
  ( "C-L"))

I also tested attempting to undefine keys that don't exist in the map. This is fine with no errors.

For example with paredit, you can define your own keys before or after undefining the paredit keys, as it will just remove from the map, your keys and paredit will not interfere.

You can undefine keys to your hearts content:

image

@cxxxr cxxxr merged commit 28f62aa into lem-project:main Jan 1, 2025
2 checks passed
@cxxxr
Copy link
Member

cxxxr commented Jan 1, 2025

Thank you very much!

@Encryptoid Encryptoid deleted the add-undefine-key branch January 1, 2025 16:43
vindarel added a commit to lem-project/lem-project.github.io that referenced this pull request Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants