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: master 760910f: Add a new buffer-local variable `minor-modes' Date: Sun, 14 Feb 2021 13:17:17 -0500 Message-ID: References: <20210214113754.21891.10736@vcs0.savannah.gnu.org> <20210214113756.93760209D4@vcs0.savannah.gnu.org> <874kieejwe.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="7594"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 14 19:58:42 2021 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 1lBMbR-0001rK-Vv for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Feb 2021 19:58:41 +0100 Original-Received: from localhost ([::1]:37702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBMbQ-0002un-9J for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Feb 2021 13:58:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBLxU-0001uX-GC for emacs-devel@gnu.org; Sun, 14 Feb 2021 13:17:24 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBLxR-0006LL-VD for emacs-devel@gnu.org; Sun, 14 Feb 2021 13:17:23 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 89432100250; Sun, 14 Feb 2021 13:17:20 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2BDB71000F4; Sun, 14 Feb 2021 13:17:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1613326639; bh=7VBESRK5GYzHwYUczLBsIiu6gbgEbHH9zW/xuHiZkU4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iq6cx7hWO93DfWmyQubZjky+rX7ChtH1J2YileI+rUKNTcSaa+1gOf2ofa1SUD61Y mXCHkR2+fGsCixTJljwCGq7J0BM6umXwu5SqJwGUMTK/4ByqAMx4UniVeui36BuHkN VgHAbQxUkl8X5NTV1ehr+dzfs4u/mLTY/6yJTX3ye6MsnFX69oO5Rw0y6wCZyTlnLl +QDqDzXgVZjUlF2WkUPpq9mxOyExgV0k+LGbI6TJzc/FKi8wP2/cD+wnxasUPHtKVk xynYB5vXp7l84HKllJ81H7UFUCdSBNVfrgRrBlCvxcXDFbicqyyFHVshiHJ3P3PW2X VabNw3zC7EGMg== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7B9C0120246; Sun, 14 Feb 2021 13:17:18 -0500 (EST) In-Reply-To: <874kieejwe.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 14 Feb 2021 16:41:53 +0100") 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:264756 Archived-At: > But how do we know which ones are enabled? As far as I know, there's no > way to know (reliably) -- the :variable that shows whether the mode is > on or not isn't preserved anywhere. I can't look at it just now, but I remember this problem and have the vague recollection that I've made some progress on it, but if it's not sufficient yet, we can and should just fix it. > Even if we had a function like that, looping over all possible minor > modes and calling predicates for them sounds hopelessly slow when you > have to do this for thousands of symbols... You could do it eagerly just once before calling all the predicate functions for all the commands, so that'd be cheap. Stefan