From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: declare-function from included file Date: Sun, 16 Mar 2008 19:23:57 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205691878 3358 80.91.229.12 (16 Mar 2008 18:24:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Mar 2008 18:24:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 16 19:25:02 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JaxXa-0001Ik-5L for ged-emacs-devel@m.gmane.org; Sun, 16 Mar 2008 19:25:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaxX0-00043Y-KQ for ged-emacs-devel@m.gmane.org; Sun, 16 Mar 2008 14:24:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaxWu-00041n-LR for emacs-devel@gnu.org; Sun, 16 Mar 2008 14:24:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaxWr-0003ys-NC for emacs-devel@gnu.org; Sun, 16 Mar 2008 14:24:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaxWr-0003yf-8i for emacs-devel@gnu.org; Sun, 16 Mar 2008 14:24:17 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JaxWq-0008J7-RP for emacs-devel@gnu.org; Sun, 16 Mar 2008 14:24:17 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JaxWf-0000HK-35 for emacs-devel@gnu.org; Sun, 16 Mar 2008 18:24:05 +0000 Original-Received: from p54a53ee5.dip0.t-ipconnect.de ([84.165.62.229]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Mar 2008 18:24:05 +0000 Original-Received: from angeli by p54a53ee5.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Mar 2008 18:24:05 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p54a53ee5.dip0.t-ipconnect.de Cancel-Lock: sha1:mNepYx3E3bLOoqPDj+prRjbc/gE= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92759 Archived-At: 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