From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: Can the byte-compiler check whether functions passed by name are defined? Date: Wed, 31 Jul 2013 20:01:17 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1375293683 5616 80.91.229.3 (31 Jul 2013 18:01:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2013 18:01:23 +0000 (UTC) Cc: Klaus-Dieter Bauer , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 31 20:01:25 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4aiD-0007Xb-7u for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2013 20:01:25 +0200 Original-Received: from localhost ([::1]:52126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4aiC-00032n-NH for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2013 14:01:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4ai8-00032f-7L for emacs-devel@gnu.org; Wed, 31 Jul 2013 14:01:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4ai6-0002aR-HI for emacs-devel@gnu.org; Wed, 31 Jul 2013 14:01:20 -0400 Original-Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:38022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4ai6-0002a7-Ck for emacs-devel@gnu.org; Wed, 31 Jul 2013 14:01:18 -0400 Original-Received: by mail-qc0-f171.google.com with SMTP id n10so552988qcw.30 for ; Wed, 31 Jul 2013 11:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=HUh0dcfwsNN2NZ/l5wcmGjNosAQacpdpOzcnOBPCQ/I=; b=m9QwsFX4K4fJEbpc/1Y1ltnEgLTB7mHuGOR0u968KtdYJAA2Jj2gyuViCoYMWarAK6 pU/yYZyx6odaoMtyJi+VJZ3yjcE2vIdvQVbvHnxQG+EUmmYp0+wLtItyD9Y6gEF4NKOn ulOGKK+RV5H64422Ocwt/yuO/nm2/aSnFRTaSj018ExjiZG2HB+iAOufuJ9LOySo15li V+762IwdLXacw6dMdKhStV0FpUNCP7lSC+yLR2v4V+KaV7b06qcxncBztpFH+EwAZtvc ol1V6zJksRsy2BAIMDFHIZ2PyRtUlu5EKiJzB1/uZrJgb0SVT7IW6lw2VfXxMOmix0m+ FB1Q== X-Received: by 10.49.37.4 with SMTP id u4mr57331744qej.87.1375293677724; Wed, 31 Jul 2013 11:01:17 -0700 (PDT) Original-Received: by 10.224.21.136 with HTTP; Wed, 31 Jul 2013 11:01:17 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162303 Archived-At: 2013/7/31 Stefan Monnier : >> 1. Has to be done, though maybe through a macro, for every higher-order >> function. > > Note that macroexp.el already has special handling for the main > higher-order functions (to warn about '(lambda ...)). So it could be > implemented there. I presume the list of =E2=80=9Cmain higher-order=E2=80=9D functions is hard= -coded then, isn't it? Is there a symbol property or "declare" form to mark specific arguments as function arguments, to have the same warnings for higher order functions from 3rd party libraries, too? Similar to how "docstring" arguments for macros are handled?