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

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

[nongnu] elpa/evil-escape 7fd1902fac 033/133: Fix regression in visual b


From: ELPA Syncer
Subject: [nongnu] elpa/evil-escape 7fd1902fac 033/133: Fix regression in visual block
Date: Wed, 3 Jan 2024 21:59:50 -0500 (EST)

branch: elpa/evil-escape
commit 7fd1902facf934d929ce2de356188b80a815af4d
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>

    Fix regression in visual block
    
    Due to using a lambda which disturb call-interactively-p
---
 evil-escape.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/evil-escape.el b/evil-escape.el
index 8b71a460c3..404a23825b 100644
--- a/evil-escape.el
+++ b/evil-escape.el
@@ -5,7 +5,7 @@
 ;; Author: Sylvain Benner <sylvain.benner@gmail.com>
 ;; Keywords: convenience editing evil
 ;; Created: 22 Oct 2014
-;; Version: 2.07
+;; Version: 2.08
 ;; Package-Requires: ((emacs "24") (evil "1.0.9"))
 ;; URL: https://github.com/syl20bnr/evil-escape
 
@@ -155,13 +155,9 @@ with a key sequence."
         (lookup-key evil-motion-state-map (evil-escape--first-key)))
   ;; evil states
   ;; insert state
-  (let ((insert-func (lambda (key) (interactive)
-                       (cond ((eq 'term-mode major-mode)
-                              (call-interactively 'term-send-raw))
-                             (t (evil-escape--default-insert-func key))))))
-    (eval `(evil-escape-define-escape "insert-state" evil-insert-state-map 
evil-normal-state
-                                      :insert-func ,insert-func
-                                      :delete-func 
evil-escape--default-delete-func)))
+  (eval `(evil-escape-define-escape "insert-state" evil-insert-state-map 
evil-normal-state
+                                    :insert-func 
evil-escape--insert-state-insert-func
+                                    :delete-func 
evil-escape--default-delete-func))
   ;; emacs state
   (let ((exit-func (lambda () (interactive)
                      (cond ((string-match "magit" (symbol-name major-mode))
@@ -242,6 +238,13 @@ with a key sequence."
   "Insert KEY in current buffer if not read only."
   (when (not buffer-read-only) (insert key)))
 
+(defun evil-escape--insert-state-insert-func (key)
+  "Take care of term-mode."
+  (interactive)
+  (cond ((eq 'term-mode major-mode)
+         (call-interactively 'term-send-raw))
+        (t (evil-escape--default-insert-func key))))
+
 (defun evil-escape--isearch-insert-func (key)
   "Insert KEY in current buffer if not read only."
   (isearch-printing-char))



reply via email to

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