From 39667d3c870e8e17b229a9e52dac1d6fcfcfcd63 Mon Sep 17 00:00:00 2001 From: Keshav Kini Date: Wed, 16 Nov 2016 13:09:17 -0800 Subject: [PATCH] Don't suggest `SPC q r` if restart-emacs is missing When upgrading packages, Spacemacs backs up the old versions of the packages and then tells the user to restart Emacs using `SPC q r` so that the new version will be auto-installed. But `SPC q r` doesn't work if restart-emacs is one of the packages which is being upgraded, and hence isn't currently installed. --- core/core-configuration-layer.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index 845e2344f..a3a6b2bc3 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -1668,8 +1668,10 @@ If called with a prefix argument ALWAYS-UPDATE, assume yes to update." (spacemacs-buffer/append (format "\n--> %s package(s) to be updated.\n" upgraded-count)) (spacemacs-buffer/append - (concat "\nEmacs has to be restarted to actually install the " - "new version of the packages (SPC q r).\n")) + (format + (concat "\nEmacs has to be restarted to actually install the " + "new version of the packages%s.\n") + (if (member "restart-emacs" update-packages) "" " (SPC q r)"))) (configuration-layer//cleanup-rollback-directory) (spacemacs//redisplay))) (when (eq upgrade-count 0)