comparison lispref/loading.texi @ 12282:586e3ea81792

updates for version 19.29 made by melissa; also needed to check out files so two-volume formatting could be accomplished.
author Melissa Weisshaus <melissa@gnu.org>
date Fri, 16 Jun 1995 19:17:59 +0000
parents 27144f55d1c6
children 49a48bf414c7
comparison
equal deleted inserted replaced
12281:ba3d2da14bca 12282:586e3ea81792
155 155
156 Here is an example of code you can place in a @file{.emacs} file to add 156 Here is an example of code you can place in a @file{.emacs} file to add
157 several directories to the front of your default @code{load-path}: 157 several directories to the front of your default @code{load-path}:
158 158
159 @smallexample 159 @smallexample
160 @group
160 (setq load-path 161 (setq load-path
161 (append (list nil "/user/bil/emacs" 162 (append (list nil "/user/bil/emacs"
162 "/usr/local/lisplib" 163 "/usr/local/lisplib"
163 (expand-file-name "~/emacs")) 164 (expand-file-name "~/emacs"))
164 load-path)) 165 load-path))
166 @end group
165 @end smallexample 167 @end smallexample
166 168
167 @c Wordy to rid us of an overfull hbox. --rjc 15mar92 169 @c Wordy to rid us of an overfull hbox. --rjc 15mar92
168 @noindent 170 @noindent
169 In this example, the path searches the current working directory first, 171 In this example, the path searches the current working directory first,
249 Specify @var{type} as @code{macro} if @var{function} is really a macro. 251 Specify @var{type} as @code{macro} if @var{function} is really a macro.
250 Specify @var{type} as @code{keymap} if @var{function} is really a 252 Specify @var{type} as @code{keymap} if @var{function} is really a
251 keymap. Various parts of Emacs need to know this information without 253 keymap. Various parts of Emacs need to know this information without
252 loading the real definition. 254 loading the real definition.
253 255
256 An autoloaded keymap loads automatically during key lookup when a prefix
257 key's binding is the symbol @var{function}. Autoloading does not occur
258 for other kinds of access to the keymap. In particular, it does not
259 happen when a Lisp program gets the keymap from the value of a variable
260 and calls @code{define-key}; not even if the variable name is the same
261 symbol @var{function}.
262
254 @cindex function cell in autoload 263 @cindex function cell in autoload
255 If @var{function} already has a non-void function definition that is not 264 If @var{function} already has a non-void function definition that is not
256 an autoload object, @code{autoload} does nothing and returns @code{nil}. 265 an autoload object, @code{autoload} does nothing and returns @code{nil}.
257 If the function cell of @var{function} is void, or is already an autoload 266 If the function cell of @var{function} is void, or is already an autoload
258 object, then it is defined as an autoload object like this: 267 object, then it is defined as an autoload object like this:
262 @end example 271 @end example
263 272
264 For example, 273 For example,
265 274
266 @example 275 @example
276 @group
267 (symbol-function 'run-prolog) 277 (symbol-function 'run-prolog)
268 @result{} (autoload "prolog" 169681 t nil) 278 @result{} (autoload "prolog" 169681 t nil)
279 @end group
269 @end example 280 @end example
270 281
271 @noindent 282 @noindent
272 In this case, @code{"prolog"} is the name of the file to load, 169681 283 In this case, @code{"prolog"} is the name of the file to load, 169681
273 refers to the documentation string in the @file{emacs/etc/DOC} file 284 refers to the documentation string in the @file{emacs/etc/DOC} file