From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Loading when viewing docstring of autoloaded function Date: Sat, 23 Jun 2012 10:12:54 -0400 Message-ID: References: <87395mgy6t.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340460791 25552 80.91.229.3 (23 Jun 2012 14:13:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 23 Jun 2012 14:13:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 23 16:13:11 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SiR5E-0008Cu-Ti for ged-emacs-devel@m.gmane.org; Sat, 23 Jun 2012 16:13:05 +0200 Original-Received: from localhost ([::1]:35566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiR5E-00021y-Me for ged-emacs-devel@m.gmane.org; Sat, 23 Jun 2012 10:13:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiR5C-00021c-5M for emacs-devel@gnu.org; Sat, 23 Jun 2012 10:13:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiR5A-0003uI-33 for emacs-devel@gnu.org; Sat, 23 Jun 2012 10:13:01 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:57979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiR57-0003tl-NL; Sat, 23 Jun 2012 10:12:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FxLSN/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191979969" Original-Received: from 69-196-180-141.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.141]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2012 10:12:55 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id CF1784E24E; Sat, 23 Jun 2012 10:12:54 -0400 (EDT) In-Reply-To: <87395mgy6t.fsf@gnu.org> (Chong Yidong's message of "Sat, 23 Jun 2012 17:44:10 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151111 Archived-At: > The most annoying aspect is that autoloaded functions often have > docstrings containing key substitution constructs, which are expanded > into `M-x FOO' because the relevant keymaps are not yet defined. I'd > like to suggest a simple workaround: if an autoloaded function contains > key substitution constructs, just outright load the library where it was > defined. There's not much point in being conservative about loading > libraries, since it is so fast nowadays. See attached patch. I don't mind auto-loading eagerly, but I do care about seeing "autoloaded" on the first line of the description of the function, because I often use C-h f RET to figure out whether that function is autoloaded or is already fully defined. Stefan