comparison man/internals/internals.texi @ 1333:1b0339b048ce

[xemacs-hg @ 2003-03-02 09:38:37 by ben] To: xemacs-patches@xemacs.org PROBLEMS: Include nt/PROBLEMS and update. Add note about incremental linking badness. cmdloop.el, custom.el, dumped-lisp.el, files.el, keydefs.el, keymap.el, lisp-mode.el, make-docfile.el, replace.el, simple.el, subr.el, view-less.el, wid-edit.el: Lots of syncing with FSF 21.2. Use if-fboundp in wid-edit.el. New file newcomment.el from FSF. internals/internals.texi: Fix typo. (Build-Time Dependencies): New node. PROBLEMS: Delete. config.inc.samp, xemacs.mak: Eliminate HAVE_VC6, use SUPPORT_EDIT_AND_CONTINUE in its place. No incremental linking unless SUPPORT_EDIT_AND_CONTINUE, since it can cause nasty crashes in pdump. Put warnings about this in config.inc.samp. Report the full compile flags used for src and lib-src in the Installation output. alloc.c, lisp.h, ralloc.c, regex.c: Use ALLOCA() in regex.c to avoid excessive stack allocation. Also fix subtle problem with REL_ALLOC() -- any call to malloc() (direct or indirect) may relocate rel-alloced data, causing buffer text to shift. After any such call, regex must update all its pointers to such data. Add a system, when ERROR_CHECK_MALLOC, whereby regex.c indicates all the places it is prepared to handle malloc()/realloc()/free(), and any calls anywhere in XEmacs outside of this will trigger an abort. alloc.c, dialog-msw.c, eval.c, event-stream.c, general-slots.h, insdel.c, lisp.h, menubar-msw.c, menubar-x.c: Change *run_hook*_trapping_problems to take a warning class, not a string. Factor out code to issue warnings, add flag to call_trapping_problems() to postpone warning issue, and make *run_hook*_trapping_problems issue their own warnings tailored to the hook, postponed in the case of safe_run_hook_trapping_problems() so that the appropriate message can be issued about resetting to nil only when not `quit'. Make record_unwind_protect_restoring_int() non-static. dumper.c: Issue notes about incremental linking problems under Windows. fileio.c: Mule-ize encrypt/decrypt-string code. text.h: Spacing changes.
author ben
date Sun, 02 Mar 2003 09:38:54 +0000
parents bada4b0bce3a
children e7b471ce22c1
comparison
equal deleted inserted replaced
1332:6aa23bb3da6b 1333:1b0339b048ce
111 @menu 111 @menu
112 * A History of Emacs:: Times, dates, important events. 112 * A History of Emacs:: Times, dates, important events.
113 * XEmacs From the Outside:: A broad conceptual overview. 113 * XEmacs From the Outside:: A broad conceptual overview.
114 * The Lisp Language:: An overview. 114 * The Lisp Language:: An overview.
115 * XEmacs From the Perspective of Building:: 115 * XEmacs From the Perspective of Building::
116 * Build-Time Dependencies::
116 * XEmacs From the Inside:: 117 * XEmacs From the Inside::
117 * The XEmacs Object System (Abstractly Speaking):: 118 * The XEmacs Object System (Abstractly Speaking)::
118 * How Lisp Objects Are Represented in C:: 119 * How Lisp Objects Are Represented in C::
119 * Major Textual Changes:: 120 * Major Textual Changes::
120 * Rules When Writing New C Code:: 121 * Rules When Writing New C Code::
1129 The word @dfn{application} in the previous paragraph was used 1130 The word @dfn{application} in the previous paragraph was used
1130 intentionally. XEmacs implements an API for programs written in Lisp 1131 intentionally. XEmacs implements an API for programs written in Lisp
1131 that makes it a full-fledged application platform, very much like an OS 1132 that makes it a full-fledged application platform, very much like an OS
1132 inside the real OS. 1133 inside the real OS.
1133 1134
1134 @node XEmacs From the Perspective of Building, XEmacs From the Inside, The Lisp Language, Top 1135 @node XEmacs From the Perspective of Building, Build-Time Dependencies, The Lisp Language, Top
1135 @chapter XEmacs From the Perspective of Building 1136 @chapter XEmacs From the Perspective of Building
1136 @cindex XEmacs from the perspective of building 1137 @cindex XEmacs from the perspective of building
1137 @cindex building, XEmacs from the perspective of 1138 @cindex building, XEmacs from the perspective of
1138 1139
1139 The heart of XEmacs is the Lisp environment, which is written in C. 1140 The heart of XEmacs is the Lisp environment, which is written in C.
1238 Although @file{temacs} is not intended to be run as an editor, it can, 1239 Although @file{temacs} is not intended to be run as an editor, it can,
1239 by using the incantation @code{temacs -batch -l loadup.el run-temacs}. 1240 by using the incantation @code{temacs -batch -l loadup.el run-temacs}.
1240 This is useful when the dumping procedure described above is broken, or 1241 This is useful when the dumping procedure described above is broken, or
1241 when using certain program debugging tools such as Purify. These tools 1242 when using certain program debugging tools such as Purify. These tools
1242 get mighty confused by the tricks played by the XEmacs build process, 1243 get mighty confused by the tricks played by the XEmacs build process,
1243 such as allocation memory in one process, and freeing it in the next. 1244 such as allocating memory in one process, and freeing it in the next.
1244 1245
1245 @node XEmacs From the Inside, The XEmacs Object System (Abstractly Speaking), XEmacs From the Perspective of Building, Top 1246 @node Build-Time Dependencies, XEmacs From the Inside, XEmacs From the Perspective of Building, Top
1247 @chapter Build-Time Dependencies
1248 @cindex build-time dependencies
1249 @cindex dependencies, build-time
1250
1251 This is a collection of random notes on build-time dependencies as of
1252 about XEmacs 21.5.11. Of course we use @file{make} to manage most
1253 dependencies, especially for the C code. The main thing here is for the
1254 Release Engineer to run the @file{src/make-src-depend} script every so
1255 often, at least at every release.
1256
1257 However, since most of XEmacs is written in Lisp, and we compile and
1258 preload the Lisp for efficiency, managing Lisp compilation using
1259 @file{make} would imply running XEmacs hundreds of times. This would
1260 make the build process unbearably long. Thus those processes that
1261 require running the same Lisp programs on many files are managed using
1262 Lisp driver functions rather than @file{make}. The situation is further
1263 complicated by the fact that documentation strings are kept in an
1264 external database, and referenced in the dumped XEmacs by file offset.
1265 Finally, the Lisp files are processed to collect autoloaded function
1266 information and customize dependencies, which are then written into
1267 generated Lisp files.
1268
1269 About this, Ben sez:
1270
1271 @quotation
1272 @enumerate 1
1273 @item
1274 Redumping depends on up-to-date dumped @file{.elc} files and @file{DOC}
1275 but not directly on auto-autoloads.
1276
1277 @item
1278 Rebuilding dumped @file{.elc} files depends on auto-autoloads being
1279 up-to-date.
1280
1281 @item
1282 Building the @file{DOC} file depends on up-to-date dumped @file{.elc}
1283 files but not directly on auto-autoloads.
1284
1285 @item
1286 Recompiling anything depends on @file{bytecomp.elc} and
1287 @file{byte-optimize.elc} being up-to-date.
1288 @end enumerate
1289
1290 Put these together and you'll see it's perfectly acceptable to build
1291 auto-autoloads *after* dumping if no @file{.elc} files are out-of-date.
1292 @end quotation
1293
1294 These Lisp driver programs typically run from temacs, not a dumped
1295 XEmacs. The simplest (but time-consuming) way to achieve a sane
1296 environment for running Lisp is to load @file{loadup.el} or
1297 @file{loadup-el.el}. (The latter is used to avoid loading possibly
1298 out-of-date compiled Lisp files.) If this is not done, you have to
1299 construct the environment yourself. See @file{dumped-lisp.el} to see
1300 how it is done in the dumped XEmacs.
1301
1302 One potential gotcha is that very early customizations are now handled
1303 by adding the definitions to the special variable
1304 @code{custom-declare-variable-list}, defined in @file{subr.el}. If you
1305 use any higher-level functionality that might load @file{custom.el}, but
1306 you do not need @file{subr.el}, you should @samp{defvar}
1307 @code{custom-declare-variable-list} to prevent the @samp{void-variable}
1308 error. (Currently this is only needed for @file{make-docfile.el}.)
1309
1310 @node XEmacs From the Inside, The XEmacs Object System (Abstractly Speaking), Build-Time Dependencies, Top
1246 @chapter XEmacs From the Inside 1311 @chapter XEmacs From the Inside
1247 @cindex XEmacs from the inside 1312 @cindex XEmacs from the inside
1248 @cindex inside, XEmacs from the 1313 @cindex inside, XEmacs from the
1249 1314
1250 Internally, XEmacs is quite complex, and can be very confusing. To 1315 Internally, XEmacs is quite complex, and can be very confusing. To