diff options
| author | Axel Forsman <axel@axelf.se> | 2023-08-06 21:58:29 +0200 |
|---|---|---|
| committer | Tom Dalziel <tom_dl@hotmail.com> | 2023-08-20 23:46:23 +0100 |
| commit | 4beec94d14fc4180c41314edff997dbb9c422a23 (patch) | |
| tree | ad27845e6cef8c025895ba3eaf0b6e9e4667d0cc /evil-test-helpers.el | |
| parent | ca024ff6a7ba6de7cfd581878d1bdce02b6adef2 (diff) | |
Avoid eval in evil-test-buffer
Whatever is returned by the macro will be evaluated anyway. This fixes
errors due to lexical-binding now being enabled in evil-tests.
Diffstat (limited to 'evil-test-helpers.el')
| -rw-r--r-- | evil-test-helpers.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/evil-test-helpers.el b/evil-test-helpers.el index 7d67c56..c7eeb71 100644 --- a/evil-test-helpers.el +++ b/evil-test-helpers.el @@ -167,17 +167,15 @@ raised. Remaining forms are evaluated as-is. `(execute-kbd-macro (apply #'vconcat (mapcar #'listify-key-sequence - (mapcar #'eval ',form))))) + (list ,@form))))) ((memq (car-safe form) '(kbd vconcat)) `(execute-kbd-macro ,form)) - (t - form)))) + (t form)))) (if error-symbol `(should-error ,result :type ',error-symbol) result)))) body))) - (and (buffer-name buffer) - (kill-buffer buffer)))))) + (when (buffer-name buffer) (kill-buffer buffer)))))) (defmacro evil-test-selection (string &optional end-string before-predicate after-predicate) |
