diff options
author | Case Duckworth | 2022-01-06 18:04:18 -0600 |
---|---|---|
committer | Case Duckworth | 2022-01-06 18:04:18 -0600 |
commit | 1aa0df763136f38255416a2c3c3f2dd0d4c5327d (patch) | |
tree | 4fe8574334c85d8c402703c7429496708d755fc4 /init.el | |
parent | Fixup +defvar to be in line with defvar (diff) | |
parent | Add /POKE stub command (diff) | |
download | emacs-1aa0df763136f38255416a2c3c3f2dd0d4c5327d.tar.gz emacs-1aa0df763136f38255416a2c3c3f2dd0d4c5327d.zip |
Merge branch 'main' of https://tildegit.org/acdw/emacs
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/init.el b/init.el index 07679e7..7f0733c 100644 --- a/init.el +++ b/init.el | |||
@@ -34,10 +34,15 @@ | |||
34 | "C-x 4 n" #'clone-buffer | 34 | "C-x 4 n" #'clone-buffer |
35 | "C-c v" #'visible-mode | 35 | "C-c v" #'visible-mode |
36 | "C-M-;" #'+lisp-comment-or-uncomment-sexp | 36 | "C-M-;" #'+lisp-comment-or-uncomment-sexp |
37 | "M-j" nil) | 37 | "M-j" nil |
38 | "C-x o" (lambda () (interactive) (switch-to-buffer nil)) | ||
39 | "C-x C-o" #'+open-paragraph | ||
40 | "C-w" #'+kill-word-backward-or-region) | ||
38 | ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults | 41 | ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults |
39 | (global-set-key (kbd "C-h") 'delete-backward-char) | 42 | (global-set-key (kbd "C-h") 'delete-backward-char) |
40 | (keyboard-translate ?\C-h ?\C-?) | 43 | (keyboard-translate ?\C-h ?\C-?) |
44 | ;; Hooks | ||
45 | ;; Advice | ||
41 | ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hph14un/ | 46 | ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hph14un/ |
42 | (define-advice keyboard-escape-quit (:around (fn &rest r)) | 47 | (define-advice keyboard-escape-quit (:around (fn &rest r)) |
43 | "Don't close splits on `keyboard-escape-quit'." | 48 | "Don't close splits on `keyboard-escape-quit'." |
@@ -104,6 +109,9 @@ | |||
104 | (setup (:require reading) | 109 | (setup (:require reading) |
105 | (:global "C-c C-r" #'reading-mode)) | 110 | (:global "C-c C-r" #'reading-mode)) |
106 | 111 | ||
112 | (setup (:require user-save) | ||
113 | (user-save-mode +1)) | ||
114 | |||
107 | (setup +key | 115 | (setup +key |
108 | (+ensure-after-init #'+key-global-mode)) | 116 | (+ensure-after-init #'+key-global-mode)) |
109 | 117 | ||
@@ -450,7 +458,7 @@ | |||
450 | "C-c C-l" #'+org-insert-link-dwim | 458 | "C-c C-l" #'+org-insert-link-dwim |
451 | "C-c C-n" #'+org-next-heading-widen | 459 | "C-c C-n" #'+org-next-heading-widen |
452 | "C-c C-p" #'+org-previous-heading-widen) | 460 | "C-c C-p" #'+org-previous-heading-widen) |
453 | (:local-hook before-save-hook #'+org-before-save@prettify-buffer) | 461 | (:local-hook user-save-hook #'+org-before-save@prettify-buffer) |
454 | (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char) | 462 | (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char) |
455 | (with-eval-after-load 'org | 463 | (with-eval-after-load 'org |
456 | (org-clock-persistence-insinuate) | 464 | (org-clock-persistence-insinuate) |
@@ -584,6 +592,7 @@ | |||
584 | (:require _circe | 592 | (:require _circe |
585 | +circe) | 593 | +circe) |
586 | (:also-load circe-chanop) | 594 | (:also-load circe-chanop) |
595 | (+ensure-after-init (lambda () (defalias 'irc '+irc "Start IRC."))) | ||
587 | 596 | ||
588 | ;; Formatting options | 597 | ;; Formatting options |
589 | (:option | 598 | (:option |
@@ -704,7 +713,11 @@ | |||
704 | (add-to-list '+pulse-location-commands #'lui-track-jump-to-indicator) | 713 | (add-to-list '+pulse-location-commands #'lui-track-jump-to-indicator) |
705 | (:hook #'visual-line-mode | 714 | (:hook #'visual-line-mode |
706 | #'enable-lui-track | 715 | #'enable-lui-track |
707 | #'visual-fill-column-mode) | 716 | #'visual-fill-column-mode |
717 | (defun +disable-electric-pair-mode () | ||
718 | "Disable `electric-pair-mode' in the current buffer." | ||
719 | (interactive) | ||
720 | (electric-pair-local-mode -1))) | ||
708 | (:local-set fringes-outside-margins t | 721 | (:local-set fringes-outside-margins t |
709 | right-margin-width (length lui-time-stamp-format) | 722 | right-margin-width (length lui-time-stamp-format) |
710 | scroll-margin 0 | 723 | scroll-margin 0 |
@@ -948,9 +961,11 @@ See also `crux-reopen-as-root-mode'." | |||
948 | (:+key "M-q" #'filldent-dwim)) | 961 | (:+key "M-q" #'filldent-dwim)) |
949 | 962 | ||
950 | (setup (:straight flyspell-correct) | 963 | (setup (:straight flyspell-correct) |
964 | (:+also-load +flyspell-correct ) | ||
951 | (:option flyspell-correct--cr-key ";") | 965 | (:option flyspell-correct--cr-key ";") |
952 | (:bind-into flyspell | 966 | (:bind-into flyspell |
953 | "C-;" #'flyspell-correct-wrapper)) | 967 | "C-;" #'flyspell-correct-wrapper |
968 | "<f7>" #'+flyspell-correct-buffer)) | ||
954 | 969 | ||
955 | (setup (:straight-when (forge | 970 | (setup (:straight-when (forge |
956 | :host github :repo "magit/forge") | 971 | :host github :repo "magit/forge") |
@@ -1136,7 +1151,9 @@ See also `crux-reopen-as-root-mode'." | |||
1136 | 1151 | ||
1137 | (setup (:straight paredit) | 1152 | (setup (:straight paredit) |
1138 | (:bind "DEL" #'paredit-backward-delete | 1153 | (:bind "DEL" #'paredit-backward-delete |
1139 | "C-<backspace>" #'paredit-backward-kill-word) | 1154 | "C-<backspace>" #'paredit-backward-kill-word |
1155 | "C-w" (lambda (r) (interactive "P") | ||
1156 | (+kill-word-backward-or-region r #'paredit-backward-kill-word))) | ||
1140 | (dolist (hook '(emacs-lisp-mode-hook | 1157 | (dolist (hook '(emacs-lisp-mode-hook |
1141 | eval-expression-minibuffer-setup-hook | 1158 | eval-expression-minibuffer-setup-hook |
1142 | ielm-mode-hook | 1159 | ielm-mode-hook |
@@ -1225,7 +1242,7 @@ See also `crux-reopen-as-root-mode'." | |||
1225 | :host github | 1242 | :host github |
1226 | :repo "duckwork/titlecase.el" | 1243 | :repo "duckwork/titlecase.el" |
1227 | :files ("*"))) | 1244 | :files ("*"))) |
1228 | (:with-map +casing-map | 1245 | (:with-map +casing-mode-map |
1229 | (:bind "t" #'titlecase-dwim))) | 1246 | (:bind "t" #'titlecase-dwim))) |
1230 | 1247 | ||
1231 | (setup (:straight topsy) | 1248 | (setup (:straight topsy) |