From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Taylor R Campbell Newsgroups: gmane.emacs.devel Subject: semantics of `eval-and-compile' Date: Wed, 16 Jul 2008 11:32:07 -0400 Message-ID: <20080716153214.2F2C19825A@pluto.mumble.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216265254 12721 80.91.229.12 (17 Jul 2008 03:27:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2008 03:27:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 17 05:28:23 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 1KJKAI-00052Y-3W for ged-emacs-devel@m.gmane.org; Thu, 17 Jul 2008 05:28:22 +0200 Original-Received: from localhost ([127.0.0.1]:59377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJK9P-0005kg-GL for ged-emacs-devel@m.gmane.org; Wed, 16 Jul 2008 23:27:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJ8zL-0005wr-NU for emacs-devel@gnu.org; Wed, 16 Jul 2008 11:32:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJ8zK-0005wH-46 for emacs-devel@gnu.org; Wed, 16 Jul 2008 11:32:19 -0400 Original-Received: from [199.232.76.173] (port=56413 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJ8zJ-0005wE-Vo for emacs-devel@gnu.org; Wed, 16 Jul 2008 11:32:18 -0400 Original-Received: from pluto.mumble.net ([206.123.75.20]:54260) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJ8zJ-0003GG-LL for emacs-devel@gnu.org; Wed, 16 Jul 2008 11:32:17 -0400 Original-Received: from Oberon.local (localhost [127.0.0.1]) by pluto.mumble.net (Postfix) with ESMTP id 2F2C19825A; Wed, 16 Jul 2008 15:32:14 +0000 (UTC) User-Agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+ X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Wed, 16 Jul 2008 23:27:13 -0400 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:100860 Archived-At: The documentation string in Emacs 22.1 reads as follows: Like `progn', but evaluates the body at compile time and at load time. The following program, if put into a file and then compiled and loaded, suggests otherwise, however: (defun foo () (eval-and-compile (message "at compile- or load-time")) (message "at run-time")) When compiled, this file reports `at compile- or load-time'. When loaded, this file reports nothing. When `foo' is called, it reports `at compile- or load-time' and `at run-time'. Thus the body is *not* actually evaluated at load-time; rather, it is evaluated at compile-time and at run-time. What is the intended semantics? -- what is documented, what is implemented, or something else altogether?