help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to install packages


From: Tassilo Horn
Subject: Re: How to install packages
Date: Tue, 04 Jul 2006 14:03:30 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

news <"r.t.wilson(news)"@rmplc.co.uk> writes:

Hi!

> I am now trying to install the help+ package - which I have got as a
> file called help+.el and I've put it in the same directory as the
> mode-compile file, and then put this in my .emacs:
>
> (autoload 'help+ "help+"
>   "Command to give better help" t)
>
> but it isn't working.

The problem is, that `help+' is no function name.

,----[ C-h f autoload RET ]
| autoload is a built-in function in `C source code'.
| (autoload FUNCTION FILE &optional DOCSTRING INTERACTIVE TYPE)
| 
| Define FUNCTION to autoload from FILE.
| FUNCTION is a symbol; FILE is a file name string to pass to `load'.
| Third arg DOCSTRING is documentation for the function.
| Fourth arg INTERACTIVE if non-nil says function can be called
| interactively.
| Fifth arg TYPE indicates the type of the object:
|    nil or omitted says FUNCTION is a function,
|    `keymap' says FUNCTION is really a keymap, and
|    `macro' or t says FUNCTION is really a macro.
| Third through fifth args give info about the real definition.
| They default to nil.
| If FUNCTION is already defined other than as an autoload,
| this does nothing and returns nil.
`----

Instead of autoload, you have to use `require' here:

  (require 'help+)

For more infos on autoload have a look at the info page:

,----[ (info "(elisp)Autoload") ]
|    The "autoload" facility allows you to make a function or macro
| known in Lisp, but put off loading the file that defines it.  The
| first call to the function automatically reads the proper file to
| install the real definition and other associated code, then runs the
| real definition as if it had been loaded all along.
`----

HTH,
Tassilo
-- 
A child of five could understand this! Fetch me a child of five!


reply via email to

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