From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: What does byte-compile a variable containing a lambda do? Date: Wed, 3 Jun 2009 11:28:07 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1244021307 3986 80.91.229.12 (3 Jun 2009 09:28:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jun 2009 09:28:27 +0000 (UTC) Cc: Emacs-Devel devel To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 03 11:28:23 2009 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 1MBmli-0002aH-7S for ged-emacs-devel@m.gmane.org; Wed, 03 Jun 2009 11:28:23 +0200 Original-Received: from localhost ([127.0.0.1]:40983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBmlh-0006PO-Ma for ged-emacs-devel@m.gmane.org; Wed, 03 Jun 2009 05:28:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBmlZ-0006PB-Kd for emacs-devel@gnu.org; Wed, 03 Jun 2009 05:28:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBmlU-0006OM-Pk for emacs-devel@gnu.org; Wed, 03 Jun 2009 05:28:12 -0400 Original-Received: from [199.232.76.173] (port=57185 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBmlU-0006OJ-Hf for emacs-devel@gnu.org; Wed, 03 Jun 2009 05:28:08 -0400 Original-Received: from mail-fx0-f169.google.com ([209.85.220.169]:64826) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MBmlU-0000Mu-5X for emacs-devel@gnu.org; Wed, 03 Jun 2009 05:28:08 -0400 Original-Received: by fxm17 with SMTP id 17so9980407fxm.42 for ; Wed, 03 Jun 2009 02:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=d/ZiVh7MFUnLF0hVIiUwXPDkwa15ybcXD7cbOf7hXtk=; b=L4C1vCj8Iea07oN3UzrgdI3YQb7F0crwjsqHhexDe581VJ0FzKQOh7aPLjdmmYCuud AMj6eI0eqUtVH3XEQ8AhhMBHgzaVzcNdU26X/kjtCyyiXc35G0UTIsF+98dumLla2sD2 jRXhcP3wCSnhnL/4WUl9hl74WXPKNcZf7LlP0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=DXu3EXIc+zyafPy1cID5Y3/kh591/UvSsks8P4+Q6cJj2wWO3rbzxqZYIaLHbPcEsp 0/DcgA8HjuNlAfrrJCCgyx7x+Ikcw/nk1goH93xsTN3CT7xx43IWGCy6wOIxPmkVVD4v 2kE+hFiDpcW8BIY9LnvvVxTnwuIBSIetv7p5w= Original-Received: by 10.239.136.143 with SMTP id h15mr57606hbh.106.1244021287224; Wed, 03 Jun 2009 02:28:07 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:111309 Archived-At: On Wed, Jun 3, 2009 at 10:45 AM, Andreas Schwab wro= te: > Lennart Borgman writes: > >> The help text for byte-compile says >> >> =C2=A0 =C2=A0 byte-compile is a compiled Lisp function in `bytecomp.el'. >> >> =C2=A0 =C2=A0 (byte-compile form) >> >> =C2=A0 =C2=A0 If form is a symbol, byte-compile its function definition. >> =C2=A0 =C2=A0 If form is a lambda or a macro, byte-compile it as a funct= ion. >> >> I do not understand the last sentence. What happens? If a variable >> contains a lambda and you do >> >> =C2=A0 =C2=A0 (byte-compile VAR-WITH-LAMBDA) > > Since byte-compile is a regular function, it can only see the value it > gets passed. =C2=A0So unless you pass it a symbol (first case) it can onl= y > return the byte compiled form without side effect. Yes, but in the first case in the doc string it byte compiles the function definition "in place". In the second case I think it should say that it returns the byte compiled function, or?