From 847983e278ccf9408f325bb0a0e0c9cb32a1956c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 19 Oct 2018 12:07:17 -0400 Subject: [PATCH] Fix bin/doom hanging after generating autoloads Emacs occasionally hangs when polling for the emacs server (with server-running-p). Since this is used for such a trivial feature (to decide whether or not to display the "you need to restart" message), I removed it. Now it always shows that message (if the autoload files have changed). --- core/cli/autoloads.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 33150e75f..6ab127f2e 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -34,15 +34,17 @@ it exists." (message "Deleted old %s" (file-name-nondirectory file)))) (defun doom--warn-refresh-session () - (message "Detected a running Emacs session.\n") - (message "Restart Emacs or use `M-x doom/reload' for changes to take effect.")) + (print! (bold (green "\nFinished!"))) + (message "If you have a running Emacs Session, you will need to restart it or") + (message "reload Doom for changes to take effect:\n") + (when (fboundp '+workspace/restart-emacs-then-restore) + (message " M-x +workspace/restart-emacs-then-restore")) + (message " M-x restart-emacs") + (message " M-x doom/reload")) (defun doom--do-load (&rest files) (if (and noninteractive (not (daemonp))) - (progn - (require 'server) - (when (server-running-p) - (add-hook 'kill-emacs-hook #'doom--warn-refresh-session))) + (add-hook 'kill-emacs-hook #'doom--warn-refresh-session) (dolist (file files) (load-file (byte-compile-dest-file file)))))