From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: master b72f885: Make dlet work like let, not let* Date: Mon, 20 Sep 2021 19:56:33 +0300 Message-ID: References: <83wnp5m9i5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9166"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.7+183 (3d24855) (2021-05-28) Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 20 19:04:23 2021 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 1mSMiM-00027C-F1 for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Sep 2021 19:04:22 +0200 Original-Received: from localhost ([::1]:47042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSMiL-0005Am-7Q for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Sep 2021 13:04:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSMff-00031x-Mj for emacs-devel@gnu.org; Mon, 20 Sep 2021 13:01:35 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:49379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSMfd-00010A-5S; Mon, 20 Sep 2021 13:01:34 -0400 Original-Received: from localhost ([::ffff:41.210.154.92]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000075FA9.000000006148BE49.00005B7F; Mon, 20 Sep 2021 10:00:57 -0700 Mail-Followup-To: Eli Zaretskii , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <83wnp5m9i5.fsf@gnu.org> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:275153 Archived-At: * Eli Zaretskii [2021-08-01 19:11]: > > branch: master > > commit b72f88518b89560accf740a4548368863e6238e0 > > Author: Mattias Engdegård > > Commit: Mattias Engdegård > > > > Make dlet work like let, not let* > > > > Change `dlet` so that it has binding semantics like `let` because that > > is what a user would expect and it allows a corresponding `dlet*` to > > be added later should the need arise. Fortunately the change has no > > effect where it is currently used. I am user and I do not expect it to work as `let' because `dlet' is supposed to make temporarily global variables. Now it doesn't work: (dlet ((wrs::variables (make-hash-table :test 'equal)) (wrs::_ (puthash "areas_name" "Hyperscope" wrs::variables))) ) error: let: Symbol’s value as variable is void: wrs::variables That is IMHO wrong, as it is supposed to bind variables dynamically: ,---- | -- Special Form: dlet (bindings...) forms... | This special form is like ‘let’, but it binds all variables | dynamically. This is rarely useful—you usually want to bind normal | variables lexically, and special variables (i.e., variables that | are defined with ‘defvar’) dynamically, and this is what ‘let’ | does. `---- My understanding is that `wrs::variables' should be available in the second line but it is not. This broke my code and I am kindly requesting to think about it and revert it back so that it does work. This is full code below, and it is broken since this change, kindly reconsider it as to the meaning of `dlet' as described in the Elisp manual as `dlet' should bind variables dynamically thus make them also available to all subsequent lines. (if template (progn (dlet ((wrs::variables (make-hash-table :test 'equal)) (wrs::_ (puthash "areas_name" "Hyperscope" wrs::variables)) (wrs::title title) (wrs::keywords (string-join (split-string (hlink-tags id)) ", ")) (wrs::description description) (wrs::_ (puthash "pages_content" (rcd-markdown text) wrs::variables)) (wrs::template (rcd-db-get-entry "templates" "templates_content" template hs-db)) (wrs::html (rcd-template-eval wrs::template '("⟦" "⟧") wrs::variables))) wrs::html)) (rcd-mkd2html text title author date)))))) Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/