minor improvement
This commit is contained in:
parent
34d3a3ba72
commit
94a7f21ebb
@ -18,7 +18,8 @@
|
||||
(setq emacs-config-directory
|
||||
(let ((config-dir (getenv "EMACS_CONFIG_DIR")))
|
||||
(if config-dir
|
||||
(concat config-dir "/" emacs-config-name "/")
|
||||
(concat config-dir "/"
|
||||
emacs-config-name "/")
|
||||
(concat (substitute-in-file-name "~/.config/emacs/")
|
||||
emacs-config-name "/"))))
|
||||
|
||||
@ -77,22 +78,26 @@
|
||||
(list
|
||||
(concat "git clone https://github.com/syl20bnr/spacemacs.git " dir))))))
|
||||
|
||||
(defun on-installer-finished (process event)
|
||||
"Callback function when uinstaller process has finished.
|
||||
We use this function to load startkit initialization file"
|
||||
(cond
|
||||
((string= event "finished\n") (load-file emacs-init-file))
|
||||
(t (message "Event %s has been ignored" event))))
|
||||
|
||||
(defun install-emacs-startkit (name location)
|
||||
(progn (let* ((shell-buffer (make-comint-in-buffer "installer" nil "/bin/sh"))
|
||||
(shell-process (get-buffer-process shell-buffer)))
|
||||
(progn
|
||||
(defun on-installer-finished (process event)
|
||||
"Callback function when uinstaller process has finished.
|
||||
We use this function to load startkit initialization file"
|
||||
(cond
|
||||
((string= event "finished\n") (load-file emacs-init-file))
|
||||
(t (message "Event %s has been ignored" event))))
|
||||
|
||||
(set-process-sentinel shell-process 'on-installer-finished)
|
||||
(display-buffer shell-buffer)
|
||||
(cl-loop for cmd in (funcall (cdr (assoc (intern name) startkit-info)) location)
|
||||
do (comint-simple-send shell-process (concat cmd "\n")))
|
||||
(comint-simple-send shell-process "exit\n")))))
|
||||
(cl-loop for cmd in (funcall (cdr (assoc (intern name) startkit-info))
|
||||
location)
|
||||
do (comint-simple-send shell-process
|
||||
(concat cmd "\n")))
|
||||
(comint-simple-send shell-process
|
||||
"exit\n")))))
|
||||
|
||||
(if (not (file-exists-p emacs-init-file))
|
||||
(progn
|
||||
|
||||
Loading…
Reference in New Issue
Block a user