diff --git a/lisp/doom-lib.el b/lisp/doom-lib.el index 58853495e..261cdf17a 100644 --- a/lisp/doom-lib.el +++ b/lisp/doom-lib.el @@ -1713,7 +1713,7 @@ If DEFAULT? is non-nil, an unspecified CAR/CDR will fall bakc to (_default . (list "Expected PROFILE to be a string, cons cell, or `doom-profile'" (type-of profile) profile)))))) -(defun doom-profile-init-file (profile &optional el?) +(defun doom-profile-init-file (profile) "Return the init file for PROFILE." (declare (side-effect-free t)) (cl-destructuring-bind (name . ref) @@ -1721,10 +1721,9 @@ If DEFAULT? is non-nil, an unspecified CAR/CDR will fall bakc to (_default . (doom-profile-key profile t) (cons nil nil)) (file-name-concat doom-data-dir name "@" ref - (format "init.%d.%d.%s" + (format "init.%d.%d.el" emacs-major-version - emacs-minor-version - (if el? "el" "elc"))))) + emacs-minor-version)))) (defun doom-profile-get (profile-name &optional property null-value) "Return PROFILE-NAME's PROFILE, otherwise its PROPERTY, otherwise NULL-VALUE." diff --git a/lisp/doom-start.el b/lisp/doom-start.el index 55e495453..e478a73ae 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -308,9 +308,7 @@ If RETURN-P, return the message as a string instead of displaying it." (doom-profile-init-file doom-profile))) ;; If we loaded a compiled file, set `user-init-file' to the ;; source version if that exists. - (setq user-init-file - (concat (string-remove-suffix ".elc" init-file-name) - ".el")) + (setq user-init-file init-file-name) ;; HACK: if `init-file-name' happens to be higher in ;; `load-history' than a symbol's actual definition, ;; `symbol-file' (and help/helpful buffers) will report the diff --git a/lisp/lib/profiles.el b/lisp/lib/profiles.el index 19b699b3f..3076cd50a 100644 --- a/lisp/lib/profiles.el +++ b/lisp/lib/profiles.el @@ -242,7 +242,7 @@ caches them in `doom--profiles'. If RELOAD? is non-nil, refresh the cache." (doom-initialize-packages) (let* ((default-directory doom-profile-dir) (init-dir doom-profile-init-dir-name) - (init-file (doom-profile-init-file doom-profile t))) + (init-file (doom-profile-init-file doom-profile))) (print! (start "(Re)building profile in %s/...") (path default-directory)) (condition-case-unless-debug e (with-file-modes #o750 @@ -302,14 +302,8 @@ caches them in `doom--profiles'. If RELOAD? is non-nil, refresh the cache." if (fboundp genfn) collect (list initfn)))) (current-buffer))) - (print! (start "Byte-compiling %s...") (relpath init-file)) - (print-group! - (let ((byte-compile-debug t) - (byte-compile-warnings (if init-file-debug '(suspicious make-local callargs)))) - (byte-compile-file init-file))) - (print! (success "Built %s") (byte-compile-dest-file init-file)))) + (print! (success "Built %s") (filename init-file)))) (error (delete-file init-file) - (delete-file (byte-compile-dest-file init-file)) (signal 'doom-autoload-error (list init-file e)))))) (defun doom-profile--generate-vars ()