Created
March 17, 2015 04:13
-
-
Save mpontus/29bc11c5fd253850579f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (cl-defun transient-map (command &rest bindings &key keep-pred | |
| on-exit &allow-other-keys) | |
| (unless (commandp command) (push command bindings) | |
| (setq command nil)) | |
| (let* ((keymap (-map (-applify 'cons) (-partition 2 bindings)))) | |
| (set-transient-map (easy-mmode-define-keymap keymap) keep-pred on-exit)) | |
| (when command (call-interactively command))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment