diff options
| author | Glenn Morris | 2012-03-02 21:45:21 -0500 |
|---|---|---|
| committer | Glenn Morris | 2012-03-02 21:45:21 -0500 |
| commit | 520f242512e505cf14017259ee1dc15c53e3933e (patch) | |
| tree | f6277b22fc1f9ce2d899c6d695d3401864d83eb4 | |
| parent | b3134b95a55a3ce656d19ca74d3ddcc6a1e9f958 (diff) | |
| download | emacs-520f242512e505cf14017259ee1dc15c53e3933e.tar.gz emacs-520f242512e505cf14017259ee1dc15c53e3933e.zip | |
Some lispref/internals.texi updates
* doc/lispref/internals.texi: Change @appendix section commands to @section
(both forms are equivalent; just being consistent with the rest of lispref).
(Building Emacs): Say less about CANNOT_DUMP platforms.
Replace deleted eval-at-startup with custom-initialize-delay.
* etc/NEWS: Mention eval-at-startup.
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 70 | ||||
| -rw-r--r-- | etc/NEWS | 5 |
3 files changed, 49 insertions, 30 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index bfd49e82d83..1cf91340b9e 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2012-03-03 Glenn Morris <rgm@gnu.org> | 1 | 2012-03-03 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * internals.texi: Change @appendix section commands to @section. | ||
| 4 | (Building Emacs): Say less about CANNOT_DUMP platforms. | ||
| 5 | Replace deleted eval-at-startup with custom-initialize-delay. | ||
| 6 | |||
| 3 | * tips.texi: Copyedits. | 7 | * tips.texi: Copyedits. |
| 4 | (Coding Conventions): Mention autoloads. | 8 | (Coding Conventions): Mention autoloads. |
| 5 | Combine partially duplicated macro items. Fix xref. | 9 | Combine partially duplicated macro items. Fix xref. |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 66357516c41..696b2d998c0 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -21,7 +21,7 @@ internal aspects of GNU Emacs that may be of interest to C programmers. | |||
| 21 | @end menu | 21 | @end menu |
| 22 | 22 | ||
| 23 | @node Building Emacs | 23 | @node Building Emacs |
| 24 | @appendixsec Building Emacs | 24 | @section Building Emacs |
| 25 | @cindex building Emacs | 25 | @cindex building Emacs |
| 26 | @pindex temacs | 26 | @pindex temacs |
| 27 | 27 | ||
| @@ -44,7 +44,7 @@ environment, resulting in an Emacs that is still impure but no longer | |||
| 44 | bare. | 44 | bare. |
| 45 | 45 | ||
| 46 | @cindex dumping Emacs | 46 | @cindex dumping Emacs |
| 47 | It takes a substantial time to load the standard Lisp files. Luckily, | 47 | It takes some time to load the standard Lisp files. Luckily, |
| 48 | you don't have to do this each time you run Emacs; @file{temacs} can | 48 | you don't have to do this each time you run Emacs; @file{temacs} can |
| 49 | dump out an executable program called @file{emacs} that has these files | 49 | dump out an executable program called @file{emacs} that has these files |
| 50 | preloaded. @file{emacs} starts more quickly because it does not need to | 50 | preloaded. @file{emacs} starts more quickly because it does not need to |
| @@ -61,23 +61,22 @@ The argument @samp{dump} tells @file{loadup.el} to dump a new executable | |||
| 61 | named @file{emacs}. The variable @code{preloaded-file-list} stores a | 61 | named @file{emacs}. The variable @code{preloaded-file-list} stores a |
| 62 | list of the Lisp files that were dumped with the @file{emacs} executable. | 62 | list of the Lisp files that were dumped with the @file{emacs} executable. |
| 63 | 63 | ||
| 64 | Some operating systems don't support dumping. On those systems, you | 64 | If you port Emacs to a new operating system, and are not able to |
| 65 | must start Emacs with the @samp{temacs -l loadup} command each time you | 65 | implement dumping, then Emacs must load @file{loadup.el} each time it |
| 66 | use it. This takes a substantial time, but since you need to start | 66 | starts. |
| 67 | Emacs once a day at most---or once a week if you never log out---the | ||
| 68 | extra time is not too severe a problem. | ||
| 69 | 67 | ||
| 70 | @cindex @file{site-load.el} | 68 | @cindex @file{site-load.el} |
| 71 | |||
| 72 | You can specify additional files to preload by writing a library named | 69 | You can specify additional files to preload by writing a library named |
| 73 | @file{site-load.el} that loads them. You may need to add a definition | 70 | @file{site-load.el} that loads them. You may need to rebuild Emacs |
| 71 | with an added definition | ||
| 74 | 72 | ||
| 75 | @example | 73 | @example |
| 76 | #define SITELOAD_PURESIZE_EXTRA @var{n} | 74 | #define SITELOAD_PURESIZE_EXTRA @var{n} |
| 77 | @end example | 75 | @end example |
| 78 | 76 | ||
| 79 | @noindent | 77 | @noindent |
| 80 | to make @var{n} added bytes of pure space to hold the additional files. | 78 | to make @var{n} added bytes of pure space to hold the additional files; |
| 79 | see @file{src/puresize.h}. | ||
| 81 | (Try adding increments of 20000 until it is big enough.) However, the | 80 | (Try adding increments of 20000 until it is big enough.) However, the |
| 82 | advantage of preloading additional files decreases as machines get | 81 | advantage of preloading additional files decreases as machines get |
| 83 | faster. On modern machines, it is usually not advisable. | 82 | faster. On modern machines, it is usually not advisable. |
| @@ -107,6 +106,7 @@ and load them with @file{site-load.el}. | |||
| 107 | Load the files with @file{site-init.el}, then copy the files into the | 106 | Load the files with @file{site-init.el}, then copy the files into the |
| 108 | installation directory for Lisp files when you install Emacs. | 107 | installation directory for Lisp files when you install Emacs. |
| 109 | 108 | ||
| 109 | @c FIXME the default is non-nil; I don't think this makes sense. | ||
| 110 | @item | 110 | @item |
| 111 | Specify a non-@code{nil} value for | 111 | Specify a non-@code{nil} value for |
| 112 | @code{byte-compile-dynamic-docstrings} as a local variable in each of these | 112 | @code{byte-compile-dynamic-docstrings} as a local variable in each of these |
| @@ -121,17 +121,27 @@ expect in an ordinary unmodified Emacs. If you feel you must override | |||
| 121 | normal features for your site, do it with @file{default.el}, so that | 121 | normal features for your site, do it with @file{default.el}, so that |
| 122 | users can override your changes if they wish. @xref{Startup Summary}. | 122 | users can override your changes if they wish. @xref{Startup Summary}. |
| 123 | 123 | ||
| 124 | In a package that can be preloaded, it is sometimes useful to | 124 | In a package that can be preloaded, it is sometimes necessary (or |
| 125 | specify a computation to be done when Emacs subsequently starts up. | 125 | useful) to delay certain evaluations until Emacs subsequently starts |
| 126 | For this, use @code{eval-at-startup}: | 126 | up. The vast majority of such cases relate to the values of |
| 127 | customizable variables. For example, @code{tutorial-directory} is a | ||
| 128 | variable defined in @file{startup.el}, which is preloaded. The default | ||
| 129 | value is set based on @code{data-directory}. The variable needs to | ||
| 130 | access the value of @code{data-directory} when Emacs starts, not when | ||
| 131 | it is dumped, because the Emacs executable has probably been installed | ||
| 132 | in a different location since it was dumped. | ||
| 133 | |||
| 134 | @defun custom-initialize-delay symbol value | ||
| 135 | This function delays the initialization of @var{symbol} to the next | ||
| 136 | Emacs start. You normally use this function by specifying it as the | ||
| 137 | @code{:initialize} property of a customizable variable. (The argument | ||
| 138 | @var{value} is unused, and is provided only for compatiblity with the | ||
| 139 | form Custom expects.) | ||
| 140 | @end defun | ||
| 127 | 141 | ||
| 128 | @defmac eval-at-startup body@dots{} | 142 | In the unlikely event that you need a more general functionality than |
| 129 | This evaluates the @var{body} forms, either immediately if running in | 143 | @code{custom-initialize-delay} provides, you can use |
| 130 | an Emacs that has already started up, or later when Emacs does start | 144 | @code{before-init-hook} (@pxref{Startup Summary}). |
| 131 | up. Since the value of the @var{body} forms is not necessarily | ||
| 132 | available when the @code{eval-at-startup} form is run, that form | ||
| 133 | always returns @code{nil}. | ||
| 134 | @end defmac | ||
| 135 | 145 | ||
| 136 | @defun dump-emacs to-file from-file | 146 | @defun dump-emacs to-file from-file |
| 137 | @cindex unexec | 147 | @cindex unexec |
| @@ -144,7 +154,7 @@ you must run Emacs with @samp{-batch}. | |||
| 144 | @end defun | 154 | @end defun |
| 145 | 155 | ||
| 146 | @node Pure Storage | 156 | @node Pure Storage |
| 147 | @appendixsec Pure Storage | 157 | @section Pure Storage |
| 148 | @cindex pure storage | 158 | @cindex pure storage |
| 149 | 159 | ||
| 150 | Emacs Lisp uses two kinds of storage for user-created Lisp objects: | 160 | Emacs Lisp uses two kinds of storage for user-created Lisp objects: |
| @@ -205,7 +215,7 @@ You should not change this flag in a running Emacs. | |||
| 205 | @end defvar | 215 | @end defvar |
| 206 | 216 | ||
| 207 | @node Garbage Collection | 217 | @node Garbage Collection |
| 208 | @appendixsec Garbage Collection | 218 | @section Garbage Collection |
| 209 | @cindex garbage collection | 219 | @cindex garbage collection |
| 210 | 220 | ||
| 211 | @cindex memory allocation | 221 | @cindex memory allocation |
| @@ -494,7 +504,7 @@ Emacs session. | |||
| 494 | @end defvar | 504 | @end defvar |
| 495 | 505 | ||
| 496 | @node Writing Emacs Primitives | 506 | @node Writing Emacs Primitives |
| 497 | @appendixsec Writing Emacs Primitives | 507 | @section Writing Emacs Primitives |
| 498 | @cindex primitive function internals | 508 | @cindex primitive function internals |
| 499 | @cindex writing Emacs primitives | 509 | @cindex writing Emacs primitives |
| 500 | 510 | ||
| @@ -512,7 +522,7 @@ appearance.) | |||
| 512 | @group | 522 | @group |
| 513 | DEFUN ("or", For, Sor, 0, UNEVALLED, 0, | 523 | DEFUN ("or", For, Sor, 0, UNEVALLED, 0, |
| 514 | doc: /* Eval args until one of them yields non-nil, then return that | 524 | doc: /* Eval args until one of them yields non-nil, then return that |
| 515 | value. The remaining args are not evalled at all. | 525 | value. The remaining args are not evalled at all. |
| 516 | If all args return nil, return nil. | 526 | If all args return nil, return nil. |
| 517 | @end group | 527 | @end group |
| 518 | @group | 528 | @group |
| @@ -811,7 +821,7 @@ in @file{byte-opt.el} which binds @code{side-effect-free-fns} and | |||
| 811 | knows about it. | 821 | knows about it. |
| 812 | 822 | ||
| 813 | @node Object Internals | 823 | @node Object Internals |
| 814 | @appendixsec Object Internals | 824 | @section Object Internals |
| 815 | @cindex object internals | 825 | @cindex object internals |
| 816 | 826 | ||
| 817 | GNU Emacs Lisp manipulates many different types of data. The actual | 827 | GNU Emacs Lisp manipulates many different types of data. The actual |
| @@ -838,7 +848,7 @@ explicitly using a suitable predicate (@pxref{Type Predicates}). | |||
| 838 | @end menu | 848 | @end menu |
| 839 | 849 | ||
| 840 | @node Buffer Internals | 850 | @node Buffer Internals |
| 841 | @appendixsubsec Buffer Internals | 851 | @subsection Buffer Internals |
| 842 | @cindex internals, of buffer | 852 | @cindex internals, of buffer |
| 843 | @cindex buffer internals | 853 | @cindex buffer internals |
| 844 | 854 | ||
| @@ -1101,7 +1111,7 @@ if that window no longer displays this buffer. | |||
| 1101 | @end table | 1111 | @end table |
| 1102 | 1112 | ||
| 1103 | @node Window Internals | 1113 | @node Window Internals |
| 1104 | @appendixsubsec Window Internals | 1114 | @subsection Window Internals |
| 1105 | @cindex internals, of window | 1115 | @cindex internals, of window |
| 1106 | @cindex window internals | 1116 | @cindex window internals |
| 1107 | 1117 | ||
| @@ -1134,8 +1144,8 @@ vertically. | |||
| 1134 | @item next | 1144 | @item next |
| 1135 | @itemx prev | 1145 | @itemx prev |
| 1136 | The next sibling and previous sibling of this window. @code{next} is | 1146 | The next sibling and previous sibling of this window. @code{next} is |
| 1137 | @code{nil} if the window is the rightmost or bottommost in its group; | 1147 | @code{nil} if the window is the right-most or bottom-most in its group; |
| 1138 | @code{prev} is @code{nil} if it is the leftmost or topmost in its | 1148 | @code{prev} is @code{nil} if it is the left-most or top-most in its |
| 1139 | group. | 1149 | group. |
| 1140 | 1150 | ||
| 1141 | @item left_col | 1151 | @item left_col |
| @@ -1296,7 +1306,7 @@ A glyph matrix describing the desired display of this window. | |||
| 1296 | @end table | 1306 | @end table |
| 1297 | 1307 | ||
| 1298 | @node Process Internals | 1308 | @node Process Internals |
| 1299 | @appendixsubsec Process Internals | 1309 | @subsection Process Internals |
| 1300 | @cindex internals, of process | 1310 | @cindex internals, of process |
| 1301 | @cindex process internals | 1311 | @cindex process internals |
| 1302 | 1312 | ||
| @@ -1057,6 +1057,11 @@ you have nothing to do in this regard. Code not following the | |||
| 1057 | appropriate conventions may fail to compile. The most common cause of | 1057 | appropriate conventions may fail to compile. The most common cause of |
| 1058 | trouble seems to be an old-style backquote followed by a newline. | 1058 | trouble seems to be an old-style backquote followed by a newline. |
| 1059 | 1059 | ||
| 1060 | +++ | ||
| 1061 | ** The macro `eval-at-startup' was removed in Emacs 23.2, but this | ||
| 1062 | was not advertised at the time. The function `custom-initialize-delay' | ||
| 1063 | replaced all known uses. | ||
| 1064 | |||
| 1060 | --- | 1065 | --- |
| 1061 | ** view-buffer now treats special mode-class in the same way that | 1066 | ** view-buffer now treats special mode-class in the same way that |
| 1062 | view-file has since Emacs 22 (ie, it won't enable View mode if the | 1067 | view-file has since Emacs 22 (ie, it won't enable View mode if the |