From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Disabling minor mode after setting imenu-generic-expression Date: Wed, 28 Aug 2024 09:09:22 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35132"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 28 11:10:05 2024 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 1sjEgn-0008wp-QD for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Aug 2024 11:10:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjEgH-0008G7-5K; Wed, 28 Aug 2024 05:09:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjEgF-00089R-5j for help-gnu-emacs@gnu.org; Wed, 28 Aug 2024 05:09:31 -0400 Original-Received: from mail-40132.protonmail.ch ([185.70.40.132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjEgC-0005XN-W1 for help-gnu-emacs@gnu.org; Wed, 28 Aug 2024 05:09:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1724836166; x=1725095366; bh=xpUWoY4DPxY+lNUXw2VwH4jZg6wjZbqkEU2tV3REwoc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=RoltmcfYw2wo1ofAFNePtmJs2tu0WQaqhyMhouGIbuJEoDyUZcXszz4PLqPqmGcQ8 64AfnQdZ1iEuNYFQvLJpi1LG4WbnU1lvjbUyG8PVWohRq9vjzJEdqeJkoWqgR4vywJ xKT5IWN83zZX/MP8REQSm+dIc0en9iPPOJ+ZIu2XiAg6i1NKvdNxBDqFfh4xwXn9Pa 36qkXwLxoYtqUcM+430VbGMeyx8wltiSjTIgXd1bjhrVBUy0Dtds99XBe7EXK0Wnoq MBzcfv6j6DpOMYVYD1WRMTaoB68TWn+fbTH95AGbTef+8CMuiB2z5oJQpUjpqSQYlw l7iah7obVsDdw== In-Reply-To: Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 769bf388f84ce808dc502b965a1cc0d6f55984ab Received-SPF: pass client-ip=185.70.40.132; envelope-from=heimeborgia@protonmail.com; helo=mail-40132.protonmail.ch 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147834 Archived-At: On Wednesday, August 28th, 2024 at 5:15 PM, Yuri Khan wrote: > On Wed, 28 Aug 2024 at 02:01, Heime heimeborgia@protonmail.com wrote: >=20 > > Have set 'imenu-generic-expression' for a buffer when it is in 'emacs-l= isp-mode' > > using '(eq major-mode'. But how do I revert back to the initial sate af= ter disabling > > the minor mode ? What should 'tema-disable-function' do exactly ? >=20 >=20 > You have been asking this question every day for the last week (I > might be exaggerating a bit) and got no answers. This should cue you > to the idea that the functionality you seek is not well suited to be a > minor mode. I already have a minor-mode and I want to add this functionality to it. There should be nothing bad about doing this. The imenu-generic-expression is customarily set by the major-mode, but I wa= nt to change it, and then revert back when the mode is disabled.=20 =20 > You have also not explained why you want different imenu settings at > different times.=20 I want to have matching regexp types in a buffer that I want to match besides the standard "(defun" thing, but which would not always be needed. = =20 > So your question is an instance of XY problem =E2=80=94 you have a need t= hat=20 > you are not telling us, you have a feeling that it might be solved in=20 > a particular way, and you=E2=80=99re asking about that way. I do not see it the way you describe.