[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-escape 8af69d73f8 020/133: Fixes #10 deleting with `d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-escape 8af69d73f8 020/133: Fixes #10 deleting with `df)` does not include `)` |
Date: |
Wed, 3 Jan 2024 21:59:49 -0500 (EST) |
branch: elpa/evil-escape
commit 8af69d73f8192fbd12fdc96c3a1e7a67a1bf65b1
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>
Fixes #10 deleting with `df)` does not include `)`
---
evil-escape.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/evil-escape.el b/evil-escape.el
index 13be3db7de..077ac86a60 100644
--- a/evil-escape.el
+++ b/evil-escape.el
@@ -223,6 +223,12 @@ with a key sequence."
(let* ((insertp (not buffer-read-only)))
(delete-char -1)))
+(defun evil-escape--call-evil-function (func)
+ "Call the passed evil function appropriatly."
+ (if (eq 'inclusive (evil-get-command-property func :type))
+ (setq evil-this-type 'inclusive))
+ (call-interactively shadowed-func))
+
(evil-define-command evil-escape--escape
(keys shadowed-func insert? delete? callback &optional insert-func
delete-func)
"Execute the passed CALLBACK using KEYS. KEYS is a cons cell of 2 characters.
@@ -238,7 +244,7 @@ If DELETE? is not nil then the first key is deleted using
the function
DELETE-FUNC when calling CALLBACK. "
:repeat nil
(if (and shadowed-func (eq 'normal evil-state))
- (call-interactively shadowed-func)
+ (evil-escape--call-evil-function shadowed-func)
(let* ((modified (buffer-modified-p))
(insertf (if insert-func
insert-func 'evil-escape--default-insert-func))
@@ -252,7 +258,7 @@ DELETE-FUNC when calling CALLBACK. "
(cond
((null evt)
(unless (eq 'insert evil-state)
- (if shadowed-func (call-interactively shadowed-func))))
+ (if shadowed-func (evil-escape--call-evil-function
shadowed-func))))
((and (integerp evt)
(char-equal evt skey))
;; remove the f character
@@ -262,7 +268,8 @@ DELETE-FUNC when calling CALLBACK. "
(t ; otherwise
(setq unread-command-events
(append unread-command-events (list evt)))
- (if shadowed-func (call-interactively shadowed-func))))))))
+ (if shadowed-func (evil-escape--call-evil-function shadowed-func)))))
+ )))
(provide 'evil-escape)
;;; evil-escape.el ends here
- [nongnu] branch elpa/evil-escape created (now bdb1e69971), ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape a8fb352edd 009/133: Add melpa badge to readme, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape fe0c3318d8 005/133: Remove duplicate var declaration, and add trailing comment line, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape b09500cc4e 002/133: Update readme, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 8af69d73f8 020/133: Fixes #10 deleting with `df)` does not include `)`,
ELPA Syncer <=
- [nongnu] elpa/evil-escape 9dd9cccf32 027/133: Add pass through functionality, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 0da35398ed 058/133: Fix support for operators, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 0346740ff1 031/133: Correctly handle the evil function properties, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 37c227e4df 018/133: Version 1.5.1, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 05709479ed 010/133: Add badge for melpa stable, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 1fe3759ab4 014/133: Fix 'commandp is nil` when search for `f` in isearch, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 5da641b6e6 019/133: Quit ert buffers, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape fe21e8f256 004/133: Fix error in readme, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 07c6c1b4da 007/133: Fixes #2 Symbol's value as variable is void: isearch-abort, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 1d09324c72 011/133: Fix byte-compilation and defcustom, ELPA Syncer, 2024/01/03