~ruther/emacs.d

ref: 8a24df3560dab7375fabb0c973f73dc7eff91340 emacs.d/lisp/functions.el -rw-r--r-- 721 bytes
8a24df35 — Rutherther feat: add matlab customization to execute inline functions 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(provide 'functions)

(eval-and-compile
  (defmacro my-use-package (&rest body)
    "Passes BODY to `use-package' and call it at comptime and runtime."
    (declare (indent defun))
    `(eval-and-compile
       ,(cons 'use-package body))))

(setq my-evil-state-maps '(evil-normal-state-map
                           evil-insert-state-map
                           evil-visual-state-map
                           evil-motion-state-map
                           evil-operator-state-map
                           evil-replace-state-map))

;; Function to unbind a key in all Evil state maps
(defun my-unbind-key-in-evil-states (key)
  (dolist (map my-evil-state-maps)
    (define-key (symbol-value map) (kbd key) nil)))