From 70b4ac967687034ab6a408d92bb4a51df52def9f Mon Sep 17 00:00:00 2001 From: Christopher League Date: Fri, 6 Mar 2020 10:17:09 -0500 Subject: [PATCH] Prevent init-file from loading twice When there is no `custom-file` specified, it defaults to `init-file`. Both must be loaded, so the `init-file` would be loaded twice. This only loads `custom-file` if it's *different* from `init-file`. --- .emacs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.emacs b/.emacs index 02215fe..159e4ab 100644 --- a/.emacs +++ b/.emacs @@ -121,7 +121,8 @@ ;; set a value for custom-file then don't touch it. (when (not custom-file) (setq custom-file custom-file-) - (load custom-file)))) + (unless (equal custom-file init-file) + (load custom-file))))) (defun chemacs-check-command-line-args (args) (if args