From d0f1731bab471ad2a7de685a85b7c3e571e292da Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sun, 4 Jun 2023 17:03:43 +0200 Subject: Convert diff-hl tweaks to use-package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Puzzled by this problem I have with :hook. "(use-package) Hooks" suggests that if package X defines function X-foo to be used by package Y in Y-bar-hook, then the idiomatic thing to do is… (use-package X :hook ((Y-bar . X-foo))) … but empirically, if Y.el contains… (defcustom Y-bar-hook '(Y-quux Y-corge)) (add-hook 'Y-bar-hook #'Y-grault) … then Y-bar-hook will be set to '(X-foo Y-grault): it will be missing the functions added in the defcustom form. Since add-hook does this: (or (boundp hook) (set hook nil)) I am assuming that the problem happens when use-package runs X's :hook additions before Y is loaded. No idea (a) if I can reproduce from -Q (b) if this is a SNAFU from setting always-defer (c) if this could be solved by sprinkling :after or :requires. --- .emacs-custom.el | 4 ---- 1 file changed, 4 deletions(-) (limited to '.emacs-custom.el') diff --git a/.emacs-custom.el b/.emacs-custom.el index 8d3b619..11bfaf4 100644 --- a/.emacs-custom.el +++ b/.emacs-custom.el @@ -14,9 +14,6 @@ '(delete-selection-mode t) '(describe-bindings-outline t) '(diff-default-read-only t) - '(diff-hl-flydiff-mode t) - '(dired-kill-when-opening-new-dired-buffer t) - '(dired-listing-switches "-al -Fhv --group-directories-first") '(electric-pair-mode t) '(enable-recursive-minibuffers t) '(epg-pinentry-mode 'loopback) @@ -29,7 +26,6 @@ '(gdb-many-windows t) '(generic-extras-enable-list '(ansible-inventory-generic-mode etc-fstab-generic-mode etc-modules-conf-generic-mode etc-passwd-generic-mode etc-services-generic-mode etc-sudoers-generic-mode hosts-generic-mode java-manifest-generic-mode java-properties-generic-mode pkginfo-generic-mode prototype-generic-mode resolve-conf-generic-mode x-resource-generic-mode xmodmap-generic-mode)) - '(global-diff-hl-mode t) '(global-page-break-lines-mode t nil (page-break-lines)) '(gnus-cloud-method "nnimap:gmail") '(highlight-nonselected-windows t) -- cgit v1.2.3