aboutsummaryrefslogtreecommitdiffstats
path: root/oni-eshell.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-06-15 10:32:45 -0700
committerGravatar Tom Willemse2020-06-15 10:32:45 -0700
commit3f13ef3ed2dea5b69a8600a568edc05c6a486c37 (patch)
treeb1018df1f178a377f3f72ad6c364dc85ed1b36ab /oni-eshell.el
parentd13751c94afe83e3631f5a42e223032ca5f50d28 (diff)
downloademacs-config-3f13ef3ed2dea5b69a8600a568edc05c6a486c37.tar.gz
emacs-config-3f13ef3ed2dea5b69a8600a568edc05c6a486c37.zip
Fix active keymap issue in esh-autosuggest
‘esh-autosuggest’ sets the value for ‘company-active-map’, but because I use ‘company-posframe’ I need it to set ‘company-posframe-active-map’.
Diffstat (limited to 'oni-eshell.el')
-rw-r--r--oni-eshell.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/oni-eshell.el b/oni-eshell.el
index 1dd5e65..29760cb 100644
--- a/oni-eshell.el
+++ b/oni-eshell.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2019.0920.093304
+;; Version: 2020.0615.100933
;; Package-Requires: (eshell-fringe-status esh-autosuggest xterm-color)
;; This program is free software; you can redistribute it and/or modify
@@ -63,6 +63,10 @@
"Set ‘xterm-color-preserve-properties’ to t."
(setq xterm-color-preserve-properties t))
+(defun oni-eshell-fix-esh-autosuggest-active-keymap ()
+ "Set ‘company-posframe-active-map’ to ‘esh-autosuggest-active-map’."
+ (setq-local company-posframe-active-map esh-autosuggest-active-map))
+
(add-hook 'eshell-first-time-mode-hook #'oni-eshell--set-eshell-C-d)
(add-hook 'eshell-load-hook #'oni-eshell--enable-truncating-buffers)
(add-hook 'eshell-load-hook #'oni-eshell--enable-xterm-filter)
@@ -71,6 +75,8 @@
(add-hook 'eshell-mode-hook 'goto-address-mode)
(add-hook 'eshell-before-prompt-hook #'oni-eshell--set-xterm-variables)
+(add-hook 'esh-autosuggest-mode-hook #'oni-eshell-fix-esh-autosuggest-active-keymap)
+
(when (display-graphic-p)
(add-hook 'eshell-mode-hook 'eshell-fringe-status-mode))