[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-escape c23a84de99 085/133: Handle error in evil-escap
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-escape c23a84de99 085/133: Handle error in evil-escape-pre-command-hook |
Date: |
Wed, 3 Jan 2024 21:59:55 -0500 (EST) |
branch: elpa/evil-escape
commit c23a84de9943a55a2e778b45fc7d71e30ee9394e
Author: justbur <justin@burkett.cc>
Commit: syl20bnr <sylvain.benner@gmail.com>
Handle error in evil-escape-pre-command-hook
Otherwise emacs automatically removes the function from the
pre-command-hook.
---
evil-escape.el | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/evil-escape.el b/evil-escape.el
index e1c3871cca..ecaa4991c1 100644
--- a/evil-escape.el
+++ b/evil-escape.el
@@ -150,26 +150,27 @@ with a key sequence."
(defun evil-escape-pre-command-hook ()
"evil-escape pre-command hook."
- (when (evil-escape-p)
- (let ((modified (buffer-modified-p))
- (inserted (evil-escape--insert))
- (fkey (elt evil-escape-key-sequence 0))
- (skey (elt evil-escape-key-sequence 1))
- (evt (read-event nil nil evil-escape-delay)))
- (when inserted (evil-escape--delete))
- (set-buffer-modified-p modified)
- (cond
- ((and (integerp evt)
- (or (and (equal (this-command-keys) (evil-escape--first-key))
- (char-equal evt skey))
- (and evil-escape-unordered-key-sequence
- (equal (this-command-keys) (evil-escape--second-key))
- (char-equal evt fkey))))
- (evil-escape)
- (setq this-command 'ignore))
- ((null evt))
- (t (setq unread-command-events
- (append unread-command-events (list evt))))))))
+ (with-demoted-errors "evil-escape: Error %S"
+ (when (evil-escape-p)
+ (let ((modified (buffer-modified-p))
+ (inserted (evil-escape--insert))
+ (fkey (elt evil-escape-key-sequence 0))
+ (skey (elt evil-escape-key-sequence 1))
+ (evt (read-event nil nil evil-escape-delay)))
+ (when inserted (evil-escape--delete))
+ (set-buffer-modified-p modified)
+ (cond
+ ((and (integerp evt)
+ (or (and (equal (this-command-keys) (evil-escape--first-key))
+ (char-equal evt skey))
+ (and evil-escape-unordered-key-sequence
+ (equal (this-command-keys) (evil-escape--second-key))
+ (char-equal evt fkey))))
+ (evil-escape)
+ (setq this-command 'ignore))
+ ((null evt))
+ (t (setq unread-command-events
+ (append unread-command-events (list evt)))))))))
(defun evil-escape-p ()
"Return non-nil if evil-escape can run."
- [nongnu] elpa/evil-escape 3d3c941db8 082/133: add evil escape suppressed predicates., (continued)
- [nongnu] elpa/evil-escape 3d3c941db8 082/133: add evil escape suppressed predicates., ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 9f7ed13160 086/133: Add support for read-only buffers, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 0039182e81 103/133: v3.13: use new funtion evil-lisp-state/quit, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape d9737a9075 096/133: Execute helm-keyboard-quit in helm buffers, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape aac5bc3206 115/133: Exit multiedit-insert-state into multiedit-state, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape a14fb7a538 106/133: Change predicate to characterp in pre-command-hook, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape befb07d03c 101/133: Bump version to 3.12, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape b548e84505 118/133: remove leading space in package header, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape fd633a9ffb 093/133: Attempt 2 at fixing evil-repeat, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 3c335a5709 119/133: Bump version to 3.16, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape c23a84de99 085/133: Handle error in evil-escape-pre-command-hook,
ELPA Syncer <=
- [nongnu] elpa/evil-escape 84e3166473 105/133: Add support for excluding evil states, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape aa3e64af5d 097/133: Add support for ibuffer, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 32fec964f8 090/133: Fix evil-repeat problem, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape d7f9940227 078/133: Fallback to evil-escape--escape-normal-state, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 88b2cfbb38 128/133: Update url in commentary, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 7966f4b1be 084/133: Add cl-lib dependency and provide a initial value to reduce., ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape d53c8930e8 091/133: Improve evil-repeat-info support but not quite right, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape c80afe7335 099/133: Handle minibuffer in emacs-state as well, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 533e8a5649 095/133: Update README and bump to 3.10, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 5e7a4c873e 107/133: Add support for nil evil-escape-key-sequence, ELPA Syncer, 2024/01/03