Use an option to remove value from git-commit-setup-hook
Some checks failed
/ Test config on 20 (push) Failing after 39s

The patch is flimsy and more often than not it did not work properly.
This commit is contained in:
Maciej 2026-04-02 09:43:06 +03:00
parent 23cba7a5fe
commit c2e63a1fa6
Signed by: maciej
GPG key ID: 28243AF437E32F99
2 changed files with 8 additions and 16 deletions

View file

@ -54,20 +54,7 @@
(with-current-buffer target (with-current-buffer target
(setq flymake--diagnostics-buffer-source source) (setq flymake--diagnostics-buffer-source source)
(display-buffer (current-buffer)) (display-buffer (current-buffer))
(revert-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)))))
;; Use flymake, the built in linter/checker. ;; Use flymake, the built in linter/checker.
(use-package flymake :ensure nil (use-package flymake :ensure nil

View file

@ -2,7 +2,9 @@
;;; Commentary: ;;; Commentary:
;;; Code: ;;; 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 (use-package magit
:ensure t :ensure t
@ -13,7 +15,10 @@
("<f5> b" . magit-blame-addition) ("<f5> b" . magit-blame-addition)
("<f5> g" . magit-status)) ("<f5> g" . magit-status))
(:map magit-blame-mode-map (:map magit-blame-mode-map
("<f5> b" . 'magit-blame-quit))) ("<f5> b" . 'magit-blame-quit))
:config
(setopt git-commit-setup-hook
(remove #'git-commit-setup-capf git-commit-setup-hook)))
(provide 'icejam-magit) (provide 'icejam-magit)
;;; icejam-magit.el ends here ;;; icejam-magit.el ends here