]> gitweb.michael.orlitzky.com - emacs.d.git/commitdiff
mode-hooks: allow M-<backspace> to kill previous words in terminals.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 25 Feb 2019 01:25:28 +0000 (20:25 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 25 Feb 2019 01:25:28 +0000 (20:25 -0500)
mode-hooks.el
mode-hooks/term-mode-hooks.el [new file with mode: 0644]

index 2483dc180bb2899cb6ae11da7cb482d44dd85b55..625b3113da00d56500349f7f9238928e9192e746 100644 (file)
@@ -8,4 +8,5 @@
 (load-library "nxml-mode-hooks")
 (load-library "octave-mode-hooks")
 (load-library "ruby-mode-hooks")
+(load-library "term-mode-hooks")
 (load-library "visual-basic-mode-hooks")
diff --git a/mode-hooks/term-mode-hooks.el b/mode-hooks/term-mode-hooks.el
new file mode 100644 (file)
index 0000000..215937a
--- /dev/null
@@ -0,0 +1,8 @@
+(defun tm-hook()
+  ;; Allow M-<Backspace> to kill the previous word.
+  (add-to-list 'term-bind-key-alist
+              '("<M-backspace>" . term-send-backward-kill-word)
+  )
+)
+
+(add-hook 'term-mode-hook (function tm-hook))