From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Setting global variables Date: Tue, 22 Feb 2022 08:04:03 -0500 Message-ID: References: <20220220040515.zum3iodtpscj23j3.ref@Ergus> <20220220040515.zum3iodtpscj23j3@Ergus> <87wnhp4wu3.fsf@posteo.net> <20220220132708.lvuzvg2fyfpp6k76@Ergus> <87y224v767.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10257"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: philipk@posteo.net, spacibba@aol.com, juri@linkov.net, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 22 14:12:08 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 1nMUxc-0002Rq-2n for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Feb 2022 14:12:08 +0100 Original-Received: from localhost ([::1]:48470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMUxa-00033a-LS for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Feb 2022 08:12:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMUpw-0008SO-6I for emacs-devel@gnu.org; Tue, 22 Feb 2022 08:04:16 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMUps-0002D7-AA; Tue, 22 Feb 2022 08:04:10 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 12BD21001CB; Tue, 22 Feb 2022 08:04:06 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A14D4100124; Tue, 22 Feb 2022 08:04:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1645535044; bh=oYkWB2qh/FZAu9KqyfHPdmx2g+q0Bgm9nzRI1QQPrtw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iuT+hUlFynn5FYNY1hOTeX0VL03dpE4NY5mR5VCUl7LkMAyFgMKqB8tU2Lrn6TxBr qfGjfQrEjlynR0mtSPEoBbmYFQR/5MOCQ6Z+ccP8GaO0Td7qUSrM49roLx9jcIbLVr VlWftC+0yn44x1DA7rxyBR6QpaOLNlD8G8s/kpokIdOmWMZspCS7KK8dNMvpVcZ1gR 48TNbZWnRZfAlMkkS1JDFD9IXlx2IJHc94job28QaMDnDaHWCCYzxVGJXEFTtU9y7s XNDvXOB6svlTWSzdIc3rdeAJx6INIDD4adkpk9a4L6XPIqPqGUhdEAiReheHK5NI7c fYx5g5dgJ9N1w== Original-Received: from pastel (unknown [45.72.197.68]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5EEEB120B98; Tue, 22 Feb 2022 08:04:04 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Tue, 22 Feb 2022 00:14:29 -0500") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:286592 Archived-At: > > Basically associate with every variable a base value and a list of > > functions that modify it. Then minor modes can add a function to the > > list (which would implicitly update the var's effective value) when > > enabled and then remove it afterwards. > I'm not sure what that last sentence means. Are you proposing a > low-level mechanism that would take specified actions whenever the > variable gets set? No, because at that level we lack the needed information (basically, the *intention* behind the new value). > Or a Lisp-level facility that would achieve similar results? Yes, that. The idea is very much like advice-add/remove but for variables instead of functions. Stefan