From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#64391: buffer narrowing slowdown regression in emacs 29 Date: Sat, 08 Jul 2023 22:21:20 +0000 Message-ID: <239e2a5aa14d33c1b087@heytings.org> References: <87r0psb51z.fsf@ust.hk> <0AD15A09-F669-48C0-AF5C-971D52F5BF8E@gmail.com> <83v8f3q1ff.fsf@gnu.org> <50A46AAC-2089-45CB-A355-CCB2B4EA8D76@gmail.com> <5995c9ed6a0b39c3070c@heytings.org> <83a5wak1tr.fsf@gnu.org> <26cee506f708f3c6cfe1@heytings.org> <26cee506f70bbc9de58b@heytings.org> <83h6qghpdc.fsf@gnu.org> <26cee506f77e9c87e325@heytings.org> <06A8380F-08A6-464E-9946-02F8498031EC@gmail.com> <239e2a5aa11924a2f1d3@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acohen@ust.hk, 64391@debbugs.gnu.org, mattias.engdegard@gmail.com, eliz@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 09 00:22:27 2023 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 1qIGJv-0005ck-4r for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Jul 2023 00:22:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIGJY-0000KF-HA; Sat, 08 Jul 2023 18:22:04 -0400 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 1qIGJX-0000Iy-1i for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 18:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIGJW-00018z-QG for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 18:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qIGJW-0000XP-HW; Sat, 08 Jul 2023 18:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sat, 08 Jul 2023 22:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64391 X-GNU-PR-Package: emacs,gnus X-Debbugs-Original-Cc: acohen@ust.hk, 64391@debbugs.gnu.org, mattias.engdegard@gmail.com, eliz@gnu.org, bugs@gnus.org Original-Received: via spool by 64391-submit@debbugs.gnu.org id=B64391.16888548841984 (code B ref 64391); Sat, 08 Jul 2023 22:22:02 +0000 Original-Received: (at 64391) by debbugs.gnu.org; 8 Jul 2023 22:21:24 +0000 Original-Received: from localhost ([127.0.0.1]:45313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIGIu-0000Vv-C5 for submit@debbugs.gnu.org; Sat, 08 Jul 2023 18:21:24 -0400 Original-Received: from heytings.org ([95.142.160.155]:46618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIGIs-0000Vk-GW for 64391@debbugs.gnu.org; Sat, 08 Jul 2023 18:21:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1688854881; bh=u0qo2yh5mcFkTJKij/3f8C5ED3LYEtDox+mxIHcn9R4=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=30wazxy/ENRvOOME7T+8L3dXt2wMXRnFnQ/4UssXV9+WoX7bBl4OI8e7bSI8BPs6h SZ/GnDZbuqBmTTAXfr7JAjSj5JdyjneGjcn2AyW3MlvBxKyFhhYywhcQC19/93PYBx gfpDbnRPUca1X0ofqfaCRAU0453qQBNsal1dWifq0aicPLJvQH7EjsGenW1x8O2cBw rainI3kQeUPucpNDr7XEOBD8N96dUKzXzvYg7bPz3NO5n3NcHIFvOHRTECkpV3hof0 VaPd1Lsn22IfsJwP0IhTYEkTrWSY14+EhPS3MK1qWm2SqY9VRdWxOwAvAoO2+CDSxP 83RCbuLRl0l+w== In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264801 Archived-At: >> I thought that "special form" and "macro" were more or less synonyms. >> The manual describes lambda, prog2, setq-default, dlet, letrec, >> named-let, with-suppressed-warnings, with-no-warnings, with-restriction >> and without-restriction as "special forms", although they are in fact >> macros. > > You're right: from a programmer's stand point the distinction doesn't > really matter. It matters only from the point of view of the language > implementer. For some reason it tripped me, here (I went looking at the > code fearing that we were using an actual special form). > > Sorry 'bout that, move along, nothing to see :-) > Well, there's at least something that could be fixed in the manuals. I admit I had never read the "Special Forms" section, and if the manual had been consistent about the special form vs. macro distiction, perhaps I wouldn't have confused these two similar, but subtly different, notions. >> The latter: it's like catch/throw, it's intended to use with a symbol >> but it could be any non-nil value. So one could write something >> similar to what is found in the docstring of catch: "LABEL is evalled >> to get the label to use, it must not be nil". > > +1 from me, > Eli, I guess that minor documentation fix is okay for emacs-29? diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index e74a165b9ed..af5e648eb9d 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -1169,9 +1169,9 @@ Narrowing @cindex labeled narrowing @cindex labeled restriction -When the optional argument @var{label}, a symbol, is present, the -narrowing is @dfn{labeled}. A labeled narrowing differs from a -non-labeled one in several ways: +When the optional argument @var{label}, which may be any Lisp object +except @code{nil}, is present, the narrowing is @dfn{labeled}. A +labeled narrowing differs from a non-labeled one in several ways: @itemize @bullet @item diff --git a/lisp/subr.el b/lisp/subr.el index 0b397b7bebf..b73d0e5d989 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3964,11 +3964,11 @@ with-restriction The current restrictions, if any, are restored upon return. -When the optional :label LABEL argument is present, in which -LABEL is a symbol, inside BODY, `narrow-to-region' and `widen' -can be used only within the START and END limits. To gain access -to other portions of the buffer, use `without-restriction' with the -same LABEL argument. +When the optional :label LABEL argument, which is evalled to get +the label to use and must not be nil, is present, inside BODY, +`narrow-to-region' and `widen' can be used only within the START +and END limits. To gain access to other portions of the buffer, +use `without-restriction' with the same LABEL argument. \(fn START END [:label LABEL] BODY)" (declare (indent 2) (debug t))