about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el38
-rw-r--r--lisp/acdw.el10
2 files changed, 14 insertions, 34 deletions
diff --git a/init.el b/init.el index c01d49b..7c9d96a 100644 --- a/init.el +++ b/init.el
@@ -32,17 +32,7 @@
32 (let ((recipe (cadr sexp))) 32 (let ((recipe (cadr sexp)))
33 (if (consp recipe) 33 (if (consp recipe)
34 (car recipe) 34 (car recipe)
35 recipe)))) 35 recipe)))))
36
37 (setup-define :leader
38 (lambda (key command)
39 `(progn
40 (autoload #',command (symbol-name setup-name))
41 (define-key acdw/leader
42 ,(if (stringp key) (kbd key) key)
43 #',command)))
44 :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map."
45 :repeatable t))
46 36
47;;;; `no-littering' 37;;;; `no-littering'
48(setup (:straight no-littering) 38(setup (:straight no-littering)
@@ -142,7 +132,7 @@
142 132
143(setup debugger 133(setup debugger
144 (:hook visual-line-mode) 134 (:hook visual-line-mode)
145 (:leader "d" toggle-debug-on-error)) 135 (:global "C-c d" toggle-debug-on-error))
146 136
147(setup dired 137(setup dired
148 (setq-default dired-recursive-copies 'always 138 (setq-default dired-recursive-copies 'always
@@ -323,9 +313,10 @@
323 (interactive) 313 (interactive)
324 (if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*"))) 314 (if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*")))
325 (eshell-life-is-too-much) 315 (eshell-life-is-too-much)
326 (eshell))) 316 (with-message "Starting eshell"
317 (eshell))))
327 318
328 (:leader "s" eshell-pop-or-quit) 319 (:global "C-c s" eshell-pop-or-quit)
329 320
330 (add-hook 'eshell-mode-hook 321 (add-hook 'eshell-mode-hook
331 (defun eshell-mode@setup () 322 (defun eshell-mode@setup ()
@@ -405,7 +396,7 @@
405 (:option gnus-home-directory (acdw/dir "gnus" t) 396 (:option gnus-home-directory (acdw/dir "gnus" t)
406 gnus-directory (acdw/dir "News" t) 397 gnus-directory (acdw/dir "News" t)
407 gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) 398 gnus-init-file (expand-file-name "gnus.el" user-emacs-directory))
408 (:leader "m" gnus)) 399 (:global "C-c m" gnus))
409 400
410(setup ibuffer 401(setup ibuffer
411 (:option ibuffer-saved-filter-groups 402 (:option ibuffer-saved-filter-groups
@@ -741,8 +732,8 @@
741 ;; Remap C-h to DEL -- <f1> can be the "help" key 732 ;; Remap C-h to DEL -- <f1> can be the "help" key
742 (define-key key-translation-map [?\C-h] [?\C-?]) 733 (define-key key-translation-map [?\C-h] [?\C-?])
743 734
744 (:leader "C-c" save-buffers-kill-emacs 735 (:global "C-c t" acdw/insert-iso-date
745 "t" acdw/insert-iso-date)) 736 "C-z" nil))
746 737
747 738
748;;; Packages 739;;; Packages
@@ -812,10 +803,11 @@ if ripgrep is installed, otherwise `consult-grep'."
812 ;; Bindings 803 ;; Bindings
813 (:global 804 (:global
814 ;; C-c bindings (`mode-specific-map') 805 ;; C-c bindings (`mode-specific-map')
815 "C-c h" consult-history 806 ;; I don't use any of these right now.
816 "C-c m" consult-mode-command 807 ;; "C-c h" consult-history
817 "C-c b" consult-bookmark 808 ;; "C-c m" consult-mode-command
818 "C-c k" consult-kmacro 809 ;; "C-c b" consult-bookmark
810 ;; "C-c k" consult-kmacro
819 ;; C-x bindings (`ctl-x-map') 811 ;; C-x bindings (`ctl-x-map')
820 "C-x M-:" consult-complex-command 812 "C-x M-:" consult-complex-command
821 "C-x b" consult-buffer 813 "C-x b" consult-buffer
@@ -889,8 +881,6 @@ if ripgrep is installed, otherwise `consult-grep'."
889 elpher-certificate-directory (acdw/dir "elpher/") 881 elpher-certificate-directory (acdw/dir "elpher/")
890 elpher-gemini-max-fill-width fill-column) 882 elpher-gemini-max-fill-width fill-column)
891 883
892 (:leader "e" elpher-bookmarks)
893
894 (:bind "n" elpher-next-link 884 (:bind "n" elpher-next-link
895 "p" elpher-prev-link 885 "p" elpher-prev-link
896 "o" elpher-follow-current-link 886 "o" elpher-follow-current-link
@@ -955,7 +945,7 @@ if ripgrep is installed, otherwise `consult-grep'."
955 (:file-match "\\.lua\\'")) 945 (:file-match "\\.lua\\'"))
956 946
957(setup (:straight magit) 947(setup (:straight magit)
958 (:leader "g" magit-status) 948 (:global "C-c g" magit-status)
959 949
960 (defun magit-display-buffer-same-window (buffer) 950 (defun magit-display-buffer-same-window (buffer)
961 "Display BUFFER in the selected window like God intended." 951 "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