To use directory-files-recursively
in Emacs 24.x, I'm adding the following to a file cider-compat.el
:
(eval-and-compile
(unless (fboundp 'directory-files-recursively)
(defun directory-files-recursively (dir regexp &optional include-directories)
...)))
Byte-compiling the file, however, gives an error in Emacs 24.x:
In toplevel form:
cider-compat.el:191:1:Error: the function `directory-files-recursively' might not be defined at runtime.
make: *** [cider-compat.elc-test] Error 1
Why is this? The eval-and-compile
seems to work fine for other defun
s, e.g. internal--build-binding
.