From c0f61fa035facc45e979d09c7c4efcfdf333d3fe Mon Sep 17 00:00:00 2001 From: duianto Date: Sun, 29 Nov 2020 16:25:43 +0100 Subject: [PATCH] [core] Fix package update restart message Problem: When the restart-emacs package is being updated. The update packages restart message, still shows the (SPC q r) key binding even though it doesn't work. Cause: The member function compared a string against a list of symbols. A possible improvement: Explain that the key binding won't work this time. Before: Emacs has to be restarted to actually install the new version of the packages (SPC q r). After: Emacs has to be restarted to actually install the new version of the packages (SPC q r) won't work this time, because the restart-emacs package is being updated. --- core/core-configuration-layer.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index 57d367462..96ea7aa9b 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -2172,8 +2172,11 @@ to update." (spacemacs-buffer/append (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)"))) + "new version of the packages %s.\n") + (if (member 'restart-emacs update-packages) + (concat "\n(SPC q r) won't work this time, " + "because the restart-emacs package is being updated") + "(SPC q r)"))) (configuration-layer//cleanup-rollback-directory) (spacemacs//redisplay))) (when (eq upgrade-count 0)