From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Newsgroups: gmane.emacs.help Subject: Re: What are the criteria for making a minor mode ? Date: Thu, 29 Aug 2024 12:50:40 +0200 Message-ID: References: <9rr0Dgg51MtYPbbebhRKrLwUYtK4qqWiZYFTC2bWnrp4MHlaysV_HVIr8k9t-nIy5DtPLuKVYnMHZSt-NSVpwVvcYwt_Bz756abanQFH_aU=@protonmail.com> <4KKNhKWg8C94wTWFdLxM_14VR2gVInyYd5QFkiaVqMHX0_gyWgV2ECG6WFu70P4XXXWGBRZC8HqihbYDswiaEaz9bm-0vGhIiNZ2Y6C25Ek=@protonmail.com> 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="34267"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , help-gnu-emacs@gnu.org To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 29 12:51:25 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 1sjckP-0008hk-5Y for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 29 Aug 2024 12:51:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjcjn-0007Bn-Ob; Thu, 29 Aug 2024 06:50:47 -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 1sjcjl-0007Bd-Hb for help-gnu-emacs@gnu.org; Thu, 29 Aug 2024 06:50:45 -0400 Original-Received: from fout1-smtp.messagingengine.com ([103.168.172.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjcjj-0005zS-Lo for help-gnu-emacs@gnu.org; Thu, 29 Aug 2024 06:50:45 -0400 Original-Received: from phl-compute-02.internal (phl-compute-02.nyi.internal [10.202.2.42]) by mailfout.nyi.internal (Postfix) with ESMTP id BF428138FFEE; Thu, 29 Aug 2024 06:50:42 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Thu, 29 Aug 2024 06:50:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamkovic.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1724928642; x=1725015042; bh=1hqgjQKJvv6Pkkxw49re0597opaqKluL bhGEbE130Ik=; b=cpEb+J5UV0huUujp4IAvp77GN01lEARhVcp2/Z+vnAIbOdiw 0H0yqKO2fLJdxM5GlFzJtNmJ8EhWsK0hiBehmgQcRBjr9KUDXhXbM0M5FLhg+lu4 LVYMjIOkzcM7q4Cg5WwZNRjXzerAibkxTHCCe8SBeHdTwgcdKAhwwOIdUAHYDh/S tk0889TlDIumpn7WAEfg3eklddooY5HdaNk64/G9ZpPh+1V1BLDrUK+L0FPY3flz pdodMaBemheGbII4sP9oQG9Md7DywyuzAUs/dHHMXTf/otDUIvP3aZz/hqzXUBME uth7vC1jq7SjiSGEFVkIo2dY/q6WTAzwtZw65w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1724928642; x= 1725015042; bh=1hqgjQKJvv6Pkkxw49re0597opaqKluLbhGEbE130Ik=; b=S IDt2DZrc6N3WxcDPS8slfeRlMZKetMQuQI5Q2thvA2idhLZDwe6xbiQ3RLhiUjaD TJZw2JjStC94IgOcD+vIK6mhA5i17VE1DlS2qXy3wCRG1fr6jSL1ZqRIXHOS9xz8 2DDVfdyyX9WGUpSjD6JlC0XO7g9w5KepW0Xyh2H2gx56Nmy2v6wMih4l9wLDE1Ri pATAEcmtjAEmJsrTmgJXrfnKumx51vDQP0QYNXkI62EXggpdqupsN0tf1Ky9crBu IyncNLoBgbB5lm5xwfoWNArYNdaG5iCs0ao8sHIKUPv+AunhFfDik0kuEGjUDy6O Z7NKlepZIaeeSc+mspWfA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudefgedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkgggtgfesthhqredttddtjeen ucfhrhhomheptfhuugholhhfucetuggrmhhkohhvihgtuceorhhuugholhhfsegruggrmh hkohhvihgtrdhorhhgqeenucggtffrrghtthgvrhhnpeeiueetheffudfghfeggeevheev vddtkefflefhueeludfgtefgffeltdfhudejgeenucffohhmrghinheprggurghmkhhovh hitgdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehruhguohhlfhesrggurghmkhhovhhitgdrohhrghdpnhgspghrtghpthhtohepfe dpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohephhgvlhhpqdhgnhhuqdgvmhgrtghs sehgnhhurdhorhhgpdhrtghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvg grlhdrtggrpdhrtghpthhtohephhgvihhmvggsohhrghhirgesphhrohhtohhnmhgrihhl rdgtohhm X-ME-Proxy: Feedback-ID: i88214938:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Aug 2024 06:50:41 -0400 (EDT) In-Reply-To: Received-SPF: pass client-ip=103.168.172.144; envelope-from=rudolf@adamkovic.org; helo=fout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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:147850 Archived-At: Heime writes: > Stefan has pointed out to me that just loading a file should not be made= =20 > to alter Emacs's behavior in any significant way. That is correct. If you need to do more, such as create a window or create a file, you should encapsulate that within a function. That function can also be a command that enables a mode, of course. Rudy --=20 "'Obvious' is all too often a synonym for 'wrong'." --- Jeff Erickson, Algorithms, 2019 Rudolf Adamkovi=C4=8D [he/him] http://adamkovic.org