From 0acf0a28d77cf6c17f637034fb5035c20ba3be87 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 27 May 2021 12:52:12 -0500 Subject: Change C-z binds to C-c and remove leader --- init.el | 46 +++++++++++++++++++--------------------------- lisp/acdw.el | 10 ---------- 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/init.el b/init.el index 4fc7e32..7080131 100644 --- a/init.el +++ b/init.el @@ -35,17 +35,7 @@ (let ((recipe (cadr sexp))) (if (consp recipe) (car recipe) - recipe)))) - - (setup-define :leader - (lambda (key command) - `(progn - (autoload #',command (symbol-name setup-name)) - (define-key acdw/leader - ,(if (stringp key) (kbd key) key) - #',command))) - :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map." - :repeatable t)) + recipe))))) ;;;; `no-littering' (setup (:straight no-littering) @@ -145,7 +135,7 @@ (setup debugger (:hook visual-line-mode) - (:leader "d" toggle-debug-on-error)) + (:global "C-c d" toggle-debug-on-error)) (setup dired (setq-default dired-recursive-copies 'always @@ -276,10 +266,12 @@ ("tilde.chat" "#meta" "#team" "#gemini" "#bread" ; how could I've forgotten!? - "#politics" "#bungame")) + "#politics" "#bungame" + "#backgammon")) erc-button-url-regexp browse-url-button-regexp - (append erc-common-server-suffixes) '("tilde.chat\\'" . "~") - (append erc-common-server-suffixes) '("libera.chat\\'" . "LC") + erc-common-server-suffixes '(("oftc.net\\'" . "OFTC") + ("tilde.chat\\'" . "~") + ("libera.chat\\'" . "LC")) erc-header-line-face-method #'erc/update-header-line-show-disconnected erc-hide-list '("JOIN" "NICK" "PART" "QUIT" "MODE" @@ -326,9 +318,10 @@ (interactive) (if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*"))) (eshell-life-is-too-much) - (eshell))) + (with-message "Starting eshell" + (eshell)))) - (:leader "s" eshell-pop-or-quit) + (:global "C-c s" eshell-pop-or-quit) (add-hook 'eshell-mode-hook (defun eshell-mode@setup () @@ -408,7 +401,7 @@ (:option gnus-home-directory (acdw/dir "gnus" t) gnus-directory (acdw/dir "News" t) gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) - (:leader "m" gnus)) + (:global "C-c m" gnus)) (setup ibuffer (:option ibuffer-saved-filter-groups @@ -742,8 +735,8 @@ ;; Remap C-h to DEL -- can be the "help" key (define-key key-translation-map [?\C-h] [?\C-?]) - (:leader "C-c" save-buffers-kill-emacs - "t" acdw/insert-iso-date)) + (:global "C-c t" acdw/insert-iso-date + "C-z" nil)) ;;; Packages @@ -813,10 +806,11 @@ if ripgrep is installed, otherwise `consult-grep'." ;; Bindings (:global ;; C-c bindings (`mode-specific-map') - "C-c h" consult-history - "C-c m" consult-mode-command - "C-c b" consult-bookmark - "C-c k" consult-kmacro + ;; I don't use any of these right now. + ;; "C-c h" consult-history + ;; "C-c m" consult-mode-command + ;; "C-c b" consult-bookmark + ;; "C-c k" consult-kmacro ;; C-x bindings (`ctl-x-map') "C-x M-:" consult-complex-command "C-x b" consult-buffer @@ -890,8 +884,6 @@ if ripgrep is installed, otherwise `consult-grep'." elpher-certificate-directory (acdw/dir "elpher/") elpher-gemini-max-fill-width fill-column) - (:leader "e" elpher-bookmarks) - (:bind "n" elpher-next-link "p" elpher-prev-link "o" elpher-follow-current-link @@ -956,7 +948,7 @@ if ripgrep is installed, otherwise `consult-grep'." (:file-match "\\.lua\\'")) (setup (:straight magit) - (:leader "g" magit-status) + (:global "C-c g" magit-status) (defun magit-display-buffer-same-window (buffer) "Display BUFFER in the selected window like God intended." diff --git a/lisp/acdw.el b/lisp/acdw.el index d043aad..94f3e64 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -475,16 +475,6 @@ Then, build `browse-url-button-regexp' with the new protocol." (setq-default browse-url-button-regexp (acdw/build-button-url-regexp))) - -;;; Keymaps - -(defvar acdw/leader - (let ((map (make-sparse-keymap)) - (c-z (global-key-binding "\C-z"))) - (global-set-key "\C-z" map) - (define-key map "\C-z" c-z) - map)) - ;;; Minor modes -- cgit 1.4.1-21-gabe81