aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-06-19 08:55:42 +0800
committerPo Lu2023-06-19 08:55:42 +0800
commit83eeebe9ef21e7278f5da3c233171f60bdf07cee (patch)
tree213d378bea5a456fe1be5351f5af27ea94a5fa24
parent273c65f9e90b395e7513b802fd0938a096dec811 (diff)
parentedb0862f5e69240de90c30b8914af51778f26d31 (diff)
downloademacs-83eeebe9ef21e7278f5da3c233171f60bdf07cee.tar.gz
emacs-83eeebe9ef21e7278f5da3c233171f60bdf07cee.zip
Merge remote-tracking branch 'origin/master' into feature/android
-rw-r--r--lisp/term.el6
-rw-r--r--test/lisp/eshell/esh-util-tests.el10
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/term.el b/lisp/term.el
index 631d22c6006..6ef057f3e39 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -948,6 +948,9 @@ underlying shell."
948 (define-key map [next] 'term-send-next) 948 (define-key map [next] 'term-send-next)
949 (define-key map [xterm-paste] #'term--xterm-paste) 949 (define-key map [xterm-paste] #'term--xterm-paste)
950 (define-key map [?\C-/] #'term-send-C-_) 950 (define-key map [?\C-/] #'term-send-C-_)
951 (define-key map [?\C- ] #'term-send-C-@)
952 (define-key map [?\C-\M-/] #'term-send-C-M-_)
953 (define-key map [?\C-\M- ] #'term-send-C-M-@)
951 954
952 (when term-bind-function-keys 955 (when term-bind-function-keys
953 (dotimes (key 21) 956 (dotimes (key 21)
@@ -1414,6 +1417,9 @@ Entry to this mode runs the hooks on `term-mode-hook'."
1414(defun term-send-del () (interactive) (term-send-raw-string "\e[3~")) 1417(defun term-send-del () (interactive) (term-send-raw-string "\e[3~"))
1415(defun term-send-backspace () (interactive) (term-send-raw-string "\C-?")) 1418(defun term-send-backspace () (interactive) (term-send-raw-string "\C-?"))
1416(defun term-send-C-_ () (interactive) (term-send-raw-string "\C-_")) 1419(defun term-send-C-_ () (interactive) (term-send-raw-string "\C-_"))
1420(defun term-send-C-@ () (interactive) (term-send-raw-string "\C-@"))
1421(defun term-send-C-M-_ () (interactive) (term-send-raw-string "\e\C-_"))
1422(defun term-send-C-M-@ () (interactive) (term-send-raw-string "\e\C-@"))
1417 1423
1418(defun term-send-function-key () 1424(defun term-send-function-key ()
1419 "If bound to a function key, this will send that key to the underlying shell." 1425 "If bound to a function key, this will send that key to the underlying shell."
diff --git a/test/lisp/eshell/esh-util-tests.el b/test/lisp/eshell/esh-util-tests.el
index ed841e96c7e..52b42fe915c 100644
--- a/test/lisp/eshell/esh-util-tests.el
+++ b/test/lisp/eshell/esh-util-tests.el
@@ -46,9 +46,15 @@
46 46
47(ert-deftest esh-util-test/eshell-stringify/list () 47(ert-deftest esh-util-test/eshell-stringify/list ()
48 "Test that `eshell-stringify' correctly stringifies lists." 48 "Test that `eshell-stringify' correctly stringifies lists."
49 ;; These tests depend on the particulars of how Emacs pretty-prints
50 ;; lists; changes to the pretty-printer could result in different
51 ;; whitespace. We don't care about that, except to ensure there's
52 ;; no leading/trailing whitespace.
49 (should (equal (eshell-stringify '(1 2 3)) "(1 2 3)")) 53 (should (equal (eshell-stringify '(1 2 3)) "(1 2 3)"))
50 (should (equal (eshell-stringify '((1 2) (3 . 4))) 54 (should (equal (replace-regexp-in-string
51 "((1 2)\n (3 . 4))"))) 55 (rx (+ (or space "\n"))) " "
56 (eshell-stringify '((1 2) (3 . 4))))
57 "((1 2) (3 . 4))")))
52 58
53(ert-deftest esh-util-test/eshell-stringify/complex () 59(ert-deftest esh-util-test/eshell-stringify/complex ()
54 "Test that `eshell-stringify' correctly stringifies complex objects." 60 "Test that `eshell-stringify' correctly stringifies complex objects."