Skip to content

Commit fa3ec1f

Browse files
committed
Add with-simulated-input
1 parent 9a441f9 commit fa3ec1f

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

init.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,12 @@ set (i.e., OPERATION is \\='set). This excludes, e.g., let bindings."
10481048
(:with-function +assess-maybe-require
10491049
(:hook-into emacs-lisp-mode)))
10501050

1051+
(setup with-simulated-input
1052+
(:elpaca t)
1053+
(:require +with-simulated-input)
1054+
(:with-function +with-simulated-input-maybe-require
1055+
(:hook-into emacs-lisp-mode)))
1056+
10511057
(setup ecukes
10521058
(:elpaca t))
10531059

lisp/+assess.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
;;; +buttercup.el --- Assess support -*- lexical-binding: t; -*-
1+
;;; +assess.el --- Assess support -*- lexical-binding: t; -*-
22

33
;;; Commentary:
44

55
;;; Code:
66

77
(defun +assess-maybe-require ()
8-
"Enable buttercup-minor-mode in current buffer if buttercup is required."
8+
"Require assess if it is required by file."
99
(save-excursion
1010
(goto-char (point-min))
1111
(when (search-forward "(require 'assess)" 100 t)

lisp/+with-simulated-input.el

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
;;; +with-simulated-input.el --- Assess support -*- lexical-binding: t; -*-
2+
3+
;;; Commentary:
4+
5+
;;; Code:
6+
7+
(defun +with-simulated-input-maybe-require ()
8+
"Require with-simulated-input if it is required by file."
9+
(save-excursion
10+
(goto-char (point-min))
11+
(when (search-forward "(require 'with-simulated-input)" 100 t)
12+
(require 'with-simulated-input))))
13+
14+
(provide '+with-simulated-input)
15+
;;; +with-simulated-input.el ends here

0 commit comments

Comments
 (0)