Method: Keys.proc_from_key
- Defined in:
- lib/xiki/keys.rb
.proc_from_key(keys) ⇒ Object
458 459 460 461 462 463 464 465 |
# File 'lib/xiki/keys.rb', line 458 def self.proc_from_key keys code = $el.prin1_to_string($el.key_binding(keys)) # If it is a call to elisp id = code[/el4r-ruby-call-proc-by-id.+?([_0-9]+)/, 1] return nil if id.nil? ObjectSpace._id2ref(id.to_i) end |