From c2e63a1fa6ca8c496fc80569655b3afa35504dd8 Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Thu, 2 Apr 2026 09:43:06 +0300 Subject: [PATCH] Use an option to remove value from git-commit-setup-hook The patch is flimsy and more often than not it did not work properly. --- lisp/icejam-flycheck.el | 15 +-------------- lisp/icejam-magit.el | 9 +++++++-- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/lisp/icejam-flycheck.el b/lisp/icejam-flycheck.el index 7dd1a82..be83a9c 100644 --- a/lisp/icejam-flycheck.el +++ b/lisp/icejam-flycheck.el @@ -54,20 +54,7 @@ (with-current-buffer target (setq flymake--diagnostics-buffer-source source) (display-buffer (current-buffer)) - (revert-buffer))))) - - (el-patch-feature 'git-commit) - (with-eval-after-load 'git-commit - ;; Reverts the contents of this commit: - ;; https://github.com/magit/magit/commit/2366db4b3b792fbd191c1d653014bfc6343b270c - (el-patch-defun git-commit-setup-capf () - "Set completion-at-point-functions to use cape completions in -`magit-commit' screens." - (setq-local completion-at-point-functions - (list (cape-capf-super #'cape-dabbrev #'yasnippet-capf) - #'cape-file - #'cape-keyword - #'ispell-completion-at-point))))) + (revert-buffer)))))) ;; Use flymake, the built in linter/checker. (use-package flymake :ensure nil diff --git a/lisp/icejam-magit.el b/lisp/icejam-magit.el index 6a25c20..d8b479a 100644 --- a/lisp/icejam-magit.el +++ b/lisp/icejam-magit.el @@ -2,7 +2,9 @@ ;;; Commentary: ;;; Code: -(eval-when-compile (defvar icejam-keys-mode-map)) +(eval-when-compile + (defvar icejam-keys-mode-map) + (declare-function git-commit-setup-capf 'git-commit)) (use-package magit :ensure t @@ -13,7 +15,10 @@ (" b" . magit-blame-addition) (" g" . magit-status)) (:map magit-blame-mode-map - (" b" . 'magit-blame-quit))) + (" b" . 'magit-blame-quit)) + :config + (setopt git-commit-setup-hook + (remove #'git-commit-setup-capf git-commit-setup-hook))) (provide 'icejam-magit) ;;; icejam-magit.el ends here