[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-simulated-input 0a1b0dea0a 101/134: Clean up with-sim
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/with-simulated-input 0a1b0dea0a 101/134: Clean up with-simulated-input-1 |
Date: |
Mon, 10 Jan 2022 23:00:09 -0500 (EST) |
branch: elpa/with-simulated-input
commit 0a1b0dea0ae92961992e4534118ef42629199447
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>
Clean up with-simulated-input-1
There are no code changes, only reformatting and renaming of variables
to match my coding style.
---
with-simulated-input.el | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/with-simulated-input.el b/with-simulated-input.el
index 794f7d6a9a..0649d744a8 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -106,37 +106,39 @@ to check."
KEYS is a keylist as can be passed to that function (except that
only a list is allowed, and forms must be functions) and MAIN is
the body form as a function."
- (let* ((unbound-key (wsi-get-unbound-key))
+ (let* ((next-action-key (wsi-get-unbound-key))
;; Ensure we don't interfere with any outside catching.
- (result-sym (make-symbol "result"))
- (error-sym (make-symbol "error"))
+ (result-sym (make-symbol "with-simulated-input-result"))
+ (error-sym (make-symbol "with-simulated-input-error"))
(orig-buf (current-buffer))
- (actions (nconc (list (lambda ()
- (switch-to-buffer orig-buf)
- (throw result-sym (funcall main))))
- (cl-remove-if-not #'functionp keys)
- (list (lambda ()
- (error "Reached end of simulated input while
evaluating body")))))
+ (actions
+ (nconc
+ (list (lambda ()
+ (switch-to-buffer orig-buf)
+ (throw result-sym (funcall main))))
+ (cl-remove-if-not #'functionp keys)
+ (list (lambda ()
+ (error "Reached end of simulated input while evaluating
body")))))
(overriding-terminal-local-map
(if overriding-terminal-local-map
(copy-keymap overriding-terminal-local-map)
(make-sparse-keymap))))
- (define-key overriding-terminal-local-map (kbd unbound-key)
+ (define-key overriding-terminal-local-map (kbd next-action-key)
(lambda ()
(interactive)
(condition-case data
(funcall (pop actions))
(error (throw error-sym data)))))
(catch result-sym
- ;; Signals are not passed trough `read-from-minibuffer'.
+ ;; Signals are not passed through `read-from-minibuffer'.
(let ((err (catch error-sym
(execute-kbd-macro
(kbd (mapconcat
#'identity
- (nconc (list unbound-key)
+ (nconc (list next-action-key)
(cl-loop for key in keys collect
- (if (stringp key) key unbound-key))
- (list unbound-key))
+ (if (stringp key) key
next-action-key))
+ (list next-action-key))
" "))))))
(signal (car err) (cdr err))))))
- [nongnu] elpa/with-simulated-input 235a93f0fc 060/134: Add test for run-time evaluation of KEYS, (continued)
- [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, 2022/01/10
- [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 <=
- [nongnu] elpa/with-simulated-input 138106c256 116/134: Skip coverage calculation on older Emacsen, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 1b9123c708 112/134: Cache the return value of wsi-get-unbound-key, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 4abf2f0e6b 103/134: Replace def-form with form in debug declaration, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input c0b765c7fb 115/134: Add debug declarations to macros in test file, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 445df9edfd 110/134: Eliminate unnecessary quotes in test suite, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 80d57be458 099/134: Make all the tests pass, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 41f4547339 132/134: Clarify a comment, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input a30bd8e6e4 129/134: Fix the test for variables in KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 9813acf396 114/134: Enable undercover on all tested Emacs versions, ELPA Syncer, 2022/01/10