1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
;; -*- mode: emacs-lisp; lexical-binding: t; no-byte-compile: t -*-
(eldev-use-plugin 'undercover)
(eldev-use-package-archive 'gnu)
(eldev-use-package-archive 'melpa)
(setq eldev-test-framework 'buttercup)
;; Tell checkdoc not to demand two spaces after a period.
(setq sentence-end-double-space nil)
;; Disable eager macro expansion during test loading, so that macros
;; get expanded *during* test execution, not before.
(defvar internal-macroexpand-for-load-original-symbol-function
(symbol-function 'internal-macroexpand-for-load))
(add-hook
'eldev-before-loading-dependencies-hook
(lambda (type additional-sets)
;; Execute before loading test deps. This hook is the closest I can
;; find to "right before loading the test files".
(when (and type
(memq 'test (if (listp additional-sets)
additional-sets
(list additional-sets))))
(fmakunbound 'internal-macroexpand-for-load))))
;; In order to minimize the possibility of disruption, put the
;; function back after loading the tests.
(add-hook 'eldev-test-buttercup-hook
(lambda (&rest _)
(fset 'internal-macroexpand-for-load
internal-macroexpand-for-load-original-symbol-function)))
|