From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Setting global variables (was: About zcomplete) Date: Tue, 22 Feb 2022 00:14:29 -0500 Message-ID: References: <20220220040515.zum3iodtpscj23j3.ref@Ergus> <20220220040515.zum3iodtpscj23j3@Ergus> <87wnhp4wu3.fsf@posteo.net> <20220220132708.lvuzvg2fyfpp6k76@Ergus> <87y224v767.fsf@posteo.net> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19619"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, emacs-devel@gnu.org, spacibba@aol.com, juri@linkov.net To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 22 06:15:42 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 1nMNWX-0004vl-EV for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Feb 2022 06:15:41 +0100 Original-Received: from localhost ([::1]:49400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMNWW-0002nH-BJ for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Feb 2022 00:15:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMNVP-00024R-C3 for emacs-devel@gnu.org; Tue, 22 Feb 2022 00:14:31 -0500 Original-Received: from [2001:470:142:3::e] (port=42380 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMNVO-00011G-P0; Tue, 22 Feb 2022 00:14:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=VO6NGCXTfmtwIAQh9ELZuzg+qoCTksKjHXA94bmnE4U=; b=QhkFvXb9gqE3 /UAKAnDcPG3eWnl+ktNz0J3cFHGkRRsWe9eZPjcMoD8E9l+vqc21UWEbERfYjfKWXWN9tV0o4EDsD QQpszJJDWjAZSyM+41YOX2QyFeAQKZicwCSWLQ3zQEndpCFsgHWJ945RMg12BKz7B/y4ZFR2JvX0c SWS0yt+Bxt1PO+K0/whBu/fiK1obTMKj8l3r3njHWsoNXagXoucf5MgzZxib/9iEE0SZxvi+WYcuh bF+CJ8KRkEEAr5buaFpNvYDKJqoxSfIixhmh+KHbH6IakuxnSlXNCMQr1A//QNvlEmHadKDO6bOy3 jKOCorAQ4Br5Oqm1OgudNQ==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1nMNVN-0008Oz-PY; Tue, 22 Feb 2022 00:14:30 -0500 In-Reply-To: (message from Stefan Monnier on Mon, 21 Feb 2022 10:35:43 -0500) 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:286580 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > FWIW, I've been toying with the idea of adding a kind of "advice" > mechanism for variables. > 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? Or a Lisp-level facility that would achieve similar results? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)