From 821b60a2c9d474b61e573d99c2c2a03636d559cb Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 29 Oct 2021 16:07:41 -0700 Subject: refactor(wpcarro/emacs): Remove KBD logic from buffer.el Part of an overall cleaning: - remove tests from library files - move KBDs from library files to top-level keybindings.el Change-Id: I0fb80aa4a8d5cc77ee7ecca6206d5e4d62c93491 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4801 Tested-by: BuildkiteCI Reviewed-by: wpcarro Autosubmit: wpcarro --- users/wpcarro/emacs/.emacs.d/wpc/buffer.el | 15 --------------- users/wpcarro/emacs/.emacs.d/wpc/keybindings.el | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) (limited to 'users') diff --git a/users/wpcarro/emacs/.emacs.d/wpc/buffer.el b/users/wpcarro/emacs/.emacs.d/wpc/buffer.el index d9503e0d1faa..fa98393df82f 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/buffer.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/buffer.el @@ -38,9 +38,6 @@ ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defconst buffer-install-kbds? t - "When t, install the keybindings defined herein.") - (defconst buffer-source-code-blacklist (set-new 'dired-mode 'erc-mode @@ -172,17 +169,5 @@ This function ignores Emacs-generated buffers, i.e. the ones that look like (prelude-assert (maybe-some? candidate)) (switch-to-buffer candidate))) -(when buffer-install-kbds? - (general-define-key - :states '(normal) - "C-f" #'buffer-cycle-next - "C-b" #'buffer-cycle-prev) - (general-define-key - :prefix "" - :states '(normal) - "b" #'buffer-ivy-source-code - "" #'buffer-show-previous - "k" #'kill-buffer)) - (provide 'buffer) ;;; buffer.el ends here diff --git a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el index 2a2160741ed5..25c026c09e43 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el @@ -367,5 +367,21 @@ "M-j" nil "K" #'ibuffer-do-delete) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; buffers +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(general-define-key + :states '(normal) + "C-f" #'buffer-cycle-next + "C-b" #'buffer-cycle-prev) + +(general-define-key + :prefix "" + :states '(normal) + "b" #'buffer-ivy-source-code + "" #'buffer-show-previous + "k" #'kill-buffer) + (provide 'keybindings) ;;; keybindings.el ends here -- cgit 1.4.1