emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/eat 79784b70ef: Bind keys 'DEL' and 'M-DEL' keys


From: ELPA Syncer
Subject: [nongnu] elpa/eat 79784b70ef: Bind keys 'DEL' and 'M-DEL' keys
Date: Thu, 6 Jul 2023 04:00:57 -0400 (EDT)

branch: elpa/eat
commit 79784b70ef3bcdf654766f9495c05b747a81f171
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Bind keys 'DEL' and 'M-DEL' keys
    
    * eat.el (eat-term-input-event): Handle 'DEL' and 'M-DEL' keys.
    * eat.el (eat-term-make-keymap): Bind 'DEL' and 'M-DEL' keys.
---
 eat.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/eat.el b/eat.el
index 8270f6fb25..0299f60fb4 100644
--- a/eat.el
+++ b/eat.el
@@ -4036,11 +4036,14 @@ client process may get confused."
                ('home ?H)
                ('end ?F)
                (_ ?~)))))
-          ('backspace
+          ((or 'backspace ?\C-?)
            (send "\C-?"))
           ('C-backspace
            (send "\C-h"))
-          ('M-backspace
+          ((or 'M-backspace
+               (pred (lambda (ev)
+                       (and (= (event-basic-type ev) ?\C-?)
+                            (equal (event-modifiers ev) '(meta))))))
            (send "\e\C-?"))
           ('C-M-backspace
            (send "\e\C-h"))
@@ -4300,7 +4303,7 @@ CATEGORIES is a list whose elements should be a one of 
the following
 keywords:
 
   `:ascii'              All self-insertable characters, plus
-                        `backspace', `insert', `delete' and
+                        `backspace', `DEL', `insert', `delete' and
                         `deletechar' keys, with all possible
                         modifiers.
   `:arrow'              Arrow keys with all possible modifiers.
@@ -4319,11 +4322,10 @@ EXCEPTIONS is a list of key sequences to not bind.  
Don't use
                 (unless (member key exceptions)
                   (define-key map key input-command))))
       (when (memq :ascii categories)
-        ;; Bind ASCII and self-insertable characters except ESC and
-        ;; DEL.
+        ;; Bind ASCII and self-insertable characters except ESC.
         (bind [remap self-insert-command])
         (cl-loop
-         for i from ?\C-@ to ?~
+         for i from ?\C-@ to ?\C-?
          do (unless (= i meta-prefix-char)
               (bind (vector i))))
         ;; Bind `backspace', `delete', `deletechar', and all modified
@@ -4346,7 +4348,7 @@ EXCEPTIONS is a list of key sequences to not bind.  Don't 
use
           (define-key map (vector meta-prefix-char)
                       (make-sparse-keymap))
           (cl-loop
-           for i from ?\C-@ to ?~
+           for i from ?\C-@ to ?\C-?
            do (unless (memq i '(?O ?\[))
                 (bind (vector meta-prefix-char i))))
           (bind (vector meta-prefix-char meta-prefix-char))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]