GNU bug report logs -
#69290
declare-function doesn't work when combined with --eval and -batch
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Stumbled upon that while trying to improve CI in Evil mode. Enabling byte-compilation
causes warnings about `undo-redo` undeclared on older Emacs'es, so tried to work
around that with `declare-function`. Turns out it doesn't work.
# Steps to reproduce (in terms of terminal commands)
λ cat test.el
;;; -*- lexical-binding: t -*-
(hello)
λ emacs -batch --eval '(declare-function hello nil)' -f batch-byte-compile test.el
In end of data:
test.el:2:2: Warning: the function ‘hello’ is not known to be defined.
## Expected
There's no warning
## Actual
There's a warning about undeclared function which is declared
# Additional information
Versions tested:
* commit d4d5830f8a0 built 3 weeks ago from master.
* 27.1, 26.3, 25.3
This bug report was last modified 1 year and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.