]> git.earman.xyz Git - emacsinit.git/commitdiff
Put custom-set-variables into their own file
authorrearman <rearman@r717.net>
Tue, 28 Feb 2023 18:19:22 +0000 (13:19 -0500)
committerrearman <rearman@r717.net>
Tue, 28 Feb 2023 18:19:22 +0000 (13:19 -0500)
Also set up variables for user-x.el files, for simpler bindings to bring up for
editing.

bindings.el
custom-set-variables.el [new file with mode: 0644]
early-init.el
init.el

index f9fbedfd3c2b6e9c5b74e9efcbfd8e17c0407645..09c86875b54a83c44757d930068c4699d49b72fb 100644 (file)
@@ -4,14 +4,14 @@
 (global-set-key (kbd "C-c a") 'org-agenda)
 (global-set-key (kbd "C-c b") 'buffer-menu-other-window)
 (global-set-key (kbd "C-c c") 'org-capture)
+(global-set-key (kbd "C-c C-e") (lambda () (interactive) (dired user-emacs-directory)))
 (global-set-key (kbd "C-c ei") (lambda () (interactive) (find-file user-init-file)))
-(global-set-key (kbd "C-c ep") (lambda () (interactive) (find-file (expand-file-name "package-config.el" user-emacs-directory))))
-(global-set-key (kbd "C-c es") (lambda () (interactive) (find-file (expand-file-name "setq-defaults.el" user-emacs-directory))))
-(global-set-key (kbd "C-c ew") (lambda () (interactive) (find-file (expand-file-name "work-eqs.el" user-emacs-directory))))
-(global-set-key (kbd "C-c ed") (lambda () (interactive) (find-file (expand-file-name "defuns.el" user-emacs-directory))))
-(global-set-key (kbd "C-c eo") (lambda () (interactive) (find-file (expand-file-name "org-setup.el" user-emacs-directory))))
-(global-set-key (kbd "C-c eh") (lambda () (interactive) (find-file (expand-file-name "hooks-puts.el" user-emacs-directory))))
-(global-set-key (kbd "C-c eb") (lambda () (interactive) (find-file (expand-file-name "bindings.el" user-emacs-directory))))
+(global-set-key (kbd "C-c ep") (lambda () (interactive) (find-file user-packages)))
+(global-set-key (kbd "C-c es") (lambda () (interactive) (find-file user-setqs)))
+(global-set-key (kbd "C-c ew") (lambda () (interactive) (find-file user-work-eqs)))
+(global-set-key (kbd "C-c ed") (lambda () (interactive) (find-file user-defuns)))
+(global-set-key (kbd "C-c eh") (lambda () (interactive) (find-file user-hooks)))
+(global-set-key (kbd "C-c eb") (lambda () (interactive) (find-file user-bindings)))
 (global-set-key (kbd "C-c s") 'eshell)
 (global-set-key (kbd "<f5>") 'scratch-only)
 (global-set-key (kbd "<f8>") 'recentf-open-files)
diff --git a/custom-set-variables.el b/custom-set-variables.el
new file mode 100644 (file)
index 0000000..2192bd7
--- /dev/null
@@ -0,0 +1,24 @@
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(ledger-reports
+   '(("assets" "%(binary) -f %(ledger-file) bal assets")
+     ("income" "%(binary) -f %(ledger-file) bal income")
+     ("expenses" "%(binary) -f %(ledger-file) bal expenses")
+     ("liabilities" "%(binary) -f %(ledger-file) bal liabilities")
+     ("bal" "%(binary) -f %(ledger-file) bal")
+     ("reg" "%(binary) -f %(ledger-file) reg")
+     ("payee" "%(binary) -f %(ledger-file) reg @%(payee)")
+     ("account" "%(binary) -f %(ledger-file) reg %(account)")))
+ '(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt))
+ '(package-selected-packages
+   '(page-break-lines popup-kill-ring auto-package-update s openwith gnuplot-mode magit expand-region company use-package)))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(mode-line ((t (:foreground "black" :background "gray"))))
+ '(mode-line-inactive ((t (:foreground "black" :background "#cae0a6")))))
index c7bd6bd4a046c558531aaa97645bb89ff93eb3d8..ac7e27038821ec8d5310733173c6716b416cd6db 100644 (file)
@@ -10,4 +10,4 @@
       initial-scratch-message nil
       server-client-instructions nil)
 
-(setq package-enable-at-startup t)
+(setq package-enable-at-startup nil)
diff --git a/init.el b/init.el
index 7cb8dcf7a433a4192053373ecff9591ce8a9f15c..2b364d7436a2fe45b8cc502a0df4bf8c61b8a86f 100644 (file)
--- a/init.el
+++ b/init.el
@@ -1,12 +1,18 @@
 ;; -*- lexical-binding: t; -*-
 
-(load (expand-file-name "package-config.el" user-emacs-directory))
-(load (expand-file-name "setq-defaults.el" user-emacs-directory))
-(load (expand-file-name "work-eqs.el" user-emacs-directory))
-(load (expand-file-name "defuns.el" user-emacs-directory))
-(load (expand-file-name "org-setup.el" user-emacs-directory))
-(load (expand-file-name "hooks-puts.el" user-emacs-directory))
-(load (expand-file-name "bindings.el" user-emacs-directory))
+(defvar user-packages (expand-file-name "package-config.el" user-emacs-directory))
+(defvar user-setqs (expand-file-name "setq-defaults.el" user-emacs-directory))
+(defvar user-work-eqs (expand-file-name "work-eqs.el" user-emacs-directory))
+(defvar user-defuns (expand-file-name "defuns.el" user-emacs-directory))
+(defvar user-hooks (expand-file-name "hooks-puts.el" user-emacs-directory))
+(defvar user-bindings (expand-file-name "bindings.el" user-emacs-directory))
+
+(load user-packages)
+(load user-setqs)
+(load user-work-eqs)
+(load user-defuns)
+(load user-hooks)
+(load user-bindings)
 
 ;; SETUP FOR SHARED WINDOWS/WSL INIT
 (if (eq system-type 'windows-nt)
                                ("\\.doc\\'" "libreoffice" (file))
                                ("\\.docx\\'" "libreoffice" (file)))))
 
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(ledger-reports
-   '(("assets" "%(binary) -f %(ledger-file) bal assets")
-     ("income" "%(binary) -f %(ledger-file) bal income")
-     ("expenses" "%(binary) -f %(ledger-file) bal expenses")
-     ("liabilities" "%(binary) -f %(ledger-file) bal liabilities")
-     ("bal" "%(binary) -f %(ledger-file) bal")
-     ("reg" "%(binary) -f %(ledger-file) reg")
-     ("payee" "%(binary) -f %(ledger-file) reg @%(payee)")
-     ("account" "%(binary) -f %(ledger-file) reg %(account)")))
- '(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt))
- '(package-selected-packages
-   '(acme-theme ledger-mode s openwith gnuplot-mode magit expand-region company use-package)))
-(custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(mode-line ((t (:foreground "black" :background "gray"))))
- '(mode-line-inactive ((t (:foreground "black" :background "#cae0a6"))))
- )
+(load custom-file 'noerror)