Skip to content

Instantly share code, notes, and snippets.

@alexhrescale
Created January 31, 2017 21:21
Show Gist options
  • Save alexhrescale/e5bc8adfde0f0a242ad68fa3eb6af133 to your computer and use it in GitHub Desktop.
Save alexhrescale/e5bc8adfde0f0a242ad68fa3eb6af133 to your computer and use it in GitHub Desktop.
create a new emacs minor mode with custom C-RET binding
(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