From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Current mode command discovery Date: Fri, 19 Feb 2021 13:23:10 +0100 Message-ID: <878s7kutzl.fsf@gnus.org> References: <87v9aubm96.fsf@gnus.org> <87czwzfn9p.fsf@telefonica.net> <87eehfnd83.fsf@gnus.org> <1fb773f6-1480-53ce-08ae-1f7d0ba23428@yandex.ru> <87k0r637k4.fsf@gnus.org> <80e8c434-888d-23c5-13f0-c513bbf13ee4@yandex.ru> <8735xtznrh.fsf@gnus.org> <70fd2374-23ea-1c03-a4e4-97a370a41acf@yandex.ru> <87h7m9wjvl.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="18023"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: =?utf-8?Q?=C3=93scar?= Fuentes , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 19 13:24:33 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 1lD4pl-0004ZY-3g for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Feb 2021 13:24:33 +0100 Original-Received: from localhost ([::1]:50510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lD4pj-00044d-VQ for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Feb 2021 07:24:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lD4oY-0002q4-Oj for emacs-devel@gnu.org; Fri, 19 Feb 2021 07:23:18 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:48648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lD4oW-00016S-Qr for emacs-devel@gnu.org; Fri, 19 Feb 2021 07:23:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z6WLq4eNH51mdn91BCPSlaXXyp9Kh8GTg0NvoG31IEg=; b=YJYVPfenZEU3eN/HK9X8jPhTLt DDgw0zHyAsGp+kCLm3WiV7XjLnVmOoO3zxAtSD//ek34HWIlUwNKJ6ArBNIt7GkS6wmTBHAXczXA3 6VnFwQu32wGnwdsVLvCE8nqxJXCm6Esxc7H9JN4juCTh1FzgC8T6cIJ0g1MAzzon0QKo=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD4oS-0001tE-0q; Fri, 19 Feb 2021 13:23:14 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVgGSeyTzTtni/s qkX80Vn///8TRdHCAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UCEws6Emh0y1AAAAG9SURBVDjLlZPb ecMgDIUhXcDCGaAIBiiIBWy8/0w9EthO0qfqAX/Wz9EFhHPvRpxCJKLFef3cVlYJBeuPewjXmI/T Sqoka1VQmZkuUtZaAMIEHE4gJKIxALgBXMF2KhE5SMEh9ZbAHWMxkPaj3xLsDjWU+uN8lkPTrFPS dOkb+sjp0PR0pu/QEDnnOe/8mn6jSgZoJQX8vEAx4LDyaytbuIGR+KnwJ2hX8gFUEs7sPd8KlVxg z0eXD0BaFmfrfoBZV9DerbYPQABl8Vi3J9UPgGsOraPlV0VcO+v9J47uHaACWjyFvL0D1rEBIJZF qrtbt+kZu9qx3yD6qXcLkez3kVgKML/4wAZmpAhC5OHAePR9+A3QqtW6xT3aBewMfd5Jw7rnISfg MQ17BHGuNZF+na3OT2SrCn4pBswfU4t4FbAnBAaGgHCz/A3/2jHVCpivIemL1iRN0g3GvOGsWj+Q I2o7QyA6OTk2Mf8FkBoAo2X78W9An4e0Oenw1wnwpSRj3MT2s1b1qIKTHf4uCfvrVFT4mwIxS8ly ark6GDJN31YaobxwOt0W3mrBWX6dL0z3Q2GhIs2L+mOL+7/9Akkpkqnkksl9AAAAJXRFWHRkYXRl OmNyZWF0ZQAyMDIxLTAyLTE5VDExOjU4OjE3KzAwOjAwHskrCwAAACV0RVh0ZGF0ZTptb2RpZnkA MjAyMS0wMi0xOVQxMTo1ODoxNyswMDowMG+Uk7cAAAAASUVORK5CYII= X-Now-Playing: Kate Bush's _The Kick Inside_: "Wuthering Heights" In-Reply-To: (Dmitry Gutov's message of "Thu, 18 Feb 2021 19:15:10 +0200") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org 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, RCVD_IN_DNSWL_NONE=-0.0001, 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:265226 Archived-At: Dmitry Gutov writes: >> But I haven't measured. >> The disadvantage in using a `put' for this data is mainly in that it >> makes .elc files larger (and therefore slower to load). > > The difference will probably be higher in autoload files (which will > require separate 'put' forms to be added, right?). If we're using `put' -- yup. Stashing the modes in the interactive spec in autoload files (which Emacs 28 currently does) is quite efficient. However, this may be a smaller issue than you'd think. Most things that are tagged as ;;;###autoload won't be mode-specific: They are autoloadable exactly because they can be called from anywhere in Emacs. The exception here is larger packages (like Gnus) that spread commands over a number of files. Then it's common to ;;;###autoload commands even if they aren't global commands. This is arguable the wrong way to use ;;;###autoload -- instead, say, gnus-sum.el should declare these functions instead. Currently, with the filter predicate, "emacs -Q" `M-x gnusTAB' will diplay ~50 completions. Without the predicate, you get ~65 completions. So mode-tagging autoloaded commands is going to be a thing, but it's not a huge thing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no