Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
brotzeit committed May 22, 2019
1 parent 6019de4 commit 3a79028
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions rust_src/src/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,11 @@ pub fn key_binding(
/// remapping in all currently active keymaps.
#[lisp_fn(min = "1")]
pub fn command_remapping(
command: Option<LispSymbolRef>,
command: LispObject,
position: EmacsUInt,
keymaps: LispObject,
) -> LispObject {
let c = match command {
let c = match command.as_symbol() {
None => return Qnil,
Some(c) => c,
};
Expand All @@ -784,7 +784,7 @@ pub fn command_remapping(
let remapped_command = if keymaps.is_nil() {
key_binding(command_remapping_vector, false, t, position.into());
} else {
lookup_key(Fcons(Qkeymap, keymaps), command_remapping_vector, Qnil);
lookup_key((Qkeymap, keymaps).into(), command_remapping_vector, Qnil);
};

if remapped_command.is_integer() {
Expand All @@ -794,7 +794,4 @@ pub fn command_remapping(
}
}

// https://www.gnu.org/software/emacs/manual/html_node/elisp/Remapping-Commands.html
// add note about eassert

include!(concat!(env!("OUT_DIR"), "/keymap_exports.rs"));

0 comments on commit 3a79028

Please sign in to comment.