unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* declare-function from included file
@ 2008-03-16 18:23 Ralf Angeli
  2008-03-19  0:47 ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Ralf Angeli @ 2008-03-16 18:23 UTC (permalink / raw)
  To: emacs-devel

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-03-19 22:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-16 18:23 declare-function from included file Ralf Angeli
2008-03-19  0:47 ` Glenn Morris
2008-03-19 18:57   ` Ralf Angeli
2008-03-19 19:30     ` Stefan Monnier
2008-03-19 20:32       ` Ralf Angeli
2008-03-19 20:42         ` Dan Nicolaescu
2008-03-19 21:00           ` Ralf Angeli
2008-03-19 21:19             ` Dan Nicolaescu
2008-03-19 21:45               ` Ralf Angeli
2008-03-19 22:18                 ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).