From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jos=E9_A=2E_Romero_L=2E?= Newsgroups: gmane.emacs.help Subject: Re: Byte-compile constants in a function Date: Tue, 3 Jul 2012 13:26:13 -0700 (PDT) Message-ID: <7fe94425-ce97-48e0-8afc-b2faa21b8c87@googlegroups.com> 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: dough.gmane.org 1341347727 30750 80.91.229.3 (3 Jul 2012 20:35:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Jul 2012 20:35:27 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: gnu.emacs.help@googlegroups.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 03 22:35:26 2012 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Sm9og-0008WN-5l for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jul 2012 22:35:22 +0200 Original-Received: from localhost ([::1]:56264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm9oe-0002qs-S8 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jul 2012 16:35:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm9ft-0001Z5-Jy for help-gnu-emacs@gnu.org; Tue, 03 Jul 2012 16:26:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm9fs-0003YE-10 for help-gnu-emacs@gnu.org; Tue, 03 Jul 2012 16:26:17 -0400 Original-Received: from mail-yw0-f57.google.com ([209.85.213.57]:46786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm9fr-0003Xu-TG for help-gnu-emacs@gnu.org; Tue, 03 Jul 2012 16:26:15 -0400 Original-Received: by yhr47 with SMTP id 47so8863025yhr.22 for ; Tue, 03 Jul 2012 13:26:13 -0700 (PDT) Original-Received: by 10.52.66.44 with SMTP id c12mr976689vdt.19.1341347173720; Tue, 03 Jul 2012 13:26:13 -0700 (PDT) Original-Path: glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=89.78.110.178; posting-account=mkEKGAoAAACAV2vhv5r9WHXWqsdL_niD Original-NNTP-Posting-Host: 89.78.110.178 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 89.78.110.178 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.213.57 X-Mailman-Approved-At: Tue, 03 Jul 2012 16:35:16 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85634 Archived-At: W dniu wtorek, 3 lipca 2012 18:57:12 UTC+2 u=C5=BCytkownik Joe Riel napisa= =C5=82: > Is there a way to define constant/macros so that the value is expanded > during byte-compilation of a function that uses them? (...) How about defining an inlined function that returns the constant you need? (defsubst tag-prompt () ?>) then: (defun check (char) (eq char (tag-prompt))) a quick look at the byte-compiled code shows that the value of (tag-prompt) is indeed inlined. Cheers, -- Jos=C3=A9 A. Romero L. escherdragon at gmail "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)