From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: master 48aacbf292 2/2: Make many seldom-used generalized variables obsolete Date: Mon, 19 Sep 2022 14:35:01 +0200 Message-ID: <871qs7leyy.fsf@gmail.com> References: <166111278304.2846.13033924580993120733@vcs2.savannah.gnu.org> <20220821201303.AD1E6C0088A@vcs2.savannah.gnu.org> <877d29hm53.fsf@melete.silentflame.com> <87bkrcqnxc.fsf@bernoul.li> <878rmf29ak.fsf@gnus.org> <87o7vblm3g.fsf@bernoul.li> <875yhjlhki.fsf@gmail.com> <87czbrv9im.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16907"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Jonas Bernoulli , Sean Whitton , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 19 14:45:41 2022 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 1oaG9b-0004CK-W0 for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Sep 2022 14:45:40 +0200 Original-Received: from localhost ([::1]:52910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaG9a-00078E-Rn for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Sep 2022 08:45:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaFzQ-00072b-0D for emacs-devel@gnu.org; Mon, 19 Sep 2022 08:35:08 -0400 Original-Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:43630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaFzN-0006QJ-EX for emacs-devel@gnu.org; Mon, 19 Sep 2022 08:35:07 -0400 Original-Received: by mail-ej1-x629.google.com with SMTP id lh5so22341727ejb.10 for ; Mon, 19 Sep 2022 05:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date; bh=fPPcmQ1IrWfwECzRJ7coDTtTNW/vgE0fCnAiT+iXJ2Y=; b=LKth7H/+WD4GaZfMaEnFpIfe9FY7rzSeHZCiU1qJL4CmaVOmDNrLScThW8Eky2GtxI ZghYXlPvVzfYLKffyDdR75HXVO0edqFV/Y/y/R1W3WdLq6yrgzufFItmyG4bP7+Rt+xD rVHdspUw7itimVEers6Yxv3omWZ8nDYXwvZRigIacWH5TzfNMX9nPT9GtOi1AlPj6GoU C/IHFhiuZHvfKil7LiXQ8Uu3L4yKiMHcdPFTDoK0jocFT14hGvLXTs2F7zUj56WqkCmC mcCX0YXIvS2g8lDpH5M4ze5vXoT8z3FcLR8czC46vl/tMzPwKlcPEL50+yGiXyCwREB3 mJ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date; bh=fPPcmQ1IrWfwECzRJ7coDTtTNW/vgE0fCnAiT+iXJ2Y=; b=o7SbaMdWGEz++QNB4LgVj5zh2EuN0APfgeaPzC9wu6iypalugxWm++xXt4LNwaPytL piGHJrXxjHXUt8EaLuSa3DX9HasB0hgGwvYoSysgAbvLp23i5wflARnKYSpxElOHmxrk DFF6QazY8r8nXzFEhtijKRpbfZC/MadssN6c9M5jFrnXtdlARDlrtO6vV4tT95YmpBp6 ph+r3TAnp/lo0bFtClThjPT5FAo471lIWUeSgxm/F3Om5yjDjKTCaG7BcFQMa6zfVRFN 2E9pWa5x8iQqApD50sD330JizoQ1bxMHzs99YThTcxn1oGTJzM5yoxxlRJbk0V7zPBAF gsTQ== X-Gm-Message-State: ACrzQf0n50pQGkNKLWPKEOgScCipQ5gXfUwt1D7sCxsMCAze4wTbkIim v2HCEdRgJdDZdLMdjL+eR42h1GQ3sLf4RQ== X-Google-Smtp-Source: AMsMyM6RAtXv8Izza+y5Ox7XpPIo7vFXZ7DwqxaqoNwnigrxSqpVTrr+OseyNm0SoLbaYFnp4nMVPw== X-Received: by 2002:a17:907:9812:b0:77c:8496:2969 with SMTP id ji18-20020a170907981200b0077c84962969mr11968588ejc.424.1663590902886; Mon, 19 Sep 2022 05:35:02 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::8510]) by smtp.gmail.com with ESMTPSA id er7-20020a056402448700b004528db1e834sm12527954edb.57.2022.09.19.05.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 05:35:02 -0700 (PDT) In-Reply-To: <87czbrv9im.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 19 Sep 2022 14:22:41 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.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" Xref: news.gmane.io gmane.emacs.devel:295684 Archived-At: On Mon, 19 Sep 2022 at 14:22, Lars Ingebrigtsen wrote: > Augusto Stoffel writes: > >> Is it possible at all to set a variable buffer-locally but outside any >> let-bindings? > > That's what `setq-local' does (but you have to switch to the buffer > first). set-local just relies on set, so if the variable is let-bound, then the "toplevel" local value is unchanged: (progn (setq-local x 1) (let (x) (setq-local x 2)) x) ==> 1 I've had some trouble with this when a major mode (and therefore its mode hook) is called from a place with let-bound variables. But then one could argue that working around it is even more problematic...