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

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

[elpa] externals/mct 1d254a0bb7 16/23: Handle backspace or DEL in mct-tc


From: ELPA Syncer
Subject: [elpa] externals/mct 1d254a0bb7 16/23: Handle backspace or DEL in mct-tcm
Date: Fri, 25 Feb 2022 07:57:38 -0500 (EST)

branch: externals/mct
commit 1d254a0bb7e8596dc2c17351cc9ec2bffa4de014
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Handle backspace or DEL in mct-tcm
    
    For a discussion, see issue 25: 
<https://gitlab.com/protesilaos/mct/-/issues/25>.
---
 mct-tcm.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mct-tcm.el b/mct-tcm.el
index 4058a3631d..b2100ae032 100644
--- a/mct-tcm.el
+++ b/mct-tcm.el
@@ -81,10 +81,12 @@ place, the current session is treated as if it belongs to 
the
       (setq-local mct-live-update-delay 0)
       (setq-local mct-minimum-input 0)
       ;; FIXME 2022-02-24: Why does Emacs 27 insert twice?  In other
-      ;; words, why does it add the character even if the following is
+      ;; words, why does it add the character even if the `insert' is
       ;; commented out?
       (when (>= emacs-major-version 28)
-        (insert char)))))
+        (if (eq char 127) ; DEL or <backspace>
+            (delete-char -1)
+          (insert char))))))
 
 (defun mct-tcm--setup-redirect-self-insert ()
   "Set up `mct-tcm--redirect-self-insert'."



reply via email to

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