From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57263: 29.0.50; Obsolete documentation of `cl-symbol-macrolet' Date: Thu, 18 Aug 2022 10:08:10 -0400 Message-ID: References: <83pmgyassv.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12527"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57263@debbugs.gnu.org, Wing Hei Chan To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 18 16:09:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oOgCy-00033R-Ac for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Aug 2022 16:09:16 +0200 Original-Received: from localhost ([::1]:38936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOgCw-00079S-RW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Aug 2022 10:09:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOgCl-00079I-Hb for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 10:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOgCk-0006ik-4z for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 10:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOgCj-0007xk-WD for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 10:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Aug 2022 14:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57263 X-GNU-PR-Package: emacs Original-Received: via spool by 57263-submit@debbugs.gnu.org id=B57263.166083170830558 (code B ref 57263); Thu, 18 Aug 2022 14:09:01 +0000 Original-Received: (at 57263) by debbugs.gnu.org; 18 Aug 2022 14:08:28 +0000 Original-Received: from localhost ([127.0.0.1]:56380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgCB-0007wn-Tp for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:08:28 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgC7-0007wX-07 for 57263@debbugs.gnu.org; Thu, 18 Aug 2022 10:08:26 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5C9E080712; Thu, 18 Aug 2022 10:08:17 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2823E8044E; Thu, 18 Aug 2022 10:08:15 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660831695; bh=cptBvRH6lHctGZyff+7HP4CySXUk+whP2kWzvw/v9Ds=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HEiNZH/E5BIroSg/mQHJtVL5KbTGHfXjZYhbJpgVK2RhXcf2SyDW8URqSJg7cCAoG khJ0rEPlhHMiogBcyNkPKCzLs/HJk3ELPDgiaLXwYLf9RZQ0/XZdJgxS4VJryiKKJk QKBl/5Cg8UXTOk9CoyRCqMHvEKiRl0zLXzhoULxW98pNXMoLN7k4YO38Kwq5No3kID V6x2/sX04xpHLVLF+L8jzi33J1wZH6ybtoMeRIGdp+RpWDs9KmUEAvJ2a/1kAtv2Ar mJgLiiVlu9uyphccsTk10gsB2AIQJ2MAqzSF2u7pmEMn94SqFBaZV+v+TSEVgMlyAy 7TNRgqA4sUJhw== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D15461202A8; Thu, 18 Aug 2022 10:08:14 -0400 (EDT) In-Reply-To: <83pmgyassv.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Aug 2022 10:56:32 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240159 Archived-At: > Stefan, could you please fix the documentation, or suggest how it > should be fixed? Does the patch below seem readable to you? Stefan diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 07c19e37ce4..a7548bb1f8a 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -1381,19 +1381,10 @@ Macro Bindings A @code{setq} of a symbol macro is treated the same as a @code{setf}. I.e., @code{(setq foo 4)} in the above would be equivalent to -@code{(setf foo 4)}, which in turn expands to @code{(setf (car bar) 4)}. - -Likewise, a @code{let} or @code{let*} binding a symbol macro is -treated like a @code{cl-letf} or @code{cl-letf*}. This differs from true -Common Lisp, where the rules of lexical scoping cause a @code{let} -binding to shadow a @code{symbol-macrolet} binding. In this package, -such shadowing does not occur, even when @code{lexical-binding} is -@c See https://debbugs.gnu.org/12119 -@code{t}. (This behavior predates the addition of lexical binding to -Emacs Lisp, and may change in future to respect @code{lexical-binding}.) -At present in this package, only @code{lexical-let} and -@code{lexical-let*} will shadow a symbol macro. @xref{Obsolete -Lexical Binding}. +@code{(setf foo 4)}, which in turn expands to @code{(setf (car bar) +4)}. A @code{let} (or @code{let*}, @code{lambda}, ...) binding of +the same symbol will locally shadow the symbol macro as is the case in +Common Lisp. There is no analogue of @code{defmacro} for symbol macros; all symbol macros are local. A typical use of @code{cl-symbol-macrolet} is in the