Rename Elisp function for ensuring KBDs

Prefer wpc/ namespace for functions that I define. Consider defining all
functions in one location, similar to ZSH's functions.zsh
This commit is contained in:
William Carroll 2019-03-20 15:03:03 +00:00
parent e14b271d39
commit 29e19725ac

View file

@ -92,17 +92,17 @@
:config
(global-evil-surround-mode 1))
;; Custom minor mode that ensures that my kbds are available no matter which major
;; or minor modes are active.
(add-hook 'after-load-functions #'ensure-william-carroll-kbds)
(defun ensure-william-carroll-kbds (_ignore)
(defun wpc/ensure-kbds (_ignore)
"Try to ensure that my keybindings retain priority over other minor modes."
(unless (eq (caar minor-mode-map-alist) 'wpc/kbds-minor-mode)
(let ((mykbds (assq 'wpc/kbds-minor-mode minor-mode-map-alist)))
(assq-delete-all 'wpc/kbds-minor-mode minor-mode-map-alist)
(add-to-list 'minor-mode-map-alist mykbds))))
;; Custom minor mode that ensures that my kbds are available no matter which
;; major or minor modes are active.
(add-hook 'after-load-functions #'wpc/ensure-kbds)
(defvar wpc/kbds
(let ((map (make-sparse-keymap)))
(bind-keys :map map