dev: merging from main

This commit is contained in:
Matt Nish-Lapidus 2024-04-18 11:25:17 -04:00
commit 08d20c7e62
11 changed files with 75 additions and 91 deletions

View file

@ -135,28 +135,6 @@
prog-mode-hook)
#'spell-fu-mode))
:config
;; TODO PR this fix upstream!
(defadvice! +spell--fix-face-detection-a (fn &rest args)
"`spell-fu--faces-at-point' uses face detection that won't penetrary
overlays (like `hl-line'). This makes `spell-fu-faces-exclude' demonstrably less
useful when it'll still spellcheck excluded faces on any line that `hl-line' is
displayed on, even momentarily."
:around #'spell-fu--faces-at-point
(letf! (defun get-char-property (pos prop &optional obj)
(or (plist-get (text-properties-at pos) prop)
(funcall get-char-property pos prop obj)))
(apply fn args)))
(defadvice! +spell--create-word-dict-a (_word words-file _action)
"Prevent `spell-fu--word-add-or-remove' from throwing non-existant
directory errors when writing a personal dictionary file (by creating the
directory first)."
:before #'spell-fu--word-add-or-remove
(unless (file-exists-p words-file)
(make-directory (file-name-directory words-file) t)
(with-temp-file words-file
(insert (format "personal_ws-1.1 %s 0\n" ispell-dictionary)))))
(add-hook! 'spell-fu-mode-hook
(defun +spell-init-excluded-faces-h ()
"Set `spell-fu-faces-exclude' according to `+spell-excluded-faces-alist'."

View file

@ -87,12 +87,10 @@
;;
;;; Flymake
(use-package! flymake
:when (modulep! +flymake)
:defer t
:init
;; as flymakes fail silently there is no need to activate it on a per major mode basis
(add-hook! (prog-mode text-mode) #'flymake-mode)
:hook ((prog-mode text-mode) . flymake-mode)
:config
(setq flymake-fringe-indicator-position 'right-fringe))

View file

@ -56,12 +56,11 @@ TAB/S-TAB.")
(setq corfu-auto t
corfu-auto-delay 0.18
corfu-auto-prefix 2
global-corfu-modes '((not
erc-mode
circe-mode
help-mode
gud-mode
vterm-mode)
global-corfu-modes '((not erc-mode
circe-mode
help-mode
gud-mode
vterm-mode)
t)
corfu-cycle t
corfu-preselect 'prompt
@ -79,8 +78,8 @@ TAB/S-TAB.")
(add-to-list 'corfu-continue-commands #'+corfu-smart-sep-toggle-escape)
(add-hook 'evil-insert-state-exit-hook #'corfu-quit)
;; If you want to update the visual hints after completing minibuffer commands
;; with Corfu and exiting, you have to do it manually.
;; HACK: If you want to update the visual hints after completing minibuffer
;; commands with Corfu and exiting, you have to do it manually.
(defadvice! +corfu--insert-before-exit-minibuffer-a ()
:before #'exit-minibuffer
(when (or (and (frame-live-p corfu--frame)

View file

@ -40,7 +40,7 @@
((user-error "Definition lookup in SRC blocks isn't supported yet"))))))
;;;###autoload
(defun +org-lookup-references-handler (identifier)
(defun +org-lookup-references-handler (_identifier)
"TODO"
(when (org-in-src-block-p t)
(user-error "References lookup in SRC blocks isn't supported yet")))

View file

@ -31,7 +31,7 @@
(format "(defun org-git-version (&rest _) \"%s-??-%s\")\n"
version (cdr (doom-call-process "git" "rev-parse" "--short" "HEAD")))
"(provide 'org-version)\n")))))
:pin "e9c288dfaccc2960e5b6889e6aabea700ad4e05a")
:pin "5bdfc02c6fa1b9ad4f075ac1ad1e4086ead310db")
(package! org-contrib
:recipe (:host github
:repo "emacsmirror/org-contrib")

View file

@ -15,7 +15,9 @@
;; hooks, but not the body.
(add-hook! 'envrc-global-mode-hook
(defun +direnv-init-global-mode-earlier-h ()
(let ((fn #'envrc-global-mode-enable-in-buffers))
(let ((fn (if (fboundp #'envrc-global-mode-enable-in-buffers)
#'envrc-global-mode-enable-in-buffers ; Removed in Emacs 30.
#'envrc-global-mode-enable-in-buffer)))
(if (not envrc-global-mode)
(remove-hook 'change-major-mode-after-body-hook fn)
(remove-hook 'after-change-major-mode-hook fn)