about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-08-24 23:07:45 -0500
committerCase Duckworth2021-08-24 23:07:45 -0500
commitb84ebb8cd9867c4f134dd5f4d5183849b04a9811 (patch)
treefeb1f8ae2d152c68532a1c3baf84fc09fdb9a7de
parentSetup `repeat-mode' real nice like (diff)
parentIDK change stuff (diff)
downloademacs-b84ebb8cd9867c4f134dd5f4d5183849b04a9811.tar.gz
emacs-b84ebb8cd9867c4f134dd5f4d5183849b04a9811.zip
Merge branch 'main' of https://tildegit.org/acdw/emacs
-rw-r--r--early-init.el4
-rw-r--r--init.el47
-rw-r--r--lisp/acdw-erc.el20
3 files changed, 50 insertions, 21 deletions
diff --git a/early-init.el b/early-init.el index e7d167f..bab026c 100644 --- a/early-init.el +++ b/early-init.el
@@ -81,8 +81,8 @@ say, `tool-bar-mode' once to toggle the tool bar back on."
81(add-hook 'after-make-frame-functions 81(add-hook 'after-make-frame-functions
82 (defun after-make-frame@setup (&rest args) 82 (defun after-make-frame@setup (&rest args)
83 (ignore args) 83 (ignore args)
84 (let ((monospace-faces '((:font "DejaVu Sans Mono" :height 100) 84 (let ((monospace-faces '((:font "Consolas" :height 100)
85 (:font "Consolas" :height 100) 85 (:font "DejaVu Sans Mono" :height 100)
86 (:font "monospace" :height 100)))) 86 (:font "monospace" :height 100))))
87 (acdw/set-first-face-attribute 'default monospace-faces) 87 (acdw/set-first-face-attribute 'default monospace-faces)
88 (acdw/set-first-face-attribute 'fixed-pitch monospace-faces) 88 (acdw/set-first-face-attribute 'fixed-pitch monospace-faces)
diff --git a/init.el b/init.el index 967be23..4f71122 100644 --- a/init.el +++ b/init.el
@@ -240,7 +240,11 @@
240 ;; Add advice to pulse evaluated regions 240 ;; Add advice to pulse evaluated regions
241 (define-advice eval-region (:around (fn start end &rest args) pulse-region) 241 (define-advice eval-region (:around (fn start end &rest args) pulse-region)
242 (pulse-momentary-highlight-region start end) 242 (pulse-momentary-highlight-region start end)
243 (apply fn start end args))) 243 (apply fn start end args))
244
245 (setup (:straight elisp-slime-nav)
246 (:hook-into emacs-lisp-mode
247 ielm-mode)))
244 248
245(setup encoding 249(setup encoding
246 (:option locale-coding-system 'utf-8-unix 250 (:option locale-coding-system 'utf-8-unix
@@ -417,6 +421,19 @@ like a dumbass."
417 (defun unfocused@save-buffers () 421 (defun unfocused@save-buffers ()
418 (save-some-buffers t)))) 422 (save-some-buffers t))))
419 423
424(setup flyspell
425 (add-hook 'text-mode-hook #'flyspell-mode))
426
427(setup (:straight flyspell-correct)
428 (add-hook 'flyspell-mode-hook
429 (defun flyspell-mode@flyspell-correct ()
430 (dolist (keybind '(("C-;" . flyspell-correct-wrapper)
431 ("C-," . nil)
432 ("C-." . nil)
433 ("C-M-i" . nil)))
434 (define-key flyspell-mode-map
435 (kbd (car keybind)) (cdr keybind))))))
436
420;; (setup flyspell 437;; (setup flyspell
421;; ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae 438;; ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae
422;; ;; in short: 439;; ;; in short:
@@ -790,11 +807,13 @@ like a dumbass."
790 807
791(setup variable-pitch-mode 808(setup variable-pitch-mode
792 809
793 (defun variable-pitch@disable-fill-column-indicator () 810 ;; I might want to change this to `buffer-face-mode-hook'...
794 (display-fill-column-indicator-mode -1)) 811 (advice-add 'variable-pitch-mode :after
795 812 (defun variable-pitch-mode@setup (&rest _)
796 (:hook acdw-fonts/adapt-variable-pitch 813 "Set up `variable-pitch-mode' with my customizations."
797 variable-pitch@disable-fill-column-indicator)) 814 (display-fill-column-indicator-mode (if buffer-face-mode
815 -1
816 +1)))))
798 817
799(setup view 818(setup view
800 (:option view-read-only t) 819 (:option view-read-only t)
@@ -919,9 +938,9 @@ like a dumbass."
919 (:global "M-=" count-words 938 (:global "M-=" count-words
920 "C-w" kill-region-or-backward-word 939 "C-w" kill-region-or-backward-word
921 "<help> h" nil ; HELLO takes a long time to load on Windows 940 "<help> h" nil ; HELLO takes a long time to load on Windows
922 "M-c" capitalize-dwim 941 "C-c c" capitalize-dwim
923 "M-u" upcase-dwim 942 "C-c u" upcase-dwim
924 "M-l" downcase-dwim) 943 "C-c l" downcase-dwim)
925 944
926 (:global "C-c t" acdw/insert-iso-date 945 (:global "C-c t" acdw/insert-iso-date
927 "C-z" nil)) 946 "C-z" nil))
@@ -955,7 +974,8 @@ like a dumbass."
955 (dired-async-mode +1)) 974 (dired-async-mode +1))
956 975
957(setup (:straight ace-link) 976(setup (:straight ace-link)
958 (ace-link-setup-default)) 977 (ace-link-setup-default)
978 (define-key erc-mode-map (kbd "C-o") #'ace-link))
959 979
960(setup (:straight avy) 980(setup (:straight avy)
961 (:global "C-:" avy-goto-char 981 (:global "C-:" avy-goto-char
@@ -1432,6 +1452,7 @@ successive invocations."
1432 (require 'acdw-org) ; so I don't clutter up init.el 1452 (require 'acdw-org) ; so I don't clutter up init.el
1433 (:option 1453 (:option
1434 org-adapt-indentation nil 1454 org-adapt-indentation nil
1455 org-agenda-files nil ; only until I set this up
1435 org-catch-invisible-edits 'smart 1456 org-catch-invisible-edits 'smart
1436 org-clock-clocked-in-display 'mode-line 1457 org-clock-clocked-in-display 'mode-line
1437 org-clock-string-limit 7 ; gives time and not title 1458 org-clock-string-limit 7 ; gives time and not title
@@ -1602,6 +1623,11 @@ successive invocations."
1602 (add-to-list 'auto-mode-alist spec)) 1623 (add-to-list 'auto-mode-alist spec))
1603 (add-hook 'ssh-config-mode-hook #'turn-on-font-lock)) 1624 (add-hook 'ssh-config-mode-hook #'turn-on-font-lock))
1604 1625
1626(setup (:straight (topsy
1627 :host github
1628 :repo "alphapapa/topsy.el"))
1629 (:hook-into prog-mode))
1630
1605(setup (:straight typo) 1631(setup (:straight typo)
1606 (add-hook 'text-mode-hook 1632 (add-hook 'text-mode-hook
1607 (defun text-mode@typo-unless () 1633 (defun text-mode@typo-unless ()
@@ -1761,6 +1787,5 @@ call `zzz-to-char'."
1761;;;; Work 1787;;;; Work
1762(when (acdw/system :work) 1788(when (acdw/system :work)
1763 (setup (:straight ahk-mode))) 1789 (setup (:straight ahk-mode)))
1764
1765 1790
1766;;; init.el ends here 1791;;; init.el ends here
diff --git a/lisp/acdw-erc.el b/lisp/acdw-erc.el index 3e120ad..22e6831 100644 --- a/lisp/acdw-erc.el +++ b/lisp/acdw-erc.el
@@ -102,14 +102,18 @@ If USE-TLS is non-nil, use TLS."
102 (format "%s%s>" 102 (format "%s%s>"
103 (substring name 0 (- len 2 (length ellipsis))) 103 (substring name 0 (- len 2 (length ellipsis)))
104 ellipsis) 104 ellipsis)
105 (format "%s%s>" 105 (propertize
106 name 106 (format "%s%s>"
107 (let ((ss) ; Rewrite s-repeat to avoid dependency. 107 name
108 (num (- len 2 (length name)))) 108 (let ((ss) ; Rewrite s-repeat to avoid dependency.
109 (while (> num 0) 109 (num (- len 2 (length name))))
110 (setq ss (cons " " ss)) 110 (while (> num 0)
111 (setq num (1- num))) 111 (setq ss (cons " " ss))
112 (apply #'concat ss)))))) 112 (setq num (1- num)))
113 (apply #'concat ss)))
114 'read-only t
115 'intangible t
116 'cursor-intangible t))))
113 117
114(defcustom erc-nick-truncate nil 118(defcustom erc-nick-truncate nil
115 "The width at which to truncate a nick with `erc-format-truncate-@nick'." 119 "The width at which to truncate a nick with `erc-format-truncate-@nick'."