about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-05-27 12:52:12 -0500
committerCase Duckworth2021-05-27 12:52:12 -0500
commit0acf0a28d77cf6c17f637034fb5035c20ba3be87 (patch)
treee216194b6a98ea98772b0bb580a9b61ea23f27fe
parentTweak ERC (diff)
downloademacs-0acf0a28d77cf6c17f637034fb5035c20ba3be87.tar.gz
emacs-0acf0a28d77cf6c17f637034fb5035c20ba3be87.zip
Change C-z binds to C-c and remove leader
-rw-r--r--init.el46
-rw-r--r--lisp/acdw.el10
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 @@
35 (let ((recipe (cadr sexp))) 35 (let ((recipe (cadr sexp)))
36 (if (consp recipe) 36 (if (consp recipe)
37 (car recipe) 37 (car recipe)
38 recipe)))) 38 recipe)))))
39
40 (setup-define :leader
41 (lambda (key command)
42 `(progn
43 (autoload #',command (symbol-name setup-name))
44 (define-key acdw/leader
45 ,(if (stringp key) (kbd key) key)
46 #',command)))
47 :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map."
48 :repeatable t))
49 39
50;;;; `no-littering' 40;;;; `no-littering'
51(setup (:straight no-littering) 41(setup (:straight no-littering)
@@ -145,7 +135,7 @@
145 135
146(setup debugger 136(setup debugger
147 (:hook visual-line-mode) 137 (:hook visual-line-mode)
148 (:leader "d" toggle-debug-on-error)) 138 (:global "C-c d" toggle-debug-on-error))
149 139
150(setup dired 140(setup dired
151 (setq-default dired-recursive-copies 'always 141 (setq-default dired-recursive-copies 'always
@@ -276,10 +266,12 @@
276 ("tilde.chat" 266 ("tilde.chat"
277 "#meta" "#team" "#gemini" 267 "#meta" "#team" "#gemini"
278 "#bread" ; how could I've forgotten!? 268 "#bread" ; how could I've forgotten!?
279 "#politics" "#bungame")) 269 "#politics" "#bungame"
270 "#backgammon"))
280 erc-button-url-regexp browse-url-button-regexp 271 erc-button-url-regexp browse-url-button-regexp
281 (append erc-common-server-suffixes) '("tilde.chat\\'" . "~") 272 erc-common-server-suffixes '(("oftc.net\\'" . "OFTC")
282 (append erc-common-server-suffixes) '("libera.chat\\'" . "LC") 273 ("tilde.chat\\'" . "~")
274 ("libera.chat\\'" . "LC"))
283 erc-header-line-face-method 275 erc-header-line-face-method
284 #'erc/update-header-line-show-disconnected 276 #'erc/update-header-line-show-disconnected
285 erc-hide-list '("JOIN" "NICK" "PART" "QUIT" "MODE" 277 erc-hide-list '("JOIN" "NICK" "PART" "QUIT" "MODE"
@@ -326,9 +318,10 @@
326 (interactive) 318 (interactive)
327 (if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*"))) 319 (if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*")))
328 (eshell-life-is-too-much) 320 (eshell-life-is-too-much)
329 (eshell))) 321 (with-message "Starting eshell"
322 (eshell))))
330 323
331 (:leader "s" eshell-pop-or-quit) 324 (:global "C-c s" eshell-pop-or-quit)
332 325
333 (add-hook 'eshell-mode-hook 326 (add-hook 'eshell-mode-hook
334 (defun eshell-mode@setup () 327 (defun eshell-mode@setup ()
@@ -408,7 +401,7 @@
408 (:option gnus-home-directory (acdw/dir "gnus" t) 401 (:option gnus-home-directory (acdw/dir "gnus" t)
409 gnus-directory (acdw/dir "News" t) 402 gnus-directory (acdw/dir "News" t)
410 gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) 403 gnus-init-file (expand-file-name "gnus.el" user-emacs-directory))
411 (:leader "m" gnus)) 404 (:global "C-c m" gnus))
412 405
413(setup ibuffer 406(setup ibuffer
414 (:option ibuffer-saved-filter-groups 407 (:option ibuffer-saved-filter-groups
@@ -742,8 +735,8 @@
742 ;; Remap C-h to DEL -- <f1> can be the "help" key 735 ;; Remap C-h to DEL -- <f1> can be the "help" key
743 (define-key key-translation-map [?\C-h] [?\C-?]) 736 (define-key key-translation-map [?\C-h] [?\C-?])
744 737
745 (:leader "C-c" save-buffers-kill-emacs 738 (:global "C-c t" acdw/insert-iso-date
746 "t" acdw/insert-iso-date)) 739 "C-z" nil))
747 740
748 741
749;;; Packages 742;;; Packages
@@ -813,10 +806,11 @@ if ripgrep is installed, otherwise `consult-grep'."
813 ;; Bindings 806 ;; Bindings
814 (:global 807 (:global
815 ;; C-c bindings (`mode-specific-map') 808 ;; C-c bindings (`mode-specific-map')
816 "C-c h" consult-history 809 ;; I don't use any of these right now.
817 "C-c m" consult-mode-command 810 ;; "C-c h" consult-history
818 "C-c b" consult-bookmark 811 ;; "C-c m" consult-mode-command
819 "C-c k" consult-kmacro 812 ;; "C-c b" consult-bookmark
813 ;; "C-c k" consult-kmacro
820 ;; C-x bindings (`ctl-x-map') 814 ;; C-x bindings (`ctl-x-map')
821 "C-x M-:" consult-complex-command 815 "C-x M-:" consult-complex-command
822 "C-x b" consult-buffer 816 "C-x b" consult-buffer
@@ -890,8 +884,6 @@ if ripgrep is installed, otherwise `consult-grep'."
890 elpher-certificate-directory (acdw/dir "elpher/") 884 elpher-certificate-directory (acdw/dir "elpher/")
891 elpher-gemini-max-fill-width fill-column) 885 elpher-gemini-max-fill-width fill-column)
892 886
893 (:leader "e" elpher-bookmarks)
894
895 (:bind "n" elpher-next-link 887 (:bind "n" elpher-next-link
896 "p" elpher-prev-link 888 "p" elpher-prev-link
897 "o" elpher-follow-current-link 889 "o" elpher-follow-current-link
@@ -956,7 +948,7 @@ if ripgrep is installed, otherwise `consult-grep'."
956 (:file-match "\\.lua\\'")) 948 (:file-match "\\.lua\\'"))
957 949
958(setup (:straight magit) 950(setup (:straight magit)
959 (:leader "g" magit-status) 951 (:global "C-c g" magit-status)
960 952
961 (defun magit-display-buffer-same-window (buffer) 953 (defun magit-display-buffer-same-window (buffer)
962 "Display BUFFER in the selected window like God intended." 954 "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
@@ -476,16 +476,6 @@ Then, build `browse-url-button-regexp' with the new protocol."
476 476
477 477
478 478
479;;; Keymaps
480
481(defvar acdw/leader
482 (let ((map (make-sparse-keymap))
483 (c-z (global-key-binding "\C-z")))
484 (global-set-key "\C-z" map)
485 (define-key map "\C-z" c-z)
486 map))
487
488
489;;; Minor modes 479;;; Minor modes
490 480
491(define-minor-mode acdw/reading-mode 481(define-minor-mode acdw/reading-mode