emacs: update packages
[~bandali/configs] / .emacs.d / init.el
index b7a433d..b09f080 100644 (file)
       esup-child-profile-require-level 0)
 
 ;; set them back to their defaults once we're done initializing
       esup-child-profile-require-level 0)
 
 ;; set them back to their defaults once we're done initializing
-(add-hook
- 'after-init-hook
- (lambda ()
-   (setq gc-cons-threshold a/gc-cons-threshold
-         gc-cons-percentage a/gc-cons-percentage
-         file-name-handler-alist a/file-name-handler-alist)))
+(defun a/post-init ()
+  (setq gc-cons-threshold a/gc-cons-threshold
+        gc-cons-percentage a/gc-cons-percentage
+        file-name-handler-alist a/file-name-handler-alist))
+(add-hook 'after-init-hook #'a/post-init)
 
 ;; increase number of lines kept in *Messages* log
 (setq message-log-max 20000)
 
 ;; increase number of lines kept in *Messages* log
 (setq message-log-max 20000)
   (interactive)
   (straight-transaction
     (straight-mark-transaction-as-init)
   (interactive)
   (straight-transaction
     (straight-mark-transaction-as-init)
-    (load user-init-file)))
+    (setq a/file-name-handler-alist file-name-handler-alist)
+    (load user-init-file)
+    (a/post-init)))
 
 ;; use-package
 (straight-use-package 'use-package)
 
 ;; use-package
 (straight-use-package 'use-package)