minor improvement
This commit is contained in:
parent
34d3a3ba72
commit
94a7f21ebb
@ -18,7 +18,8 @@
|
|||||||
(setq emacs-config-directory
|
(setq emacs-config-directory
|
||||||
(let ((config-dir (getenv "EMACS_CONFIG_DIR")))
|
(let ((config-dir (getenv "EMACS_CONFIG_DIR")))
|
||||||
(if config-dir
|
(if config-dir
|
||||||
(concat config-dir "/" emacs-config-name "/")
|
(concat config-dir "/"
|
||||||
|
emacs-config-name "/")
|
||||||
(concat (substitute-in-file-name "~/.config/emacs/")
|
(concat (substitute-in-file-name "~/.config/emacs/")
|
||||||
emacs-config-name "/"))))
|
emacs-config-name "/"))))
|
||||||
|
|
||||||
@ -77,22 +78,26 @@
|
|||||||
(list
|
(list
|
||||||
(concat "git clone https://github.com/syl20bnr/spacemacs.git " dir))))))
|
(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)
|
(defun install-emacs-startkit (name location)
|
||||||
(progn (let* ((shell-buffer (make-comint-in-buffer "installer" nil "/bin/sh"))
|
(progn (let* ((shell-buffer (make-comint-in-buffer "installer" nil "/bin/sh"))
|
||||||
(shell-process (get-buffer-process shell-buffer)))
|
(shell-process (get-buffer-process shell-buffer)))
|
||||||
(progn
|
(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)
|
(set-process-sentinel shell-process 'on-installer-finished)
|
||||||
(display-buffer shell-buffer)
|
(display-buffer shell-buffer)
|
||||||
(cl-loop for cmd in (funcall (cdr (assoc (intern name) startkit-info)) location)
|
(cl-loop for cmd in (funcall (cdr (assoc (intern name) startkit-info))
|
||||||
do (comint-simple-send shell-process (concat cmd "\n")))
|
location)
|
||||||
(comint-simple-send shell-process "exit\n")))))
|
do (comint-simple-send shell-process
|
||||||
|
(concat cmd "\n")))
|
||||||
|
(comint-simple-send shell-process
|
||||||
|
"exit\n")))))
|
||||||
|
|
||||||
(if (not (file-exists-p emacs-init-file))
|
(if (not (file-exists-p emacs-init-file))
|
||||||
(progn
|
(progn
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user