[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-simulated-input 5f0bc054b5 069/134: Better error prop
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/with-simulated-input 5f0bc054b5 069/134: Better error propagation |
Date: |
Mon, 10 Jan 2022 23:00:06 -0500 (EST) |
branch: elpa/with-simulated-input
commit 5f0bc054b5ba6f79affc4338847b7ea61c75d438
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Nikita Bloshchanevich <nikblos@outlook.com>
Better error propagation
Errors in KEYS are now rethrown outside of `completing-read', in an attempt
to
fix part of the tests.
Use `mapconcat' instead of `string-join' to support older Emacsen.
---
with-simulated-input.el | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/with-simulated-input.el b/with-simulated-input.el
index 8a9724e330..21f671d57b 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -118,17 +118,23 @@ the body form as a function."
(define-key overriding-terminal-local-map (kbd unbound-key)
(lambda ()
(interactive)
- (unless actions
- (throw result-sym "Reached end of simulated input while simulating
body"))
- (funcall (pop actions))))
+ (condition-case data
+ (progn
+ (unless actions
+ (error "Reached end of simulated input while simulating body"))
+ (funcall (pop actions)))
+ (t (throw error-sym data)))))
(catch result-sym
- (error
- (catch error-sym
- (execute-kbd-macro
- (kbd (string-join (cons unbound-key
- (cl-loop for key in keys collect
- (if (stringp key) key unbound-key)))
- " "))))))))
+ ;; Signals are not passed trough `read-from-minibuffer'.
+ (let ((err (catch error-sym
+ (execute-kbd-macro
+ (kbd (mapconcat
+ #'identity
+ (cons unbound-key
+ (cl-loop for key in keys collect
+ (if (stringp key) key unbound-key)))
+ " "))))))
+ (signal (car err) (cdr err))))))
;;;###autoload
(defmacro with-simulated-input (keys &rest body)
- [nongnu] elpa/with-simulated-input 37047a2073 090/134: Add tests for loading and unloading, (continued)
- [nongnu] elpa/with-simulated-input 37047a2073 090/134: Add tests for loading and unloading, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 2f40b160f5 096/134: Re-enable test for byte-compiled code, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 3525ed7dc5 095/134: Merge branch 'bleeding-edge' into rewrite-bleed, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 8f335ad321 108/134: Implement warnings for inputs that have no effect, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 8b4d44c3aa 104/134: Clean up wording in tests, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input ee4d2b75fd 133/134: Version 3.0, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 4e918757ae 111/134: Implement warnings for no-op KEYS inside a variable value, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input addb2a0711 122/134: Improve KEYS validation logic and error messages, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 0f43fe46d4 134/134: Add CI status badge to README, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 235a93f0fc 060/134: Add test for run-time evaluation of KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 5f0bc054b5 069/134: Better error propagation,
ELPA Syncer <=
- [nongnu] elpa/with-simulated-input abe9c855a8 075/134: `with-simulated-input' support `list' KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 1f48107e92 081/134: Add nbfalcon as Author, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 5713495a1c 067/134: Refactor: `with-simulated-input' function, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 2a4866984a 080/134: No longer handle variables specially in KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 6c2e0ece2d 084/134: Use #' for advice-add/-remove, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 582844da4c 085/134: Add a failing test for byte-compiled closures, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input dca9d87d50 091/134: Move issue-specific tests to their own block, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input c5b3f7ac70 097/134: Add tests for nil input, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 0a1b0dea0a 101/134: Clean up with-simulated-input-1, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 138106c256 116/134: Skip coverage calculation on older Emacsen, ELPA Syncer, 2022/01/10