Mercurial > emacs
comparison doc/lispref/functions.texi @ 86826:9b003519e0dd
(Declaring Functions): Add findex. Mention `external' files.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 29 Nov 2007 04:41:17 +0000 |
parents | 598f0ef502b4 |
children | 62955c80c79b |
comparison
equal
deleted
inserted
replaced
86825:d7f423869e23 | 86826:9b003519e0dd |
---|---|
1225 | 1225 |
1226 @node Declaring Functions | 1226 @node Declaring Functions |
1227 @section Telling the Compiler that a Function is Defined | 1227 @section Telling the Compiler that a Function is Defined |
1228 @cindex function declaration | 1228 @cindex function declaration |
1229 @cindex declaring functions | 1229 @cindex declaring functions |
1230 @findex declare-function | |
1230 | 1231 |
1231 Byte-compiling a file often produces warnings about functions that the | 1232 Byte-compiling a file often produces warnings about functions that the |
1232 compiler doesn't know about (@pxref{Compiler Errors}). Sometimes this | 1233 compiler doesn't know about (@pxref{Compiler Errors}). Sometimes this |
1233 indicates a real problem, but usually the functions in question are | 1234 indicates a real problem, but usually the functions in question are |
1234 defined in other files which would be loaded if that code is run. For | 1235 defined in other files which would be loaded if that code is run. For |
1286 a file name ending in @samp{.c}. @code{check-declare-file} looks for | 1287 a file name ending in @samp{.c}. @code{check-declare-file} looks for |
1287 these files in the C source code directory. This is useful only when | 1288 these files in the C source code directory. This is useful only when |
1288 you call a function that is defined only on certain systems. Most | 1289 you call a function that is defined only on certain systems. Most |
1289 of the primitive functions of Emacs are always defined so they will | 1290 of the primitive functions of Emacs are always defined so they will |
1290 never give you a warning. | 1291 never give you a warning. |
1292 | |
1293 Sometimes a file will optionally use functions from an external package. | |
1294 If you prefix the filename in the @code{declare-function} statement with | |
1295 @samp{ext:}, then it will be checked if it is found, otherwise skipped | |
1296 without error. | |
1291 | 1297 |
1292 @node Function Safety | 1298 @node Function Safety |
1293 @section Determining whether a Function is Safe to Call | 1299 @section Determining whether a Function is Safe to Call |
1294 @cindex function safety | 1300 @cindex function safety |
1295 @cindex safety of functions | 1301 @cindex safety of functions |