[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
declare-function from included file
From: |
Ralf Angeli |
Subject: |
declare-function from included file |
Date: |
Sun, 16 Mar 2008 19:23:57 +0100 |
Hi,
is it possible to put calls to `declare-function' in a file to be
included during byte compilation? The following does not seem not work:
Create the following three files ...
file.el:
(eval-when-compile
(require 'include))
(defun foo ()
(bar))
include.el:
(declare-function bar "ext:baz")
(provide 'include)
lpath.el:
(setq load-path (cons "." load-path))
... and compile file.el with
emacs -batch -q -l lpath.el -f batch-byte-compile file.el
With this recipe there is still a warning from the byte compiler about
`bar' being undefined.
I can silence the byte compiler by using
(fset 'bar (lambda (&rest args) nil))
in include.el instead of the `declare-function' call. Would this be a
better alternative?
--
Ralf
- declare-function from included file,
Ralf Angeli <=
- Re: declare-function from included file, Glenn Morris, 2008/03/18
- Re: declare-function from included file, Ralf Angeli, 2008/03/19
- Re: declare-function from included file, Stefan Monnier, 2008/03/19
- Re: declare-function from included file, Ralf Angeli, 2008/03/19
- Re: declare-function from included file, Dan Nicolaescu, 2008/03/19
- Re: declare-function from included file, Ralf Angeli, 2008/03/19
- Re: declare-function from included file, Dan Nicolaescu, 2008/03/19
- Re: declare-function from included file, Ralf Angeli, 2008/03/19
- Re: declare-function from included file, Dan Nicolaescu, 2008/03/19