[Emacs] Avoid making a server symlink loop

This commit is contained in:
Ivan Malison 2017-10-26 02:25:35 -07:00
parent 0d224a34ef
commit 5e7e82fb3c
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -1405,7 +1405,9 @@ Paradox is a package.el extension. I have no use for it now that I use straight.
(file-truename (imalison:get-server-file)))) (file-truename (imalison:get-server-file))))
(defun imalison:make-main-emacs-server () (defun imalison:make-main-emacs-server ()
(interactive) (interactive)
(when (not (equal server-name (imalison:main-emacs-server-name))) (when (not (and
(string-equal server-name "server")
(string-equal server-name (imalison:main-emacs-server-name))))
(let ((server-file (imalison:get-server-file))) (let ((server-file (imalison:get-server-file)))
(shell-command-to-string (shell-command-to-string
(format "cd %s && rm -f server && ln -s %s server" (format "cd %s && rm -f server && ln -s %s server"