[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-escape 0b62cb6637 025/133: Fix multiple inserted occu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-escape 0b62cb6637 025/133: Fix multiple inserted occurrences of `f` in isearch and ex-command context |
Date: |
Wed, 3 Jan 2024 21:59:49 -0500 (EST) |
branch: elpa/evil-escape
commit 0b62cb6637c446639fd6ffb5147c436599a686f6
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>
Fix multiple inserted occurrences of `f` in isearch and ex-command context
---
evil-escape.el | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/evil-escape.el b/evil-escape.el
index a21737f5d0..1395c2fd12 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.0
+;; Version: 2.01
;; Package-Requires: ((emacs "24") (evil "1.0.9"))
;; URL: https://github.com/syl20bnr/evil-escape
@@ -225,6 +225,14 @@ with a key sequence."
"Send `q' key press event to exit from a buffer."
(setq unread-command-events (listify-key-sequence "q")))
+(defun evil-escape--execute-shadow-func (func)
+ "Execute the passed FUNC if the context allows it."
+ (unless (or (null func)
+ (eq 'insert evil-state)
+ (and (boundp 'isearch-mode) (symbol-value 'isearch-mode))
+ (minibufferp))
+ (call-interactively func)))
+
(defun evil-escape--escape
(keys callback &optional shadowed-func insert-func delete-func)
"Execute the passed CALLBACK using KEYS. KEYS is a cons cell of 2 characters.
@@ -239,10 +247,6 @@ If INSERT-FUNC is not nil then the first key pressed is
inserted using the
If DELETE-FUNC is not nil then the first key is deleted using the function
DELETE-FUNC when calling CALLBACK. "
(let* ((modified (buffer-modified-p))
- (insertf (if insert-func
- insert-func 'evil-escape--default-insert-func))
- (deletef (if delete-func
- delete-func 'evil-escape--default-delete-func))
(fkey (elt keys 0))
(fkeystr (char-to-string fkey))
(skey (elt keys 1)))
@@ -250,8 +254,7 @@ DELETE-FUNC when calling CALLBACK. "
(let* ((evt (read-event nil nil evil-escape-delay)))
(cond
((null evt)
- (unless (eq 'insert evil-state)
- (if shadowed-func (call-interactively shadowed-func))))
+ (evil-escape--execute-shadow-func shadowed-func))
((and (integerp evt)
(char-equal evt skey))
;; remove the f character
@@ -261,8 +264,7 @@ DELETE-FUNC when calling CALLBACK. "
(t ; otherwise
(setq unread-command-events
(append unread-command-events (list evt)))
- (unless (eq 'insert evil-state)
- (if shadowed-func (call-interactively shadowed-func))))))))
+ (evil-escape--execute-shadow-func shadowed-func))))))
(provide 'evil-escape)
- [nongnu] elpa/evil-escape 37c227e4df 018/133: Version 1.5.1, (continued)
- [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
- [nongnu] elpa/evil-escape 7aa2bb2155 024/133: Suppress key-chord dependency (v2.0), ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 2e7bf1e62e 021/133: Support undo-tree, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape e0a0c9a9ee 023/133: Add support for paradox and gist-list menu, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 0b62cb6637 025/133: Fix multiple inserted occurrences of `f` in isearch and ex-command context,
ELPA Syncer <=
- [nongnu] elpa/evil-escape 6cb4fa408a 026/133: Add evil-iedit-state, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 6d46b81bbc 030/133: Fix regression for evil-iedit-state, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 3637f13210 055/133: Correctly handle iedit-state, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape da5498d25e 035/133: Correctly restore evil-lisp-state shadowed function by evil-escape, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape cf3e18673d 051/133: Undefine mapping on first key when evil-escape is disabled, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape cbfc43840f 063/133: Ensure that map is defined when undefining keys, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape b8c9b4631d 049/133: Add support for helm-ag-edit, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape b205051996 056/133: More stable passthrough, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape afa9c9c321 067/133: Fixes #37 Capital r deletes a char inappropriately, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 67843e9dd4 041/133: Fix recursive `f` input during isearch in certain buffers, ELPA Syncer, 2024/01/03