From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Defcustoms, how do users find them? Date: Tue, 17 Nov 2009 04:17:03 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1258427866 30601 80.91.229.12 (17 Nov 2009 03:17:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2009 03:17:46 +0000 (UTC) Cc: Emacs-Devel devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 17 04:17:39 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAEZW-0005Ws-8c for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2009 04:17:38 +0100 Original-Received: from localhost ([127.0.0.1]:37632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAEZV-0004RF-8v for ged-emacs-devel@m.gmane.org; Mon, 16 Nov 2009 22:17:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAEZP-0004Qh-Ub for emacs-devel@gnu.org; Mon, 16 Nov 2009 22:17:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAEZL-0004Ow-Qq for emacs-devel@gnu.org; Mon, 16 Nov 2009 22:17:31 -0500 Original-Received: from [199.232.76.173] (port=42117 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAEZL-0004Ot-M0 for emacs-devel@gnu.org; Mon, 16 Nov 2009 22:17:27 -0500 Original-Received: from mail-yw0-f194.google.com ([209.85.211.194]:40084) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAEZL-00029y-EA for emacs-devel@gnu.org; Mon, 16 Nov 2009 22:17:27 -0500 Original-Received: by ywh32 with SMTP id 32so7193933ywh.14 for ; Mon, 16 Nov 2009 19:17:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=+a9UcHLyRboVNFXcFEPEMQ7/xz2fXkgvwtvFJRAZxfM=; b=F5mHk3IESP1HuDrAaoshbdeJy8f0qbK1ek/LLPk0wKwf7+reLU5xzeDyB3A+uvyXL3 rFdP21k17ezQBRSnyyjA12Aa4i2vnDDYJuCg/ytn66RCiL9JW0hCaBrkV6+TmbCH/1fZ 737xG3qpLuaY8FxtCidYY7szp0eQJrW865ZfA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=mXZqLmRlS1StWWWDt4Gc3NfI2u9QxQ+ahAeZJAIsfv8wTf9o3RmEdj/J6axTNvHWR5 nSk3yf4vc+u4Rpwv18XXlV1Ahq+dEERfvRoqUApzCgqNpQUDpH/jEwNW5nMHeuQW08o4 MhfUtFp15w6hQkDHcAhA+5y0gSWH70e5118Wg= Original-Received: by 10.100.246.9 with SMTP id t9mr345008anh.21.1258427843061; Mon, 16 Nov 2009 19:17:23 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117060 Archived-At: On Tue, Nov 17, 2009 at 3:52 AM, Stefan Monnier wrote: >>>> Should all defcustoms be autoloaded? >>> No, please god, no! >> Maybe you have explained why, but I do not know. Why? Is the cost for >> autoloading them to high in some way, or? > > I don't really care to explain, but I hate autoloaded variables and > autoloaded defcustoms even more so. It might be so, but what is the reason not to autload defcustoms in Emacs ... ? ;-) There are around 7000 defcustoms in Emacs. That probably make memory consumption a bit troublesome. But perhaps the doc strings can be stored on file for those, they do not have to go into the dumped Emacs. So I guess that is not your reason to hate autoloaded vars. And the elisp files do not get loaded just because the defcustoms are autoloaded (as long as you have not set them) - or do they? Or is it the size of obarray? In a bare Emacs the number of symbols is around 13 000. In my current Emacs it is around 40 000. Does adding 7 000 (or is it maybe 5000 to add) make a big difference in lookup? Defcustoms can be complex, but does that matter in the case of autoloading? It is only defcustoms that are at their default values that will be in an autoloaded state. I would be a bit surprised if there was strong reasons to autoload vars that are not defcustoms, but defcustoms are a bit different. They are meant to be used and found by the users. I would like to see something like "apropos-options". If it is really annoying to autoload defcustoms then maybe autoloading just defgroups would be a possibility? (Or are they already autoloaded in some way?)