From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Using the content of a dynamic variable in a macro Date: Sun, 26 Feb 2023 22:24:30 -0500 Message-ID: References: <87o7pi9m9s.fsf@cassou.me> <83fsaukruu.fsf@gnu.org> <87lekm9j2v.fsf@cassou.me> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31906"; mail-complaints-to="usenet@ciao.gmane.io" Cc: damien@cassou.me, eliz@gnu.org, emacs-devel@gnu.org To: Lynn Winebarger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 27 04:25:19 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pWU8c-00081i-VT for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Feb 2023 04:25:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWU7u-0007w6-Ej; Sun, 26 Feb 2023 22:24:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWU7s-0007vd-2n for emacs-devel@gnu.org; Sun, 26 Feb 2023 22:24:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWU7q-0000IT-Sl; Sun, 26 Feb 2023 22:24:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=yJiMGqnguiaKBvd8rwieQyOwyO+SiNC8W/NVhSwHsrQ=; b=W29Zm0LIQahx ubLUe6Tona/OfOSScmod8i1tLSRO8MTgTZLA14xhe1AXGwB9kOiIQLEo00uCMiUwvURAgWlZxMmyr dCBBFSOctbU636d3Xj9bP7zvQEbgQtQqobjsMz0iEW336p3D8rovtuUjJxnNRdml2qqeUJ3Fi/A+s 5IpNy+9QYNJG4lGm+EuANjw8A5cJqKK4N1d6lEHwyOeHO1P/vOjsMYed7OsO8HLKlB0AkZLrJP1ak wZ+JxXo5Jqj7ZIW7achg5Ew7gvjuSXphq6d6jtn3ZwONZ8TNJ6kuwWbqtdI+o+H5WFylhGeuotWVy xkSUNpuAM+q2Z2Zo+JSF8A==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1pWU7q-0002bW-JN; Sun, 26 Feb 2023 22:24:30 -0500 In-Reply-To: (message from Lynn Winebarger on Sat, 25 Feb 2023 07:32:00 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303826 Archived-At: > Lexical binding isn't the issue - the variable is global in scope. > The issue is that when you explicitly run the byte-compiler in batch mode, > the "defvar" expression is only compiled, not evaluated, while the defmacro > is evaluated, and the application of the macro function is evaluated during > compilation. Should we change this to evaluate defvar in batch mode? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)