branch: elpa/magit
commit de766d2968e2e26331bf40bc48d2e0d62d96c6c7
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-custom-initialize-after-init: Another kludge for Straight bug
    
    Re #5476.
---
 lisp/magit-autorevert.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/magit-autorevert.el b/lisp/magit-autorevert.el
index 95c822eeca5..861e0511b33 100644
--- a/lisp/magit-autorevert.el
+++ b/lisp/magit-autorevert.el
@@ -120,11 +120,13 @@ seconds of user inactivity.  That is not desirable."
           ((not load-file-name)
            (custom-initialize-set symbol value))
           ((let ((thisfile load-file-name))
-             (letrec ((f (lambda (file)
-                           (when (equal file thisfile)
-                             (ignore-errors
-                               (remove-hook 'after-load-functions f))
-                             (custom-initialize-set symbol value)))))
+             (letrec ((f (apply-partially
+                          (lambda (symbol value file)
+                            (when (equal file thisfile)
+                              (ignore-errors
+                                (remove-hook 'after-load-functions f))
+                              (custom-initialize-set symbol value)))
+                          symbol value)))
                (add-hook 'after-load-functions f)))))))
 
 (defun magit-turn-on-auto-revert-mode-if-desired (&optional file)

Reply via email to