comparison man/internals/internals.texi @ 2640:a4040d921acc

[xemacs-hg @ 2005-03-09 05:36:28 by stephent] internals and lispref <871xapfkkq.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Wed, 09 Mar 2005 05:36:50 +0000
parents d6a2e12b8411
children 89e2f8e3f660
comparison
equal deleted inserted replaced
2639:cd00e5eeb22a 2640:a4040d921acc
1820 @item 1820 @item
1821 XEmacs 21.4.14 "Reasonable Discussion" released September 3, 2003. 1821 XEmacs 21.4.14 "Reasonable Discussion" released September 3, 2003.
1822 @item 1822 @item
1823 XEmacs 21.4.15 "Security Through Obscurity" released February 2, 2004. 1823 XEmacs 21.4.15 "Security Through Obscurity" released February 2, 2004.
1824 @item 1824 @item
1825 XEmacs 21.4.16 "Successful IPO" released December 5, 2004.
1826 @item
1825 version 21.5.0 "alfalfa" released April 18, 2001. 1827 version 21.5.0 "alfalfa" released April 18, 2001.
1826 @item 1828 @item
1827 version 21.5.1 "anise" released May 9, 2001. 1829 version 21.5.1 "anise" released May 9, 2001.
1828 @item 1830 @item
1829 version 21.5.2 "artichoke" released July 28, 2001. 1831 version 21.5.2 "artichoke" released July 28, 2001.
1905 legal papers. Although they have not stated their reasons, there are quite 1907 legal papers. Although they have not stated their reasons, there are quite
1906 a number of reasons not to sign legal papers: 1908 a number of reasons not to sign legal papers:
1907 1909
1908 @itemize @bullet 1910 @itemize @bullet
1909 @item 1911 @item
1910 By doing so you essentially give up all control over your code. You can 1912 By doing so you essentially give up all control over your code. You can
1911 no longer release your code under a different license. If you want to 1913 no longer release your code under a different license. If you want to
1912 use your code that you've contributed to the FSF in a project of your 1914 use your code that you've contributed to the FSF in a project of your
1913 own, and that project is not released under the GPL, you are not allowed 1915 own, and that project is not released under the GPL, you are not allowed
1914 to do this. Obviously, large companies tend to want to reuse their code 1916 to do this. (This is supposed to be avoided by the standard assignment
1915 in many different projects and as a result feel very uncomfortable about 1917 contract used by the FSF, which either automatically relicenses the code
1916 signing legal papers. 1918 to the author for any purpose under any license, or promises to do so,
1919 depending on the version -- stephen.) Obviously, large companies tend
1920 to want to reuse their code in many different projects and as a result
1921 feel very uncomfortable about signing legal papers.
1917 @item 1922 @item
1918 One of the dangers of assigning copyright to the FSF is that if the FSF 1923 One of the dangers of assigning copyright to the FSF is that if the FSF
1919 happens to be taken over by some evil corporate identity or anyone with 1924 happens to be taken over by some evil corporate identity or anyone with
1920 different ideas than RMS, they will own all copyright-assigned code, and 1925 different ideas than RMS, they will own all copyright-assigned code, and
1921 can revoke the GPL and enforce any license they please. If the code has 1926 can revoke the GPL and enforce any license they please. (This is false,
1922 many different copyright holders, this is much less likely of a 1927 according to RMS; the FSF's covenants and the assignment contracts
1928 require that it or any successors may release the code only under
1929 copyleft. Thus, the only real loophole is if the FSF goes bankrupt,
1930 somehow leaving the code in the public domain -- stephen.) If the code
1931 has many different copyright holders, this is much less likely of a
1923 scenario. 1932 scenario.
1924 @end itemize 1933 @end itemize
1925 1934
1926 @item 1935 @item
1927 RMS does not like abstract data structures. Abstract data structures are 1936 RMS does not like abstract data structures. Abstract data structures are
2072 important than this one, as far as number of users is concerned. The 2081 important than this one, as far as number of users is concerned. The
2073 following messages, from the Lucid Emacs mailing lists in 1992 and 2082 following messages, from the Lucid Emacs mailing lists in 1992 and
2074 1993, comprise the bulk (if not the entirety) of the public 2083 1993, comprise the bulk (if not the entirety) of the public
2075 discussions between the Lucid and FSF camps on why the split happened 2084 discussions between the Lucid and FSF camps on why the split happened
2076 and why a merger never did. 2085 and why a merger never did.
2086 @uref{http://www.jwz.org/doc/lemacs.html,The Lucid Emacs Split}.
2077 2087
2078 The current XEmacs maintainers have a much more pusillanimous summary 2088 The current XEmacs maintainers have a much more pusillanimous summary
2079 of this history on their XEmacs versus GNU Emacs page. 2089 of this history on
2090 @uref{http://www.xemacs.org/About/XEmacsVsGNUemacs.html,their XEmacs
2091 versus GNU Emacs page}.
2080 2092
2081 -- jwz, 11-Feb-2000. 2093 -- jwz, 11-Feb-2000.
2082 2094
2083 @node XEmacs from the Outside, The Lisp Language, The XEmacs Split, Top 2095 @node XEmacs from the Outside, The Lisp Language, The XEmacs Split, Top
2084 @chapter XEmacs from the Outside 2096 @chapter XEmacs from the Outside
2413 file. (You may optionally run @file{autoconf} first to update the 2425 file. (You may optionally run @file{autoconf} first to update the
2414 @file{configure} script. @xref{Modules for Build Configuration}.) 2426 @file{configure} script. @xref{Modules for Build Configuration}.)
2415 This determines what the build environment is, chooses the 2427 This determines what the build environment is, chooses the
2416 appropriate @file{s/} and @file{m/} file, and runs a series of tests to 2428 appropriate @file{s/} and @file{m/} file, and runs a series of tests to
2417 determine many details about your environment, such as which library 2429 determine many details about your environment, such as which library
2418 functions are available and exactly how they work. The reason for 2430 functions are available and exactly how they work.
2419 running these tests is that it allows XEmacs to be compiled on a much 2431 Running these tests allows XEmacs to be compiled on a much
2420 wider variety of platforms than those that the XEmacs developers happen 2432 wider variety of platforms than those that the XEmacs developers happen
2421 to be familiar with, including various sorts of hybrid platforms. This 2433 to be familiar with, including various sorts of hybrid platforms. This
2422 is especially important now that many operating systems give you a great 2434 is especially important now that many operating systems give you a great
2423 deal of control over exactly what features you want installed, and allow 2435 deal of control over exactly what features you want installed, and allow
2424 for easy upgrading of parts of a system without upgrading the rest. It 2436 for easy upgrading of parts of a system without upgrading the rest. It
2425 would be impossible to pre-determine and pre-specify the information for 2437 would be impossible to pre-determine and pre-specify the information for
2426 all possible configurations. 2438 all possible configurations.
2427 2439
2428 In fact, the @file{s/} and @file{m/} files are basically @emph{evil}, 2440 Thus, the @file{s/} and @file{m/} files are basically @emph{evil},
2429 since they contain unmaintainable platform-specific hard-coded 2441 since they contain platform-specific hard-coded
2430 information. XEmacs has been moving in the direction of having all 2442 information. XEmacs is moving in the direction of having all
2431 system-specific information be determined dynamically by 2443 system-specific information be determined dynamically by
2432 @file{configure}. Perhaps someday we can @code{rm -rf src/s src/m}. 2444 @file{configure}. Perhaps someday we can @code{rm -rf src/s src/m}.
2445
2446 @file{configure} also parses the version information from
2447 @file{version.sh} and adds it to @file{config.h} as C preprocessor
2448 macros. These macros in turn are used to initialize some Lisp
2449 variables, such as @samp{emacs-version}. @xref{The version.sh Script}.
2433 2450
2434 When configure is done running, it generates @file{Makefile}s and 2451 When configure is done running, it generates @file{Makefile}s and
2435 @file{GNUmakefile}s and the file @file{src/config.h} (which describes 2452 @file{GNUmakefile}s and the file @file{src/config.h} (which describes
2436 the features of your system) from template files. You then run 2453 the features of your system) from template files. You then run
2437 @file{make}, which compiles the auxiliary code and programs in 2454 @file{make}, which compiles the auxiliary code and programs in
3052 3069
3053 @example 3070 @example
3054 @file{configure} 3071 @file{configure}
3055 @file{config.h.in} 3072 @file{config.h.in}
3056 @file{Makefile.in.in} 3073 @file{Makefile.in.in}
3074 @file{version.sh}
3057 @end example 3075 @end example
3058 3076
3059 @example 3077 @example
3060 @file{configure.ac} 3078 @file{configure.ac}
3061 @file{configure.in} 3079 @file{configure.in}
3062 @end example 3080 @end example
3063 3081
3082 @xref{The version.sh Script}.
3064 @xref{The configure Script}. 3083 @xref{The configure Script}.
3065 3084
3066 3085
3067 3086
3068 @node Modules for Compiling XEmacs, Modules for Preloading Lisp, Modules for Build Configuration, Modules for Building XEmacs 3087 @node Modules for Compiling XEmacs, Modules for Preloading Lisp, Modules for Build Configuration, Modules for Building XEmacs
3092 3111
3093 @node Low-Level Modules, Basic Lisp Modules, Modules for Building XEmacs, The Modules of XEmacs 3112 @node Low-Level Modules, Basic Lisp Modules, Modules for Building XEmacs, The Modules of XEmacs
3094 @section Low-Level Modules 3113 @section Low-Level Modules
3095 @cindex low-level modules 3114 @cindex low-level modules
3096 @cindex modules, low-level 3115 @cindex modules, low-level
3116
3117 @example
3118 @file{version.sh}
3119 @end example
3120
3121 This is a Bourne shell script which sets version-related variables. It
3122 is updated in the release process by the maintainer of each series or
3123 branch, and may also be automatically updated.
3124 @xref{The version.sh Script}.
3097 3125
3098 @example 3126 @example
3099 @file{config.h} 3127 @file{config.h}
3100 @end example 3128 @end example
3101 3129
4136 This node should describe XEmacs-specific techniques and idioms in the 4164 This node should describe XEmacs-specific techniques and idioms in the
4137 configuration system. A particular example is the set of @samp{XE_} 4165 configuration system. A particular example is the set of @samp{XE_}
4138 macros in @file{configure.in} and @file{configure.ac}. 4166 macros in @file{configure.in} and @file{configure.ac}.
4139 4167
4140 @menu 4168 @menu
4169 * The version.sh Script::
4141 * Adding Configurable Features:: 4170 * Adding Configurable Features::
4142 * The configure Script:: 4171 * The configure Script::
4143 * The Makefile Precursors:: 4172 * The Makefile Precursors::
4144 @end menu 4173 @end menu
4145 4174
4146 4175
4147 4176
4148 @node Adding Configurable Features, The configure Script, The Build Configuration System, The Build Configuration System 4177 @node The version.sh Script, Adding Configurable Features, The Build Configuration System, The Build Configuration System
4178 @section The version.sh Script
4179 @cindex version.sh script
4180 @cindex scripts, version.sh
4181
4182 The @file{version.sh} script is a snippet of Bourne shell script which
4183 sets version variables. By convention, these variables are given
4184 descriptive names, all in lower case ASCII letters, with words separated
4185 by underscores (@samp{_}, ASCII 0x5F). They are converted to C
4186 preprocessor macro definitions and added to @file{src/config.h} by
4187 @file{configure}. Thus each must have a corresponding @samp{#undef} in
4188 @file{src/config.h.in}. Each macro's name is the same as the shell
4189 variable's, converted to all uppercase. Finally, the macros are used to
4190 initialize Lisp variables defined in @file{src/emacs.c}. These Lisp
4191 variables have the same name as the shell variables and preprocessor
4192 macros, except that they obey the Lisp conventions that Lisp variable
4193 names are all lowercase with words separated by hyphens (@samp{-}, ASCII
4194 0x2D), while the C implementations are the same as the shell variable
4195 with the letter @samp{V} (ASCII 0x56) prepended.
4196
4197 The file is updated by various release engineers and their scripts.
4198 Other developers should have no need to edit this file. The main
4199 exception would be to add a branch tag and possibly other information to
4200 @samp{xemacs_extra_name} to describe informal releases from a private
4201 branch. In particular, @samp{xemacs_release_date} and the
4202 @samp{emacs_*_version} variables should refer to the most recent release
4203 in the parent branch, so ``private branch'' maintainers should not
4204 update them. If the branch is significant and long-lasting, you might
4205 enjoy assigning your own codenames. (Of course, if you have no intent
4206 of merging your changes to the mainline, you can do what you want with
4207 any of the variables. But in that case you should change the name of
4208 the program, as well, in version strings and the like.)
4209
4210 Regarding the syntax of the file, it is simply a sequence of shell
4211 variable assignments. So the only thing that you can rely on is that
4212 the shebang (the shell's interpreter comment, @code{#!/bin/sh}) will
4213 occupy the first line of the file. You should not count on order or
4214 other comments being preserved. On the other hand, some maintainers'
4215 tools do depend on the order, so as much as possible your tools should
4216 preserve the order of assignments.
4217
4218 Here is a table of the currently defined variables and their meanings (as
4219 of February 2005):
4220
4221 @table @samp
4222 @item #!/bin/sh
4223 The shebang, making this an executable script on Unix.
4224
4225 @item emacs_is_beta
4226 Set to @samp{t} when the release is a beta test release, otherwise null.
4227
4228 @item emacs_major_version
4229 @itemx emacs_minor_version
4230 @itemx emacs_beta_version
4231 Strings containing decimal numbers representing the components of the
4232 version of the source tree. The name @samp{emacs_beta_version} is a
4233 relic of the time when XEmacs had a two component version for public
4234 releases. Since XEmacs 21.1, both the beta series and the stable series
4235 have three-component version numbers, and @samp{emacs_beta_version} holds
4236 the lowest-order component of the stable series as well as the beta series.
4237
4238 @item xemacs_codename
4239 An optional string containing a codename for the release. Recent
4240 maintainers have chosen humorous themes for their codenames, and
4241 typically the names are used in alphabetical order.
4242
4243 @item emacs_kit_version
4244 An optional string used for special branches. (This should be
4245 deprecated in favor of xemacs_extra_name.)
4246
4247 @item infodock_major_version
4248 @itemx infodock_minor_version
4249 @itemx infodock_build_version
4250 Strings containing decimal numbers representing the components of the
4251 version of the Infodock applied to the source tree. (The Infodock
4252 project has been in hibernation since XEmacs 21.1.9 or so; these
4253 variables are unused in current XEmacsen.)
4254
4255 @item xemacs_extra_name
4256 A string containing arbitrary additional information. If length is
4257 positive, it is automatically added to the version string after the
4258 codename.
4259
4260 @item xemacs_release_date
4261 A string containing the date of the latest release in the series in ISO
4262 8601 format. The time zone should not be present, it is defined to be
4263 UTC. Time is optional. Not currently used in the version string.
4264 @end table
4265
4266
4267
4268 @node Adding Configurable Features, The configure Script, The version.sh Script, The Build Configuration System
4149 @section Adding Configurable Features 4269 @section Adding Configurable Features
4150 @cindex adding configurable features 4270 @cindex adding configurable features
4151 @cindex configurable features, adding 4271 @cindex configurable features, adding
4152 @cindex features, adding configurable 4272 @cindex features, adding configurable
4153 4273
4159 4279
4160 4280
4161 @node The configure Script, The Makefile Precursors, Adding Configurable Features, The Build Configuration System 4281 @node The configure Script, The Makefile Precursors, Adding Configurable Features, The Build Configuration System
4162 @section The configure Script 4282 @section The configure Script
4163 @cindex configure script 4283 @cindex configure script
4164 @cindex script, configure 4284 @cindex scripts, configure
4165 4285
4166 At the heart of the XEmacs build configuration system is the 4286 At the heart of the XEmacs build configuration system is the
4167 @file{configure} script. This beast is maintained using the Autoconf 4287 @file{configure} script. This beast is maintained using the Autoconf
4168 system, which is a truly terrifying monstrosity based on a fundamentally 4288 system, which is a truly terrifying monstrosity based on a fundamentally
4169 flawed programming model (extensive use of macros), with an 4289 flawed programming model (extensive use of macros), with an