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:
parent
e14b271d39
commit
29e19725ac
1 changed files with 5 additions and 5 deletions
|
@ -92,17 +92,17 @@
|
||||||
:config
|
:config
|
||||||
(global-evil-surround-mode 1))
|
(global-evil-surround-mode 1))
|
||||||
|
|
||||||
;; Custom minor mode that ensures that my kbds are available no matter which major
|
(defun wpc/ensure-kbds (_ignore)
|
||||||
;; or minor modes are active.
|
|
||||||
(add-hook 'after-load-functions #'ensure-william-carroll-kbds)
|
|
||||||
|
|
||||||
(defun ensure-william-carroll-kbds (_ignore)
|
|
||||||
"Try to ensure that my keybindings retain priority over other minor modes."
|
"Try to ensure that my keybindings retain priority over other minor modes."
|
||||||
(unless (eq (caar minor-mode-map-alist) 'wpc/kbds-minor-mode)
|
(unless (eq (caar minor-mode-map-alist) 'wpc/kbds-minor-mode)
|
||||||
(let ((mykbds (assq 'wpc/kbds-minor-mode minor-mode-map-alist)))
|
(let ((mykbds (assq 'wpc/kbds-minor-mode minor-mode-map-alist)))
|
||||||
(assq-delete-all '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))))
|
(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
|
(defvar wpc/kbds
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
(bind-keys :map map
|
(bind-keys :map map
|
||||||
|
|
Loading…
Reference in a new issue