Skip to content

Commit

Permalink
define dot emacs file
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Nov 26, 2023
1 parent 338203b commit a79dee2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
11 changes: 6 additions & 5 deletions lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
package-archives nil ; Leave it to custom use
package-archive-priorities nil)

(defvar eask-dot-emacs-file nil
"Variable hold .emacs file location.")

(defun eask--load--adv (fnc &rest args)
"Prevent `_prepare.el' loading twice.
Expand Down Expand Up @@ -1045,6 +1048,7 @@ This uses function `locate-dominating-file' to look up directory tree."
`(let* ((user-emacs-directory (expand-file-name (concat ".eask/" emacs-version "/") ,dir))
(package-user-dir (expand-file-name "elpa" user-emacs-directory))
(early-init-file (locate-user-emacs-file "early-init.el"))
(eask-dot-emacs-file (locate-user-emacs-file ".emacs"))
(user-init-file (locate-user-emacs-file "init.el"))
(custom-file (locate-user-emacs-file "custom.el")))
,@body))
Expand All @@ -1058,10 +1062,7 @@ This uses function `locate-dominating-file' to look up directory tree."
(unless inhibit-config
(when (version<= "27" emacs-version)
(load early-init-file t))
(load (if (boundp 'dot-emacs-file)
dot-emacs-file
(locate-user-emacs-file "../.emacs"))
t)
(load eask-dot-emacs-file t)
(load user-init-file t)))
(ansi-green (if inhibit-config "skipped ✗" "done ✓")))))

Expand All @@ -1076,7 +1077,7 @@ This uses function `locate-dominating-file' to look up directory tree."
(cond
((eask-config-p)
(let ((early-init-file (locate-user-emacs-file "early-init.el"))
(dot-emacs-file (locate-user-emacs-file "../.emacs"))
(eask-dot-emacs-file (locate-user-emacs-file "../.emacs"))
(user-init-file (locate-user-emacs-file "init.el")))
;; We accept Eask-file in `config' scope, but it shouldn't be used
;; for the sandbox.
Expand Down
29 changes: 14 additions & 15 deletions lisp/core/status.el
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,20 @@
("System type" ,system-type)))

(eask--print-title "Environment:")
(let ((dot-emacs-file (locate-user-emacs-file "../.emacs")))
(eask--print-infos
`(("Emacs directory" ,(expand-file-name user-emacs-directory)
,(eask--status-file-dir user-emacs-directory))
("ELPA directory" ,(expand-file-name package-user-dir)
,(eask--status-file-dir package-user-dir))
("early-init.el" ,(expand-file-name early-init-file)
,(eask--status-file-dir early-init-file))
(".emacs" ,(expand-file-name dot-emacs-file)
,(eask--status-file-dir dot-emacs-file))
("init.el" ,(expand-file-name user-init-file)
,(eask--status-file-dir user-init-file))
("custom.el" ,(if custom-file (expand-file-name custom-file)
"nil")
,(when custom-file (eask--status-file-dir custom-file))))))
(eask--print-infos
`(("Emacs directory" ,(expand-file-name user-emacs-directory)
,(eask--status-file-dir user-emacs-directory))
("ELPA directory" ,(expand-file-name package-user-dir)
,(eask--status-file-dir package-user-dir))
("early-init.el" ,(expand-file-name early-init-file)
,(eask--status-file-dir early-init-file))
(".emacs" ,(expand-file-name eask-dot-emacs-file)
,(eask--status-file-dir eask-dot-emacs-file))
("init.el" ,(expand-file-name user-init-file)
,(eask--status-file-dir user-init-file))
("custom.el" ,(if custom-file (expand-file-name custom-file)
"nil")
,(when custom-file (eask--status-file-dir custom-file)))))

(eask--print-title "Eask-file:")
(eask--print-infos
Expand Down

0 comments on commit a79dee2

Please sign in to comment.