diff options
| author | Richard M. Stallman | 1996-02-08 06:36:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-02-08 06:36:57 +0000 |
| commit | 2a664e7313642fc0917b98ecd8a1d43a65932707 (patch) | |
| tree | d9800e5c1c8ecc41da01041c7727ccb91d7e14ac | |
| parent | 81c63241a9c19a38831cf4221b713af1696330f3 (diff) | |
| download | emacs-2a664e7313642fc0917b98ecd8a1d43a65932707.tar.gz emacs-2a664e7313642fc0917b98ecd8a1d43a65932707.zip | |
Clarify site-load.el vs site-init.el and how to deal with doc strings.
| -rw-r--r-- | lispref/internals.texi | 51 |
1 files changed, 37 insertions, 14 deletions
diff --git a/lispref/internals.texi b/lispref/internals.texi index c1b17f62b4a..76ba1043308 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi | |||
| @@ -64,26 +64,49 @@ extra time is not too severe a problem. | |||
| 64 | 64 | ||
| 65 | @cindex @file{site-load.el} | 65 | @cindex @file{site-load.el} |
| 66 | You can specify additional files to preload by writing a library named | 66 | You can specify additional files to preload by writing a library named |
| 67 | @file{site-load.el} that loads them. You may need to increase the | 67 | @file{site-load.el} that loads them. You may need to increase the value |
| 68 | value of @code{PURESIZE}, in @file{src/puresize.h}, to make room for the | 68 | of @code{PURESIZE}, in @file{src/puresize.h}, to make room for the |
| 69 | additional files. (Try adding increments of 20000 until it is big | 69 | additional data. (Try adding increments of 20000 until it is big |
| 70 | enough.) However, the advantage of preloading additional files | 70 | enough.) However, the advantage of preloading additional files |
| 71 | decreases as machines get faster. On modern machines, it is usually not | 71 | decreases as machines get faster. On modern machines, it is usually not |
| 72 | advisable. | 72 | advisable. |
| 73 | 73 | ||
| 74 | After @file{loadup.el} reads @file{site-load.el}, it finds the | ||
| 75 | documentation strings for primitive and preloaded functions (and | ||
| 76 | variables) in the file @file{etc/DOC} where they are stored, by calling | ||
| 77 | @code{Snarf-documentation} (@pxref{Accessing Documentation}). | ||
| 78 | |||
| 74 | @cindex @file{site-init.el} | 79 | @cindex @file{site-init.el} |
| 75 | You can specify other Lisp expressions to execute just before dumping | 80 | You can specify other Lisp expressions to execute just before dumping |
| 76 | by putting them in a library named @file{site-init.el}. However, if | 81 | by putting them in a library named @file{site-init.el}. This file is |
| 77 | they might alter the behavior that users expect from an ordinary | 82 | executed after the documentation strings are found. |
| 78 | unmodified Emacs, it is better to put them in @file{default.el}, so that | 83 | |
| 79 | users can override them if they wish. @xref{Start-up Summary}. | 84 | If you want to preload function or variable definitions, there are |
| 80 | 85 | three ways you can do this and make their documentation strings | |
| 81 | Before @file{loadup.el} dumps the new executable, it finds the | 86 | accessible when you subsequently run Emacs: |
| 82 | documentation strings for primitive and preloaded functions (and | 87 | |
| 83 | variables) in the file where they are stored, by calling | 88 | @itemize @bullet |
| 84 | @code{Snarf-documentation} (@pxref{Accessing Documentation}). These | 89 | @item |
| 85 | strings were moved out of the @file{emacs} executable to make it | 90 | Arrange to scan these files when producing the @file{etc/DOC} file, |
| 86 | smaller. @xref{Documentation Basics}. | 91 | and load them with @file{site-load.el}. |
| 92 | |||
| 93 | @item | ||
| 94 | Load the files with @file{site-init.el}, then copy the files into the | ||
| 95 | installation directory for Lisp files when you install Emacs. | ||
| 96 | |||
| 97 | @item | ||
| 98 | Specify a non-@code{nil} value for | ||
| 99 | @code{byte-compile-dynamic-docstrings} as a local variable in each these | ||
| 100 | files, and load them with either @file{site-load.el} or | ||
| 101 | @file{site-init.el}. (This method has the drawback that the | ||
| 102 | documentation strings take up space in Emacs all the time.) | ||
| 103 | @end itemize | ||
| 104 | |||
| 105 | It is not advisable to put anything in @file{site-load.el} or | ||
| 106 | @file{site-init.el} that would alter any of the features that users | ||
| 107 | expect in an ordinary unmodified Emacs. If you feel you must override | ||
| 108 | normal features for your site, do it with @file{default.el}, so that | ||
| 109 | users can override your changes if they wish. @xref{Start-up Summary}. | ||
| 87 | 110 | ||
| 88 | @defun dump-emacs to-file from-file | 111 | @defun dump-emacs to-file from-file |
| 89 | @cindex unexec | 112 | @cindex unexec |