From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: About the activation of minor modes Date: Sun, 6 Mar 2022 00:06:55 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15008"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: angelomolina@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 06 04:07:42 2022 Return-path: Envelope-to: geh-help-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 1nQhFG-0003h4-Rz for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Mar 2022 04:07:42 +0100 Original-Received: from localhost ([::1]:58272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQhFF-0007ZB-4N for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Mar 2022 22:07:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQhEl-0007Z0-K7 for help-gnu-emacs@gnu.org; Sat, 05 Mar 2022 22:07:11 -0500 Original-Received: from [2a00:1450:4864:20::22d] (port=46676 helo=mail-lj1-x22d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQhEj-0004jC-Qr for help-gnu-emacs@gnu.org; Sat, 05 Mar 2022 22:07:11 -0500 Original-Received: by mail-lj1-x22d.google.com with SMTP id u7so15905223ljk.13 for ; Sat, 05 Mar 2022 19:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jXFtfLXIlqNqaBWFkCPLAXBxFDsO/eEp3wvjqo49Sbc=; b=irHiE25PZQPpB1gYjp8olHLw2FAbqszQpXbX+wE9gjnt9k1TytOJAB1Wvh+F5s8wKE fPc5jMnS0T90eenCNbn0cBpfp3O3FNJsHUKUiEo1MZwUU/cIzuqk/l2pa1VZ8TKI4Bel xDcYUjYyTexEpd/K295I2HAVx90PYqmwVhT7uamjR76mm2nh8UuwLLYqwAMlWkKGsk6E PTTjLw7fOPkOsW1o/t6fheavsEjO+p9jKw1AoWttPoXk+zg/jSkv8fmMH/DRIdUdSVNX OIUe6ELNcG81JuNlqmtyzdhHJngJ0vYbXDBumgjGqeENsJ3rFpDc51DqBqe/C9TZelMu 0XFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jXFtfLXIlqNqaBWFkCPLAXBxFDsO/eEp3wvjqo49Sbc=; b=w+nevab+fw0l+6vzmFwhLJW7Na3oRvcgDDhpkpxUjRU8maTlIMWO+kx/l2ZxDdManu cMuZapbpAiYNN5/wMPWSTHK+v62AZzrV4T1sQEInmtonVGP12YQYjZa6zB2l3LOnOm+5 fV54AIwGKjvwpjfg68+lSXdVrw2S34dLWQiV5nqmtSZneHE/NWzLp5y64mthMAHItbp9 RdhqBt7Ec1hhN7eNNhJX2QTFmGxmG8PuJKkGTrGbiA8xpk7dPcBZiuAz5n6AwA7LvZ+N mGfO4rKHDngw09KYbkBBu524nqAMYkfsuY4k0OjMEWMcXXKXt49GuTzKnBF1O8V1BoBL oVYQ== X-Gm-Message-State: AOAM530R3LBVl3OjWhWWmjvvWxZT6IOu3oeNCfhxK+e+sZ7RzXnoeKrm mpN1f0g2MudD/hR/bpu4MCLrc62iioPhiCV3SiT2Wkph+20= X-Google-Smtp-Source: ABdhPJx0IipBMUW8p7+riZQqH2q+ioNgG4gOhNi1Yt7MQXf0tdRe4jndrEADjKGlgDIo0IRnojZuOD8rav1+xQ5go00= X-Received: by 2002:a2e:8017:0:b0:246:3fb3:1618 with SMTP id j23-20020a2e8017000000b002463fb31618mr3679030ljg.427.1646536027473; Sat, 05 Mar 2022 19:07:07 -0800 (PST) In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::22d (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=eduardoochs@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136380 Archived-At: On Fri, 4 Mar 2022 at 23:48, angelomolina--- via Users list for the GNU Emacs text editor wrote: > > Can a minor mode activate another minor-mode or functionalities residing in other files ? I ask because I would like my tools to be organised according to some categorisation criteria' rather than all being huddled together. Hi Angelo, I don't know if this idea will help or not, but this is how I would try to find the answer... The function `find-epp' of eev pretty-prints its argument and shows the result in a temporary buffer, and this (find-epp (macroexpand ' (define-minor-mode A-mode "Help for A-mode" :init-value nil :global nil :lighter " A") )) shows exactly what this `define-minor-mode' does. I _guess_ that it should be easy to modify the (define-minor-mode A-mode ...) sexp bit by bit until you get something that turns on and off B-mode when A-mode is turned on and off - and if you use :lighter " B" in your definition of B-mode then you'll be able to check if B mode was turned on and off by just looking at the mode line. Some people like to learn things using this approach and some hate it. For more info on that, see: http://angg.twu.net/find-elisp-intro.html and for more (basic) info on eev, see: http://angg.twu.net/2020-list-packages-eev-nav.html Cheers and happy hacking =), Eduardo Ochs http://angg.twu.net/#eev