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: How do you check for a feature during byte compilation? Date: Wed, 31 Dec 2008 02:19:42 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230686458 20487 80.91.229.12 (31 Dec 2008 01:20:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2008 01:20:58 +0000 (UTC) Cc: Emacs Devel To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 31 02:22:06 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 1LHpmT-0004YU-H5 for ged-emacs-devel@m.gmane.org; Wed, 31 Dec 2008 02:21:53 +0100 Original-Received: from localhost ([127.0.0.1]:60723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHplF-0000IJ-KJ for ged-emacs-devel@m.gmane.org; Tue, 30 Dec 2008 20:20:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LHpkO-0008RL-Lx for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:19:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LHpkO-0008R2-7z for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:19:44 -0500 Original-Received: from [199.232.76.173] (port=34817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHpkN-0008Qv-TR for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:19:43 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.155]:20726) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LHpkN-0004de-KA for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:19:43 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so2128087fgb.30 for ; Tue, 30 Dec 2008 17:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=+QAPk5DdNY4XzJ2tWxs50ZFXEQ8GoHBj9tqCq5AP524=; b=CmrAqYJqnu2h+X7dvjqnBk2rDakwC7uXrjoJDd610olHQaOspGn76H8c9gDz21dBbL cugkNJYdQcAciz2md1zAMK4zmTqoMhb7kQLFcW35NjFi47bY7zrtvRHhXl82O0E7vP97 0afUmLmGCS+iv6Af4tzHsEBaNRTz7YcnlfWqM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=xkj/21rEkBQUxWDy/dtpafNzM8u9vVhlwO6IZSI1ATANSGQy261Ewt25HLLgqU7Uyx sLMBdfK7fTbVWBENluX0ONZu0UjFVNNYxgLD15aQjXHZ7tkX97f8scZzoe0u5RA4xeyr omWQIERFQqxkzTeiNpfPaaZ03cLmxQncwfsQA= Original-Received: by 10.86.53.8 with SMTP id b8mr9034930fga.58.1230686382340; Tue, 30 Dec 2008 17:19:42 -0800 (PST) Original-Received: by 10.86.35.9 with HTTP; Tue, 30 Dec 2008 17:19:42 -0800 (PST) In-Reply-To: Content-Disposition: inline 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:107436 Archived-At: On Tue, Dec 30, 2008 at 9:20 PM, Stefan Monnier wrote: >> This does not work during byte compilation AFAICS, featurep returns nil: >> (when (featurep 'typesetter) >> (defun typesetter-init-nxhtml-mode () >> (typesetter-init-html-mode))) >> What do you do instead? > > In what way does it fail to work? Give us more info. My mistake. Top level forms are not evaluated during byte compilation unless you use eval-when-compile or eval-and-compile, I forgot that.