-
Notifications
You must be signed in to change notification settings - Fork 309
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
port command-remapping #1477
base: master
Are you sure you want to change the base?
port command-remapping #1477
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, only some minor changes are necessary.
rust_src/src/keymap.rs
Outdated
/// remapping in all currently active keymaps. | ||
#[lisp_fn(min = "1")] | ||
pub fn command_remapping( | ||
command: Option<LispSymbolRef>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite strange that the original function behaves this way, but the original function accepts any type and returns Qnil if it's not a symbol. I recommend changing command
to a LispObject
and then doing let c = match command.as_symbol() ...
rust_src/src/keymap.rs
Outdated
key_binding(command_remapping_vector, false, true, position) | ||
} else { | ||
lookup_key( | ||
LispObject::cons(Qkeymap, keymaps), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LispObject::cons(Qkeymap, keymaps), | |
(Qkeymap, keymaps).into(), |
4bf8024
to
3a79028
Compare
test/rust_src/src/keymap-tests.el
Outdated
|
||
(define-key my-mode-map [remap kill-line] 'my-kill-line) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whitespace looks very strange in the changes in this file, and the body of test-command-remapping is empty. Is this part unfinished?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I pushed the wrong branch.
@brotzeit wanna update this one? |
3a79028
to
4bf8024
Compare
4bf8024
to
31b60da
Compare
31b60da
to
ed22c93
Compare
No description provided.