From 3f13ef3ed2dea5b69a8600a568edc05c6a486c37 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 15 Jun 2020 10:32:45 -0700 Subject: [PATCH] Fix active keymap issue in esh-autosuggest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘esh-autosuggest’ sets the value for ‘company-active-map’, but because I use ‘company-posframe’ I need it to set ‘company-posframe-active-map’. --- oni-eshell.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 ;; 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))