From 5ba0b27ec406399201d9eb8e20555a6c89c8ca92 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 21 Nov 2020 11:29:07 +0100 Subject: [PATCH] Warn if global key bindings for helm are not available If helm is installed as system package, the global keybindings may be missing. The user should be informed about this and reinstall helm from melpa. --- init.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index e232ce4..1fc4596 100644 --- a/init.el +++ b/init.el @@ -2122,8 +2122,13 @@ (require 'helm-buffers) (require 'helm-ring) - (bind-key "#" #'helm-emms helm-command-map) - (bind-key "P" #'helm-pages helm-command-map) + (if (require 'helm-global-bindings nil :no-error) + (progn + (bind-key "#" #'helm-emms helm-command-map) + (bind-key "P" #'helm-pages helm-command-map)) + (warn (concat + "Cannot load `helm-global-bindings', please check your helm installation for completeness. " + "(Have you installed it from melpa?)"))) (bind-key "" #'helm-execute-persistent-action helm-map) (bind-key "C-i" #'helm-execute-persistent-action helm-map)