[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading when viewing docstring of autoloaded function

From: Štěpán Němec
Subject: Re: Loading when viewing docstring of autoloaded function
Date: Sat, 23 Jun 2012 22:22:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

On Sat, 23 Jun 2012 17:44:10 +0800
Chong Yidong wrote:

> It's a long-standing problem that documentation viewed with C-h * might
> not make much sense if it refers to stuff defined in a library that has
> not yet been loaded.
> 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.
> Alternatively, we could introduce a full-blown solution by adding a new
> docstring substitution construct to invoke library loading, but I'm not
> sure we need that.
> Opinions?

Other than the fact that this is not a solution but workaround, I don't
like the idea. Loading may be fast, but the loaded libraries use memory
and change the environment, which seems too much to pay for a docstring
or seeing a proper key binding (which you might never want to actually
use) to me.

So if you do this, please at least do provide an option to turn it off.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]