Move custom helm bindings to top-level db/run-init
Configuring custom key bindings via use-package's :map keyword does seem to install autoloads for the bound functions into the main helm package. I.e., when binding `db/play-radio-stations' to # in `helm-command-map' via :map, use-package seems to install an autoload for `db/play-radio-stations' that requires `helm', instead of the correct `db-music' package. Additionally, defining key bindings somewhere in the init file is hard to manage, and they are thus now collected with other key bindings in `db/run-init'.
This commit is contained in:
parent
f1ef558a23
commit
221f8f7fc3
11
init.el
11
init.el
|
@ -112,8 +112,6 @@
|
|||
(with-demoted-errors "Cannot activate mode: %s"
|
||||
(funcall mode +1)))
|
||||
|
||||
(require 'helm)
|
||||
|
||||
(unless on-windows
|
||||
(with-demoted-errors "Cannot load `pdf-tools’: %s"
|
||||
(pdf-tools-install)))
|
||||
|
@ -218,6 +216,12 @@
|
|||
(bind-key [remap fill-paragraph] #'endless/fill-or-unfill)
|
||||
(unbind-key "C-x C-c" global-map)
|
||||
|
||||
;; Custom helm bindings
|
||||
|
||||
(require 'helm)
|
||||
(bind-key "#" #'db/play-radio-stations helm-command-map)
|
||||
(bind-key "P" #'helm-pages helm-command-map)
|
||||
|
||||
;; Overwrite certain keybindings only if packages are avilable
|
||||
|
||||
(when (package-installed-p 'counsel)
|
||||
|
@ -1883,9 +1887,6 @@ With given ARG, display files in `db/important-document-path’."
|
|||
(use-package helm
|
||||
:ensure t
|
||||
:diminish helm-mode
|
||||
:bind (:map helm-command-map
|
||||
("#" . db/play-radio-stations)
|
||||
("P" . helm-pages))
|
||||
:init (setq helm-command-prefix-key "C-c h"
|
||||
helm-input-idle-delay 0.0
|
||||
helm-buffers-fuzzy-matching t
|
||||
|
|
Loading…
Reference in New Issue