]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/term.el: Make C-/ undo in a nested Emacs subprocess
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 30 Sep 2020 23:17:26 +0000 (19:17 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 30 Sep 2020 23:17:26 +0000 (19:17 -0400)
(term-send-C-_): New function.
(term-raw-map): Use it for `C-/`, as is done in xterm and friends.

lisp/term.el

index f0470d806cd88faac2bb933753b326fa4f588677..69681f706c0c29440b14b73088bf1ad25a08a816 100644 (file)
@@ -860,6 +860,7 @@ is buffer-local."
     (define-key map [prior] 'term-send-prior)
     (define-key map [next] 'term-send-next)
     (define-key map [xterm-paste] #'term--xterm-paste)
+    (define-key map [?\C-/] #'term-send-C-_)
     map)
   "Keyboard map for sending characters directly to the inferior process.")
 
@@ -1282,6 +1283,7 @@ without any interpretation."
 (defun term-send-next  () (interactive) (term-send-raw-string "\e[6~"))
 (defun term-send-del   () (interactive) (term-send-raw-string "\e[3~"))
 (defun term-send-backspace  () (interactive) (term-send-raw-string "\C-?"))
+(defun term-send-C-_  () (interactive) (term-send-raw-string "\C-_"))
 \f
 (defun term-char-mode ()
   "Switch to char (\"raw\") sub-mode of term mode.