From 792cf41885950b06caf33260143ac9f9f3828753 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 4 Jan 2022 15:30:33 -0600 Subject: Fix variable loading issues --- init.el | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/init.el b/init.el index 002a2b1..6b48479 100644 --- a/init.el +++ b/init.el @@ -24,7 +24,8 @@ (setq debug-on-error (memq system-type '(msdos windows-nt))) (setup (:require +casing) - (define-key +key-mode-map (kbd "C-c c") +casing-map) + (with-eval-after-load '+key + (define-key +key-mode-map (kbd "C-c c") +casing-map)) ;; Unbind default casing bindings (:global "M-u" nil "M-c" nil "M-l" nil "C-x C-u" nil "C-x C-l" nil)) @@ -63,6 +64,25 @@ (setup (:require auth-source) (:option auth-sources (list (private/ "authinfo")))) +(setup (:require cus-edit) + ;; I don't use Custom to actually /make/ any customizations, but it's handy to + ;; (A) see what options are available and (B) persist some changes across + ;; restarts, for example, `safe-local-variables'. + (:require +cus-edit) + (:option custom-file (private/ "custom.el") + custom-magic-show nil + custom-magic-show-button t + custom-raised-buttons nil + custom-unlispify-tag-names nil + custom-variable-default-form 'lisp) + (dolist (var '(safe-local-variable-values + warning-suppress-types)) + (add-to-list '+custom-variable-allowlist var)) + (+ensure-after-init #'+custom-load-ignoring-most-customizations) + (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets) + (:with-mode Custom-mode + (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression))) + (setup (:require goto-addr) (if (fboundp #'global-goto-address-mode) (global-goto-address-mode) @@ -166,25 +186,6 @@ compilation-ask-about-save nil compilation-scroll-output t)) -(setup cus-edit - ;; I don't use Custom to actually /make/ any customizations, but it's handy to - ;; (A) see what options are available and (B) persist some changes across - ;; restarts, for example, `safe-local-variables'. - (:require +cus-edit) - (:option custom-file (private/ "custom.el") - custom-magic-show nil - custom-magic-show-button t - custom-raised-buttons nil - custom-unlispify-tag-names nil - custom-variable-default-form 'lisp) - (dolist (var '(safe-local-variable-values - warning-suppress-types)) - (add-to-list '+custom-variable-allowlist var)) - (+ensure-after-init #'+custom-load-ignoring-most-customizations) - (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets) - (:with-mode Custom-mode - (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression))) - (setup dired (:also-load dired-x) (:also-straight dired-subtree @@ -463,6 +464,7 @@ org-agenda-file-regexp org-agenda-templates)) (add-to-list '+custom-variable-allowlist var)) + (defvar org-agenda-files nil) (add-to-list 'org-agenda-files (sync/ "org/" t)) (:+leader "a" #'org-agenda "C-a" #'org-agenda) (:hook #'hl-line-mode)) -- cgit 1.4.1-21-gabe81