From 07b6e5cdb0eab8b46c3c70d6b9e36e9fc52e206c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 23 Aug 2021 17:29:40 -0500 Subject: IDK change stuff LOL --- init.el | 47 ++++++++++++++++++++++++++++++++++++----------- lisp/acdw-erc.el | 20 ++++++++++++-------- 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/init.el b/init.el index 3266f92..693f046 100644 --- a/init.el +++ b/init.el @@ -240,7 +240,11 @@ ;; Add advice to pulse evaluated regions (define-advice eval-region (:around (fn start end &rest args) pulse-region) (pulse-momentary-highlight-region start end) - (apply fn start end args))) + (apply fn start end args)) + + (setup (:straight elisp-slime-nav) + (:hook-into emacs-lisp-mode + ielm-mode))) (setup encoding (:option locale-coding-system 'utf-8-unix @@ -416,6 +420,19 @@ like a dumbass." (defun unfocused@save-buffers () (save-some-buffers t)))) +(setup flyspell + (add-hook 'text-mode-hook #'flyspell-mode)) + +(setup (:straight flyspell-correct) + (add-hook 'flyspell-mode-hook + (defun flyspell-mode@flyspell-correct () + (dolist (keybind '(("C-;" . flyspell-correct-wrapper) + ("C-," . nil) + ("C-." . nil) + ("C-M-i" . nil))) + (define-key flyspell-mode-map + (kbd (car keybind)) (cdr keybind)))))) + ;; (setup flyspell ;; ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae ;; ;; in short: @@ -784,11 +801,13 @@ like a dumbass." (setup variable-pitch-mode - (defun variable-pitch@disable-fill-column-indicator () - (display-fill-column-indicator-mode -1)) - - (:hook acdw-fonts/adapt-variable-pitch - variable-pitch@disable-fill-column-indicator)) + ;; I might want to change this to `buffer-face-mode-hook'... + (advice-add 'variable-pitch-mode :after + (defun variable-pitch-mode@setup (&rest _) + "Set up `variable-pitch-mode' with my customizations." + (display-fill-column-indicator-mode (if buffer-face-mode + -1 + +1))))) (setup view (:option view-read-only t) @@ -853,9 +872,9 @@ like a dumbass." (:global "M-=" count-words "C-w" kill-region-or-backward-word " h" nil ; HELLO takes a long time to load on Windows - "M-c" capitalize-dwim - "M-u" upcase-dwim - "M-l" downcase-dwim) + "C-c c" capitalize-dwim + "C-c u" upcase-dwim + "C-c l" downcase-dwim) (:global "C-c t" acdw/insert-iso-date "C-z" nil)) @@ -889,7 +908,8 @@ like a dumbass." (dired-async-mode +1)) (setup (:straight ace-link) - (ace-link-setup-default)) + (ace-link-setup-default) + (define-key erc-mode-map (kbd "C-o") #'ace-link)) (setup (:straight avy) (:global "C-:" avy-goto-char @@ -1353,6 +1373,7 @@ successive invocations." (require 'acdw-org) ; so I don't clutter up init.el (:option org-adapt-indentation nil + org-agenda-files nil ; only until I set this up org-catch-invisible-edits 'smart org-clock-clocked-in-display 'mode-line org-clock-string-limit 7 ; gives time and not title @@ -1523,6 +1544,11 @@ successive invocations." (add-to-list 'auto-mode-alist spec)) (add-hook 'ssh-config-mode-hook #'turn-on-font-lock)) +(setup (:straight (topsy + :host github + :repo "alphapapa/topsy.el")) + (:hook-into prog-mode)) + (setup (:straight typo) (add-hook 'text-mode-hook (defun text-mode@typo-unless () @@ -1682,6 +1708,5 @@ call `zzz-to-char'." ;;;; Work (when (acdw/system :work) (setup (:straight ahk-mode))) - ;;; 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." (format "%s%s>" (substring name 0 (- len 2 (length ellipsis))) ellipsis) - (format "%s%s>" - name - (let ((ss) ; Rewrite s-repeat to avoid dependency. - (num (- len 2 (length name)))) - (while (> num 0) - (setq ss (cons " " ss)) - (setq num (1- num))) - (apply #'concat ss)))))) + (propertize + (format "%s%s>" + name + (let ((ss) ; Rewrite s-repeat to avoid dependency. + (num (- len 2 (length name)))) + (while (> num 0) + (setq ss (cons " " ss)) + (setq num (1- num))) + (apply #'concat ss))) + 'read-only t + 'intangible t + 'cursor-intangible t)))) (defcustom erc-nick-truncate nil "The width at which to truncate a nick with `erc-format-truncate-@nick'." -- cgit 1.4.1-21-gabe81