Closed progfolio closed 1 year ago
Actually, I get the same error when calling the transient command in an interactive session until I explicitly require project.el
@progfolio A proper way to fix the byte-compile warning would be to add a declare-function
clause:
(declare-function project-files "project")
Also note that, as far as I remember, older versions of project.el
did not have project-files
generic function, but this should be detected by package-lint
. Emacs 27.1 shipped project.el 0.6.
@akirak: Silencing the byte compiler is not the proper fix here. Doing so will not prevent the following runtime error when trying to use makem's transient options to include/exclude files:
Symbol’s function definition is void: project-files
Ensuring project.el is loaded prior to those calls is the proper solution, which will also satisfy the byte compiler.
Also note that, as far as I remember, older versions of project.el did not have project-files generic function, but this should be detected by package-lint. Emacs 27.1 shipped project.el 0.6.
Looks like project-files
was added in the following commit:
commit 55ec674f5090f420c8982f5206e6566b5a664340
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Sat Sep 22 11:46:35 2018 -0400
* lisp/progmodes/project.el (project-files): New generic function.
(project-search, project-query-replace): New commands.
Which should be present in emacs-27.1:
git tag --contains 55ec674f509
emacs-27.0.90
emacs-27.0.91
emacs-27.1
emacs-27.1-rc1
emacs-27.1-rc2
emacs-27.1.90
emacs-27.1.91
emacs-27.2
emacs-27.2-rc1
emacs-27.2-rc2
emacs-28.0.90
emacs-28.0.91
emacs-28.0.92
emacs-28.1
emacs-28.1.90
emacs-28.1.91
When compiling in a clean environment, the following warning is emitted:
This is because the reader in the transient definition for the "Exclude files" option calls:
project-current
is autoloaded so project.el is properly loaded when the call to the (not autoloaded) functionproject-files
happens, but the byte-compiler will complain about this as it does not know that. Probably best to explicitly require project to be safe.