From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mbork@mbork.pl Newsgroups: gmane.emacs.help Subject: Re: include clause in interactive command Date: Mon, 02 Dec 2024 08:50:56 +0100 Message-ID: <878qsyed5r.fsf@mbork.pl> References: <7zmmIocUfe2mvq1pwg2UbEEviligcunflNe_dNFVyWq_xQEccwl6YLeOEZglqTXDEDe7pwOVMHDXeo_JLqx8mXYbzCJvCRViOuA23fFOA2Y=@protonmail.com> <7e1162435f2226ee105fa78c36e0d23f@fuzy.me> 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="36147"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Zhengyi Fu , Heime To: Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 08:53:00 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 1tI1Eq-0009FD-1l for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 08:53:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI1EG-000487-7n; Mon, 02 Dec 2024 02:52:24 -0500 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 1tI1EC-00047w-D9 for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 02:52:20 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI1E5-0006Vr-VO for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 02:52:16 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 0CCCD11B4B43; Mon, 2 Dec 2024 08:51:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 40DMvqRla61t; Mon, 2 Dec 2024 08:51:03 +0100 (CET) Original-Received: from localhost (apn-31-0-52-27.dynamic.gprs.plus.pl [31.0.52.27]) by mail.mojserwer.eu (Postfix) with ESMTPSA id AF62411B79BE; Mon, 2 Dec 2024 08:51:01 +0100 (CET) In-Reply-To: (Heime via Users list for the's message of "Sun, 01 Dec 2024 12:00:16 +0000") Received-SPF: pass client-ip=195.110.48.8; envelope-from=mbork@mbork.pl; helo=mail.mojserwer.eu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:148487 Archived-At: On 2024-12-01, at 12:00, Heime via Users list for the GNU Emacs text editor= wrote: > Sent with Proton Mail secure email. > > On Sunday, December 1st, 2024 at 4:42 PM, Zhengyi Fu wrote: > >> On 2024-11-30 19:38, Heime via Users list for the GNU Emacs text editor >> wrote: >>=20 >> > I have an interactive function that changes some buffer settings. >> > But it also has an include clause (include 'orellana). >> >=20 >> > Would one usually recommend calling it only once, or calling it >> > everytime a user uses the function is ok? >>=20 >>=20 >> What is an =E2=80=9Cinclude clause=E2=80=9D? > > A mistake. I am referring to require. Per the manual: --8<---------------cut here---------------start------------->8--- This function checks whether FEATURE is present in the current Emacs session (using =E2=80=98(featurep FEATURE)=E2=80=99; see below). The argument FEATURE must be a symbol. --8<---------------cut here---------------end--------------->8--- (https://www.gnu.org/software/emacs/manual/html_node/elisp/Named-Features.h= tml) So, there should be very little penalty to calling `require' in your command (especially that it is coded in C, not Elisp). OTOH, it might be not necessary. If what you need from the required library has the `autoload' cookie (https://www.gnu.org/software/emacs/manual/html_node/elisp/Autoload.html), the library will be loaded automatically the first time you use the autoloaded function. Hth, --=20 Marcin Borkowski https://mbork.pl https://crimsonelevendelightpetrichor.net/