emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggestion: Let the help command load autoloaded functions etc


From: Lennart Borgman (gmail)
Subject: Re: Suggestion: Let the help command load autoloaded functions etc
Date: Fri, 21 Dec 2007 18:35:43 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Jason Rumney wrote:
Lennart Borgman (gmail) wrote:
Jason Rumney wrote:
What benefit do you suppose would be gained from doing this?
A few things:

- Argument list
- Correct doc string
- Links in doc string


I don't see what you mean by the first two. When I use C-h f 5x5, for
example (without having loaded 5x5 previously), I see the arg list, and
the documentation is correct. Under what circumstances do you get
incorrect documentation and no arg list?

Not sure, but it looks to me like it will be correct if you use

  ;;;###autoload

before the function. However if you do something like

  (autoload '5x1 "5x1" "Play 5x1" t)

you will just get what is on this line.

I believe many people are writing autoload's the second way. Maybe something like this in autoload.el could be helpful:

  (defun generate-library-autoloads (library)
    "Insert at point autoloads for Emacs library LIBRARY.
  Works like `generate-file-autoloads', but for a library."
    (interactive
     (list (completing-read "Generate autoloads for library: "
                            'locate-file-completion
                            (cons load-path (get-load-suffixes)))))
    (let ((file (locate-library library)))
      (generate-file-autoloads file)))

But that does not cure the third problem, that links in autoloaded functions doc strings often does not work because they point to other things in the same yet not loaded library where the function is defined.

I still believe me suggestion for a better [Args not available ...] string is useful. It could be expanded to the ;;;###autoload cookie case, maybe by adding something at the end of the description.




reply via email to

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