From fbbc9a15a09aedbff1d018cd53f7f119d3da8fc4 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 24 Jun 2020 20:46:46 -0400 Subject: [PATCH] Revert "Revert "mode-hooks: unbind some keys for multi-term mode."" This reverts commit a57cb7f84a91da0cf8dff834ee8295560104a177. I'm taking another approach with the multi-term mode hook. --- mode-hooks.el | 1 + mode-hooks/multi-term-hooks.el | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 mode-hooks/multi-term-hooks.el diff --git a/mode-hooks.el b/mode-hooks.el index d2ca019..30599e2 100644 --- a/mode-hooks.el +++ b/mode-hooks.el @@ -5,6 +5,7 @@ (load-library "css-mode-hooks") (load-library "js-mode-hooks") (load-library "haskell-mode-hooks") +(load-library "multi-term-hooks") (load-library "nxml-mode-hooks") (load-library "octave-mode-hooks") (load-library "python-mode-hooks") diff --git a/mode-hooks/multi-term-hooks.el b/mode-hooks/multi-term-hooks.el new file mode 100644 index 0000000..9b4f963 --- /dev/null +++ b/mode-hooks/multi-term-hooks.el @@ -0,0 +1,11 @@ +(defun mtm-hook() + ;; Pass through C-c, C-x, and M-x for emaception. + (delete "C-x" term-unbind-key-list) + (delete "C-c" term-unbind-key-list) + (delete "" term-unbind-key-list) + + ;; We don't need the special C-c C-c any afterwards. + (delete '("C-c C-c" . term-interrupt-subjob) term-bind-key-alist) +) + +(add-hook 'term-mode-hook (function mtm-hook)) -- 2.44.2