From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65887 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: declare-function in files from Gnus (hashcash.el, imap.el) Date: Wed, 05 Dec 2007 21:35:00 +0100 Message-ID: References: <200712011634.lB1GYCkr018222@oogie-boogie.ics.uci.edu> <87mysuwdcx.fsf@neutrino.caeruleus.net> <87ac27w4lz.fsf@neutrino.caeruleus.net> <87u00eufga.fsf@neutrino.caeruleus.net> <200712022237.lB2MbNC8016800@oogie-boogie.ics.uci.edu> <200712032340.lB3Ne3Vt009200@oogie-boogie.ics.uci.edu> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196887764 29693 80.91.229.12 (5 Dec 2007 20:49:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2007 20:49:24 +0000 (UTC) To: emacs-devel@gnu.org, Original-X-From: ding-owner+M14381@lists.math.uh.edu Wed Dec 05 21:49:34 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1J01BP-0004Kv-2x for ding-account@gmane.org; Wed, 05 Dec 2007 21:49:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1J01B7-0007CM-Hs; Wed, 05 Dec 2007 14:49:09 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1J01B5-0007BK-Qv for ding@lists.math.uh.edu; Wed, 05 Dec 2007 14:49:07 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1J01Az-0001x9-IA for ding@lists.math.uh.edu; Wed, 05 Dec 2007 14:49:07 -0600 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1J01Aw-0002Tp-00 for ; Wed, 05 Dec 2007 21:48:58 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.1/8.14.1) with ESMTP id lB5KmtuV016641; Wed, 5 Dec 2007 21:48:55 +0100 (MET) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 59D0E12DCB; Wed, 5 Dec 2007 21:48:55 +0100 (CET) X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+ Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65887 gmane.emacs.devel:84746 Archived-At: On Tue, Dec 04 2007, Dan Nicolaescu wrote: > Reiner Steib writes: > > > On Sun, Dec 02 2007, Dan Nicolaescu wrote: > > > > > Such files can just add a 1 line compatibility code: > > > > > > (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) That still gives compiler warnings: $ grep declare-function emacs/lisp/net/imap.el (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) (declare-function sasl-find-mechanism "sasl" (mechanism)) [...] (declare-function sasl-step-set-data "sasl" (step data)) $ /usr/bin/emacs -Q -batch -f batch-byte-compile emacs/lisp/net/imap.el In toplevel form: imap.el:970:19:Warning: reference to free variable `sasl-find-mechanism' [...] imap.el:975:52:Warning: reference to free variable `data' In end of data: imap.el:2970:1:Warning: the following functions are not known to be defined: declare-function, mechanism, client, step, sasl-mechanism-name, sasl-make-client, sasl-next-step, sasl-step-data, sasl-step-set-data Wrote .../emacs/lisp/net/imap.elc > > I think this is not a good idea... > > > > ,----[ (info "(elisp)Coding Conventions") ] [...] > This situation is not similar, declare-function does not perform any > active action. Why do you think it would matter? If some code test (fboundp 'declare-function) it probably expects that `declare-function' exists an DTRT. And it might be confusing if the availability of `declare-function' depends on whether or not the user has loaded such a package. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/