Created
January 31, 2017 21:21
-
-
Save alexhrescale/e5bc8adfde0f0a242ad68fa3eb6af133 to your computer and use it in GitHub Desktop.
create a new emacs minor mode with custom C-RET binding
This file contains 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
(defun my-temp-func () | |
(interactive) | |
(insert "tempura true")) | |
(define-minor-mode my-temp-mode | |
"throwaway minor mode for test" | |
:lighter " TEMP!" | |
:keymap (let ((map (make-sparse-keymap))) | |
(define-key map [(control return)] 'my-temp-func) | |
(define-key map (kbd "C-c f") 'my-temp-func) | |
map)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment