EMACS28+ gate eshell keymap fix

This commit is contained in:
Henrik Lissner 2020-10-29 01:42:09 -04:00
parent e408c04548
commit 8eb8f41b33
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -151,11 +151,12 @@ You should use `set-eshell-alias!' to change this.")
;; is not for us mere mortals to question! Fun fact: there's a "FIXME ;; is not for us mere mortals to question! Fun fact: there's a "FIXME
;; What the hell?!" above the offending line in esh-mode.el. ;; What the hell?!" above the offending line in esh-mode.el.
;; DEPRECATED As of Emacs 28, binding keys in a hook is no longer necessary. ;; DEPRECATED As of Emacs 28, binding keys in a hook is no longer necessary.
(add-hook! 'eshell-mode-hook (unless EMACS28+
(defun +eshell-fix-keymap-h () (add-hook! 'eshell-mode-hook
"Undo buffer-local `eshell-mode-map', so global keybinds work." (defun +eshell-fix-keymap-h ()
(kill-local-variable 'eshell-mode-map) "Undo buffer-local `eshell-mode-map', so global keybinds work."
(use-local-map eshell-mode-map)))) (kill-local-variable 'eshell-mode-map)
(use-local-map eshell-mode-map)))))
(use-package! eshell-up (use-package! eshell-up