Mercurial > hg > xemacs-beta
changeset 1315:70921960b980
[xemacs-hg @ 2003-02-20 08:19:28 by ben]
check in makefile fixes et al
Makefile.in.in: Major surgery. Move all stuff related to building anything in the
src/ directory into src/. Simplify the dependencies -- everything
in src/ is dependent on the single entry `src' in MAKE_SUBDIRS.
Remove weirdo targets like `all-elc[s]', dump-elc[s], etc.
mule/mule-msw-init.el: Removed.
Delete this file.
mule/mule-win32-init.el: New file, with stuff from mule-msw-init.el -- not just for MS Windows
native, boys and girls!
bytecomp.el: Change code inserted to catch trying to load a Mule-only .elc
file in a non-Mule XEmacs. Formerly you got the rather cryptic
"The required feature `mule' cannot be provided". Now you get
"Loading this file requires Mule support".
finder.el: Remove dependency on which directory this function is invoked
from.
update-elc.el: Don't mess around with ../src/BYTECOMPILE_CHANGE. Now that
Makefile.in.in and xemacs.mak are in sync, both of them use
NEEDTODUMP and the other one isn't used.
dumped-lisp.el: Rewrite in terms of `list' and `nconc' instead of assemble-list, so
we can have arbitrary forms, not just `when-feature'.
very-early-lisp.el: Nuke this file.
finder-inf.el, packages.el, update-elc.el, update-elc-2.el, loadup.el, make-docfile.el: Eliminate references to very-early-lisp.
msw-glyphs.el: Comment clarification.
xemacs.mak: Add macros DO_TEMACS, DO_XEMACS, and a few others; this macro
section is now completely in sync with src/Makefile.in.in. Copy
check-features, load-shadows, and rebuilding finder-inf.el from
src/Makefile.in.in. The main build/dump/recompile process is now
synchronized with src/Makefile.in.in. Change `WARNING' to `NOTE'
and `error checking' to `error-checking' TO avoid tripping
faux warnings and errors in the VC++ IDE.
Makefile.in.in: Major surgery. Move all stuff related to building anything in the
src/ directory from top-level Makefile.in.in to here. Simplify
the dependencies. Rearrange into logical subsections.
Synchronize the main compile/dump/build-elcs section with
xemacs.mak, which is already clean and in good working order.
Remove weirdo targets like `all-elc[s]', dump-elc[s], etc. Add
additional levels of macros \(e.g. DO_TEMACS, DO_XEMACS,
TEMACS_BATCH, XEMACS_BATCH, XEMACS_BATCH_PACKAGES) to factor out
duplicated stuff. Clean up handling of "HEAP_IN_DATA" (Cygwin) so
it doesn't need to ignore the return value from dumping. Add
.NO_PARALLEL since various aspects of building and dumping must be
serialized but do not always have dependencies between them
(this is impossible in some cases). Everything related to src/
now gets built in one pass in this directory by just running
`make' (except the Makefiles themselves and config.h, paths.h,
Emacs.ad.h, and other generated .h files).
console.c: Update list of possibly valid console types.
emacs.c: Rationalize the specifying and handling of the type of the first
frame. This was originally prompted by a workspace in which I got
GTK to compile under C++ and in the process fixed it so it could
coexist with X in the same build -- hence, a combined
TTY/X/MS-Windows/GTK build is now possible under Cygwin. (However,
you can't simultaneously *display* more than one kind of device
connection -- but getting that to work is not that difficult.
Perhaps a project for a bored grad student. I (ben) would do it
but don't see the use.) To make sense of this, I added new
switches that can be used to specifically indicate the window
system: -x [aka --use-x], -tty \[aka --use-tty], -msw [aka
--use-ms-windows], -gtk [aka --use-gtk], and -gnome [aka
--use-gnome, same as --use-gtk]. -nw continues as an alias for
-tty. When none have been given, XEmacs checks for other
parameters implying particular device types (-t -> tty, -display
-> x [or should it have same treatment as DISPLAY below?]), and
has ad-hoc logic afterwards: if env var DISPLAY is set, use x (or
gtk? perhaps should check whether gnome is running), else MS
Windows if it exsits, else TTY if it exists, else stream, and you
must be running in batch mode. This also fixes an existing bug
whereby compiling with no x, no mswin, no tty, when running non-
interactively (e.g. to dump) I get "sorry, must have TTY support".
emacs.c: Turn on Vstack_trace_on_error so that errors are debuggable even
when occurring extremely early in reinitialization.
emacs.c: Try to make sure that the user can see message output under
Windows (i.e. it doesn't just disappear right away) regardless of
when it occurs, e.g. in the middle of creating the first frame.
emacs.c: Define new function `emacs-run-status', indicating whether XEmacs
is noninteractive or interactive, whether raw,
post-dump/pdump-load or run-temacs, whether we are dumping,
whether pdump is in effect.
event-stream.c: It's "mommas are fat", not "momas are fat".
Fix other typo.
event-stream.c: Conditionalize in_menu_callback check on HAVE_MENUBARS,
because it won't exist on w/o menubar support,
lisp.h: More hackery on RETURN_NOT_REACHED. Cygwin v3.2 DOES complain here
if RETURN_NOT_REACHED() is blank, as it is for GCC 2.5+. So make it
blank only for GCC 2.5 through 2.999999999999999.
Declare Vstack_trace_on_error.
profile.c: Need to include "profile.h" to fix warnings.
sheap.c: Don't fatal() when need to rerun Make, just stderr_out() and exit(0).
That way we can distinguish between a dumping failing expectedly
(due to lack of stack space, triggering another dump) and unexpectedly,
in which case, we want to stop building. (or go on, if -K is given)
syntax.c, syntax.h: Use ints where they belong, and enum syntaxcode's where they belong,
and fix warnings thereby.
syntax.h: Fix crash caused by an edge condition in the syntax-cache macros.
text.h: Spacing fixes.
xmotif.h: New file, to get around shadowing warnings.
EmacsManager.c, event-Xt.c, glyphs-x.c, gui-x.c, input-method-motif.c, xmmanagerp.h, xmprimitivep.h: Include xmotif.h.
alloc.c: Conditionalize in_malloc on ERROR_CHECK_MALLOC.
config.h.in, file-coding.h, fileio.c, getloadavg.c, select-x.c, signal.c, sysdep.c, sysfile.h, systime.h, text.c, unicode.c: Eliminate HAVE_WIN32_CODING_SYSTEMS, use WIN32_ANY instead.
Replace defined (WIN32_NATIVE) || defined (CYGWIN) with WIN32_ANY.
lisp.h: More futile attempts to walk and chew gum at the same time when
dealing with subr's that don't return.
author | ben |
---|---|
date | Thu, 20 Feb 2003 08:19:44 +0000 |
parents | 15a91d7ae2d1 |
children | 59e2c5b1e38f |
files | lisp/ChangeLog lisp/bytecomp.el lisp/dumped-lisp.el lisp/finder.el lisp/loadup.el lisp/make-docfile.el lisp/msw-glyphs.el lisp/mule/mule-msw-init.el lisp/mule/mule-win32-init.el lisp/packages.el lisp/update-elc-2.el lisp/update-elc.el lisp/very-early-lisp.el nt/ChangeLog nt/xemacs.mak src/ChangeLog src/EmacsManager.c src/Makefile.in.in src/alloc.c src/config.h.in src/console.c src/emacs.c src/event-Xt.c src/event-stream.c src/file-coding.h src/fileio.c src/getloadavg.c src/glyphs-x.c src/gui-x.c src/input-method-motif.c src/lisp.h src/profile.c src/select-x.c src/sheap.c src/signal.c src/syntax.c src/syntax.h src/sysdep.c src/sysfile.h src/systime.h src/text.c src/text.h src/unicode.c src/xmmanagerp.h src/xmotif.h src/xmprimitivep.h |
diffstat | 46 files changed, 1343 insertions(+), 917 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/ChangeLog Thu Feb 20 08:19:44 2003 +0000 @@ -1,3 +1,48 @@ +2003-02-19 Ben Wing <ben@xemacs.org> + + * mule/mule-msw-init.el: + * mule/mule-msw-init.el ('mswindows-multibyte-system-default): Removed. + Delete this file. + + * mule/mule-win32-init.el: + New file, with stuff from mule-msw-init.el -- not just for MS Windows + native, boys and girls! + + * bytecomp.el (byte-compile-insert-header): + Change code inserted to catch trying to load a Mule-only .elc + file in a non-Mule XEmacs. Formerly you got the rather cryptic + "The required feature `mule' cannot be provided". Now you get + "Loading this file requires Mule support". + + * finder.el (finder-compile-keywords): + Remove dependency on which directory this function is invoked + from. + + * update-elc.el: + Don't mess around with ../src/BYTECOMPILE_CHANGE. Now that + Makefile.in.in and xemacs.mak are in sync, both of them use + NEEDTODUMP and the other one isn't used. + + * dumped-lisp.el: + * dumped-lisp.el (preloaded-file-list): + Rewrite in terms of `list' and `nconc' instead of assemble-list, so + we can have arbitrary forms, not just `when-feature'. + + * very-early-lisp.el: Nuke this file. + + * finder-inf.el: + * packages.el: + * update-elc.el: + * update-elc-2.el: + * loadup.el: + * make-docfile.el: + Eliminate references to very-early-lisp. + + * msw-glyphs.el: + Comment clarification. + +2003-02-18 Ben Wing <ben@xemacs.org> + 2003-02-17 Stephen J. Turnbull <stephen@xemacs.org> * mule/mule-charset.el (charsets-in-region): Remove broken
--- a/lisp/bytecomp.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/bytecomp.el Thu Feb 20 08:19:44 2003 +0000 @@ -1847,7 +1847,8 @@ (char-to-string 255))) (eq (point) (point-max)))) (setq buffer-file-coding-system 'raw-text-unix) - (insert "(require 'mule)\n;;;###coding system: escape-quoted\n") + (insert "(or (featurep 'mule) (error \"Loading this file requires Mule support\")) +;;;###coding system: escape-quoted\n") (setq buffer-file-coding-system 'escape-quoted) ;; #### Lazy loading not yet implemented for MULE files ;; mrb - Fix this someday.
--- a/lisp/dumped-lisp.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/dumped-lisp.el Thu Feb 20 08:19:44 2003 +0000 @@ -1,55 +1,56 @@ (setq preloaded-file-list - (assemble-list - "backquote" ; needed for defsubst etc. - "bytecomp-runtime" ; define defsubst - "find-paths" - "packages" ; Bootstrap run-time lisp environment - "setup-paths" - "dump-paths" - "subr" ; load the most basic Lisp functions - "post-gc" - "replace" ; match-string used in version.el. - ; Ignore compiled-by-mistake version.elc - "version.el" - "cl" - "cl-extra" - "cl-seq" - "widget" - "custom" ; Before the world so everything can be - ; customized - "cus-start" ; for customization of builtin variables - "cmdloop" - "keymap" - "syntax" - "device" - "console" - "obsolete" - "specifier" - "frame" ; needed by faces - (when-feature x "x-faces") ; needed by faces - (when-feature gtk "gtk-faces") - (when-feature mswindows "msw-faces") - "faces" ; must be loaded before any make-face call -;;(pureload "facemenu") #### not yet ported - "glyphs" - "objects" - "extents" - "events" - "hash-table" - "text-props" - "process" ;; This is bad. network-streams may not be defined. - (when-feature multicast "multicast") ; #+network-streams implicitly true - "map-ynp" - "undo-stack" - "window" ; simple needs `save-window-excursion' - "window-xemacs" - "simple" - "keydefs" ; Before loaddefs so that keymap vars exist. - "abbrev" - "derived" - "minibuf" - "list-mode" - "modeline" ; needs simple.el to be loaded first + (list + "backquote" ; needed for defsubst etc. + "bytecomp-runtime" ; define defsubst + "find-paths" + "packages" ; Bootstrap run-time lisp environment + "setup-paths" + "dump-paths" + "subr" ; load the most basic Lisp functions + "post-gc" + "replace" ; match-string used in version.el. + + "version.el" ; Ignore compiled-by-mistake version.elc + + "cl" + "cl-extra" + "cl-seq" + "widget" + "custom" ; Before the world so everything can be + ; customized + "cus-start" ; for customization of builtin variables + "cmdloop" + "keymap" + "syntax" + "device" + "console" + "obsolete" + "specifier" + "frame" ; needed by faces + (when (featurep 'x) "x-faces") ; needed by faces + (when (featurep 'gtk) "gtk-faces") + (when (valid-console-type-p 'mswindows) "msw-faces") + "faces" ; must be loaded before any make-face call + ;;(pureload "facemenu") #### not yet ported + "glyphs" + "objects" + "extents" + "events" + "hash-table" + "text-props" + "process" ;; This is bad. network-streams may not be defined. + (when (featurep 'multicast) "multicast") ; #+network-streams implicitly true + "map-ynp" + "undo-stack" + "window" ; simple needs `save-window-excursion' + "window-xemacs" + "simple" + "keydefs" ; Before loaddefs so that keymap vars exist. + "abbrev" + "derived" + "minibuf" + "list-mode" + "modeline" ; needs simple.el to be loaded first ;; If SparcWorks support is included some additional packages are ;; dumped which would normally have autoloads. To avoid ;; duplicate doc string warnings, SparcWorks uses a separate @@ -57,90 +58,97 @@ ;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!! ;; So just make loaddefs-eos go away... ;;(pureload (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs")) - "cus-file" - "startup" ; For initialization of + "cus-file" + "startup" ; For initialization of ; `emacs-user-extension-dir' - "misc" - ;; (pureload "profile") - "help" - ;; (pureload "hyper-apropos") Soon... - "files" - "lib-complete" - "format" - "indent" - "isearch-mode" - "buffer" - "buff-menu" - "paths.el" ; don't get confused if paths compiled. - "lisp" - "page" - "register" - "iso8859-1" ; This must be before any modes - ; (sets standard syntax table.) - "paragraphs" - "easymenu" ; Added for 20.3. - "lisp-mode" - "text-mode" - "fill" - "auto-save" ; Added for 20.4 - "movemail" ; Added for 21.2 - (when-feature windows-nt "win32-native") - (when-feature lisp-float-type "float-sup") - "itimer" ; for vars auto-save-timeout and + "misc" + ;; (pureload "profile") + "help" + ;; (pureload "hyper-apropos") Soon... + "files" + "lib-complete" + "format" + "indent" + "isearch-mode" + "buffer" + "buff-menu" + "paths.el" ; don't get confused if paths compiled. + "lisp" + "page" + "register" + "iso8859-1" ; This must be before any modes + ; (sets standard syntax table.) + "paragraphs" + "easymenu" ; Added for 20.3. + "lisp-mode" + "text-mode" + "fill" + "auto-save" ; Added for 20.4 + "movemail" ; Added for 21.2 + (when (eq system-type 'windows-nt) "win32-native") + (when (featurep 'lisp-float-type) "float-sup") + "itimer" ; for vars auto-save-timeout and ; auto-gc-threshold - "itimer-autosave" - "printer" - "behavior" - "behavior-defs" - "diagnose" - + "itimer-autosave" + "printer" + "behavior" + "behavior-defs" + "diagnose" + ;;;;;;;;;;;;;;;;;; GUI support - (when-feature window-system "gui") - (when-feature window-system "mouse") - (when-feature window-system "mode-motion") - (when-feature toolbar "toolbar") - (when-feature scrollbar "scrollbar") - (when-feature menubar "menubar") - (when-feature dialog "dialog") - (when-feature gutter "gutter") - (when-feature dragdrop-api "dragdrop") - "select" - + (when (featurep 'window-system) + '("gui" + "mouse" + "mode-motion" + )) + (when (featurep 'toolbar) "toolbar") + (when (featurep 'scrollbar) "scrollbar") + (when (featurep 'menubar) "menubar") + (when (featurep 'dialog) "dialog") + (when (featurep 'gutter) "gutter") + (when (featurep 'dragdrop-api) "dragdrop") + "select" + ;;;;;;;;;;;;;;;;;; Content for GUI's - ;; There used to be window-system inserted in the when-feature, - ;; but IMHO your configure script should turn off the menubar, - ;; toolbar, etc. features when there is no window system. We - ;; should just be able to assume that, if (featurep 'menubar), - ;; the menubar should work and if items are added, they can be - ;; seen clearly and usefully. - (when-feature (and (not infodock) menubar) "menubar-items") - (when-feature (and gutter) "gutter-items") - (when-feature (and (not infodock) toolbar) "toolbar-items") - (when-feature (and (not infodock) dialog) "dialog-items") + ;; There used to be window-system inserted in the when-feature, + ;; but IMHO your configure script should turn off the menubar, + ;; toolbar, etc. features when there is no window system. We + ;; should just be able to assume that, if (featurep 'menubar), + ;; the menubar should work and if items are added, they can be + ;; seen clearly and usefully. + (when (featurep '(and (not infodock) menubar)) "menubar-items") + (when (featurep '(and gutter)) "gutter-items") + (when (featurep '(and (not infodock) toolbar)) "toolbar-items") + (when (featurep '(and (not infodock) dialog)) "dialog-items") ;;;;;;;;;;;;;;;;;; Coding-system support - "coding" - "code-files" - ;; Handle process with encoding/decoding coding-system. - "code-process" - ;; Provide basic commands to set coding systems to user - "code-cmds" - "unicode" + "coding" + "code-files" + ;; Handle process with encoding/decoding coding-system. + "code-process" + ;; Provide basic commands to set coding systems to user + "code-cmds" + "unicode" ;;;;;;;;;;;;;;;;;; MULE support - (when-feature mule "mule-charset") - (when-feature mule "mule-cmds") ; to sync with Emacs 20.1 - (when-feature mule "mule-coding") - (when-feature mule "mule-composite-stub") - (when-feature mule "mule-composite") - ;; may initialize coding systems - (when-feature (and mule x) "mule-x-init") - (when-feature (and mule tty) "mule-tty-init") - (when-feature (and mule mswindows) "mule-msw-init") - "code-init" ; set up defaults - ;; All files after this can have extended characters in them. - (when-feature mule "mule-category") - (when-feature mule "mule-ccl") - (when-feature mule "kinsoku") + (when (featurep 'mule) + '("mule-charset" + "mule-cmds" ; to sync with Emacs 20.1 + "mule-coding" + "mule-composite-stub" + "mule-composite" + )) + ;; may initialize coding systems + (when (featurep '(and mule x)) "mule-x-init") + (when (featurep '(and mule tty)) "mule-tty-init") + (when (and (featurep 'mule) (memq system-type '(windows-nt cygwin32))) + "mule-win32-init") + "code-init" ; set up defaults + ;; All files after this can have extended characters in them. + (when (featurep 'mule) + '("mule-category" + "mule-ccl" + "kinsoku" + )) ;; after this goes the specific lisp routines for a particular input system ;; 97.2.5 JHod Shouldn't these go into a site-load file to allow site @@ -160,36 +168,36 @@ ;; those of the same name in leim/quail.el, but no longer, since we now ;; compile with -no-packages. - (when-feature mule "arabic") - (when-feature mule "chinese") - (when-feature mule "cyrillic") - (when-feature mule "english") - (when-feature mule "ethiopic") - (when-feature mule "european") - (when-feature mule "greek") - (when-feature mule "hebrew") - (when-feature mule "indian") - (when-feature mule "devanagari") ; must be loaded after indian.el - (when-feature mule "japanese") - (when-feature mule "korean") - (when-feature mule "lao") - (when-feature mule "latin") - (when-feature mule "misc-lang") - ;; #### merge thai and thai-xtis!!! - ;(when-feature mule "thai") - (when-feature mule "thai-xtis") - (when-feature mule "tibetan") - (when-feature mule "vietnamese") - + (when (featurep 'mule) + '("arabic" + "chinese" + "cyrillic" + "english" + "ethiopic" + "european" + "greek" + "hebrew" + "indian" + "devanagari" ; must be loaded after indian.el + "japanese" + "korean" + "lao" + "latin" + "misc-lang" + ;; "thai" #### merge thai and thai-xtis!!! + "thai-xtis" + "tibetan" + "vietnamese" + )) + ;; Specialized language support - (when-feature (and mule CANNA) "canna-leim") + (when (featurep '(and mule CANNA)) "canna-leim") ;; Egg/Its is now a package -; (when-feature (and mule wnn) "egg-leim") -; (when-feature (and mule wnn) "egg-kwnn-leim") -; (when-feature (and mule wnn) "egg-cwnn-leim") -; (when-feature mule "egg-sj3-leim") +; (when (featurep '(and mule wnn)) +; '("egg-leim" "egg-kwnn-leim" "egg-cwnn-leim")) +; (when (featurep 'mule) "egg-sj3-leim") ;; SKK is now a package -; (when-feature mule "skk-leim") +; (when (featurep 'mule) "skk-leim") ;; Enable Mule capability for Gnus, mail, etc... ;; Moved to sunpro-load.el - the default only for Sun. @@ -197,7 +205,8 @@ ;; needs access to the charsets created by the above ;; language-specific files. - (when-feature (and mule mswindows) "mule-msw-init-late") + (when (and (featurep 'mule) (valid-console-type-p 'mswindows)) + "mule-msw-init-late") ;;; mule-load.el ends here @@ -205,67 +214,78 @@ ;; id-menus is not here. infodock needs to figure out a clever way to ;; advise this stuff or we need to export a clean way for infodock or ;; others to control this programmatically. - (when-feature (and infodock (or x mswindows gtk) menubar) "id-menus") + (when (featurep '(and infodock (or x mswindows gtk) menubar)) + "id-menus") ;; preload the X code. - (when-feature x "x-iso8859-1") - (when-feature x "x-mouse") - (when-feature x "x-select") - (when-feature (and x scrollbar) "x-scrollbar") - (when-feature x "x-misc") - (when-feature x "x-init") - (when-feature x "x-win-xfree86") - (when-feature x "x-win-sun") -;; preload the GTK code - (when-feature gtk "gtk-ffi") - (when-feature gtk "gtk-widgets") - (when-feature gtk "gdk") - (when-feature gtk "gtk-init") - (when-feature gtk "gtk-iso8859-1") - (when-feature (and gtk dialog) "dialog-gtk") - (when-feature gtk "gtk-select") - (when-feature gtk "gtk-mouse") - (when-feature gtk "gtk-glyphs") - (when-feature glade "glade") - (when-feature gtk "widgets-gtk") + (when (featurep '(and x scrollbar)) "x-scrollbar") + (when (featurep 'x) + '("x-iso8859-1" + "x-mouse" + "x-select" + "x-misc" + "x-init" + "x-win-xfree86" + "x-win-sun")) + ;; preload the GTK code + (when (featurep 'gtk) + '("gtk-ffi" + "gtk-widgets" + "gdk" + "gtk-init" + "gtk-iso8859-1" + "gtk-select" + "gtk-mouse" + "gtk-glyphs" + "widgets-gtk")) + (when (featurep '(and gtk dialog)) "dialog-gtk") + (when (featurep 'glade) "glade") ;; preload the mswindows code. - (when-feature mswindows "msw-glyphs") - (when-feature mswindows "msw-mouse") - (when-feature mswindows "msw-init") - (when-feature mswindows "msw-select") + (when (valid-console-type-p 'mswindows) + '("msw-glyphs" + "msw-mouse" + "msw-init" + "msw-select")) ;; preload the TTY init code. - (when-feature tty "tty-init") + (when (featurep 'tty) "tty-init") ;;; Formerly in tooltalk/tooltalk-load.el ;; Moved to tooltalk package - ;; (when-feature tooltalk "tooltalk-macros") - ;; (when-feature tooltalk "tooltalk-util") - ;; (when-feature tooltalk "tooltalk-init") + ;; (when (featurep 'tooltalk) + ;; '("tooltalk-macros" "tooltalk-util" "tooltalk-init")) ;; "vc-hooks" ; Packaged. Available in two versions. ;; "ediff-hook" ; Packaged. - "fontl-hooks" - "auto-show" - "resize-minibuffer" - (when-feature ldap "ldap") + "fontl-hooks" + "auto-show" + "resize-minibuffer" + (when (featurep 'ldap) "ldap") -;; (when-feature energize "energize/energize-load.el") +;; (when (featurep 'energize) "energize/energize-load.el") ;;; formerly in sunpro/sunpro-load.el -;; (when-feature (and mule sparcworks) "mime-setup") +;; (when (featurep '(and mule sparcworks)) "mime-setup") ;; Moved to Sun package - ;; (when-feature sparcworks "cc-mode") ; Requires cc-mode package - ;; (when-feature sparcworks "sunpro-init") - ;; (when-feature sparcworks "ring") - ;; (when-feature sparcworks "comint") ; Requires comint package - ;; (when-feature sparcworks "annotations") + ;; (when (featurep 'sparcworks) + ;; '("cc-mode" ; Requires cc-mode package + ;; "sunpro-init" + ;; "ring" + ;; "comint" ; Requires comint package + ;; "annotations")) ;;; formerly in eos/sun-eos-load.el -;; (when-feature sparcworks "sun-eos-init") -;; (when-feature sparcworks "sun-eos-common") -;; (when-feature sparcworks "sun-eos-editor") -;; (when-feature sparcworks "sun-eos-browser") -;; (when-feature sparcworks "sun-eos-debugger") -;; (when-feature sparcworks "sun-eos-debugger-extra") -;; (when-feature sparcworks "sun-eos-menubar") - "loadhist" ; Must be dumped before loaddefs is loaded - "loaddefs" ; <=== autoloads get loaded here -)) + ;; (when (featurep 'sparcworks) + ;; '("sun-eos-init" + ;; "sun-eos-common" + ;; "sun-eos-editor" + ;; "sun-eos-browser" + ;; "sun-eos-debugger" + ;; "sun-eos-debugger-extra" + ;; "sun-eos-menubar")) + "loadhist" ; Must be dumped before loaddefs is loaded + "loaddefs" ; <=== autoloads get loaded here + )) + +(setq preloaded-file-list + (apply #'nconc + (mapcar #'(lambda (x) + (if (listp x) x (list x))) + preloaded-file-list)))
--- a/lisp/finder.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/finder.el Thu Feb 20 08:19:44 2003 +0000 @@ -153,7 +153,7 @@ arguments compiles from `load-path'." (save-excursion ;; XEmacs change - (find-file "finder-inf.el") + (find-file (expand-file-name "finder-inf.el" lisp-directory)) (let ((processed nil) (directory-abbrev-alist (append
--- a/lisp/loadup.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/loadup.el Thu Feb 20 08:19:44 2003 +0000 @@ -93,9 +93,6 @@ ;; We don't want to have any undo records in the dumped XEmacs. (buffer-disable-undo (get-buffer "*scratch*")) - ;; Load our first bootstrap support - (load "very-early-lisp.el") - ;; lread.c (or src/Makefile.in.in) has prepended ;; "${srcdir}/../lisp/" to load-path, which is how this file ;; has been found. At this point, enough of XEmacs has been
--- a/lisp/make-docfile.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/make-docfile.el Thu Feb 20 08:19:44 2003 +0000 @@ -137,7 +137,6 @@ ;; Then process the autoloads (setq autoload-file-name "auto-autoloads.elc") -(load "very-early-lisp.el") (load "find-paths.el") (load "packages.el") (load "setup-paths.el")
--- a/lisp/msw-glyphs.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/msw-glyphs.el Thu Feb 20 08:19:44 2003 +0000 @@ -30,7 +30,7 @@ ;; Initialization code for MS Windows glyphs. -;; This file is dumped with XEmacs (when MS Windows support is +;; This file is dumped with XEmacs (when MS Windows display support is ;; compiled in). Make sure this is the first of msw-*.el files ;; dumped.
--- a/lisp/mule/mule-msw-init.el Thu Feb 20 08:16:21 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +0,0 @@ -;;; mule-msw-init.el --- initialization code for MS Windows under MULE -;;; Copyright (C) 2001, 2002 Ben Wing. - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -(make-coding-system - 'mswindows-multibyte 'mswindows-multibyte - "MS Windows Multibyte (current code page)" - '(mnemonic "MSW-MB" - documentation - "MS Windows multibyte -- current code page. - -This implements the encoding specified by the current code page -- -i.e. the ANSI code page corresponding to the current locale, as -returned by - - (mswindows-locale-code-page (mswindows-current-locale)) -" - locale current - code-page ansi)) - -;; we temporarily aliased this to raw-text in intl-win32.c. -(define-coding-system-alias 'mswindows-multibyte-system-default nil) -(make-coding-system - 'mswindows-multibyte-system-default 'mswindows-multibyte - "MS Windows Multibyte (system default code page)" - '(mnemonic "MSW-MB-SysDef" - documentation - "MS Windows multibyte -- system default code page. - -This implements the encoding specified by the system default code page --- i.e. the ANSI code page corresponding to the system default locale, -as returned by - - (mswindows-locale-code-page (mswindows-system-default-locale)) -" - locale system-default - code-page ansi)) - -(make-coding-system - 'mswindows-multibyte-user-default 'mswindows-multibyte - "MS Windows Multibyte (user default code page)" - '(mnemonic "MSW-MB-UserDef" - documentation - "MS Windows multibyte -- user default code page. - -This implements the encoding specified by the user default code page --- i.e. the ANSI code page corresponding to the user default locale, -as returned by - - (mswindows-locale-code-page (mswindows-user-default-locale)) -" - locale user-default - code-page ansi)) - -(make-coding-system - 'mswindows-multibyte-oem 'mswindows-multibyte - "MS Windows Multibyte (current OEM code page)" - '(mnemonic "MSW-MB-OEM" - documentation - "MS Windows multibyte -- current OEM code page. - -This implements the encoding specified by the current OEM code page --- i.e. the OEM code page corresponding to the current locale, -as returned by - - (mswindows-locale-oem-code-page (mswindows-current-locale)) -" - locale current - code-page oem)) - -(make-coding-system - 'mswindows-multibyte-oem-system-default 'mswindows-multibyte - "MS Windows Multibyte (system default OEM code page)" - '(mnemonic "MSW-MB-OEM-SysDef" - documentation - "MS Windows multibyte -- system default OEM code page. - -This implements the encoding specified by the system default OEM code page --- i.e. the OEM code page corresponding to the system default locale, -as returned by - - (mswindows-locale-oem-code-page (mswindows-system-default-locale)) -" - locale system-default - code-page oem)) - -(make-coding-system - 'mswindows-multibyte-oem-user-default 'mswindows-multibyte - "MS Windows Multibyte (user default OEM code page)" - '(mnemonic "MSW-MB-OEM-UserDef" - documentation - "MS Windows multibyte -- user default OEM code page. - -This implements the encoding specified by the user default OEM code page --- i.e. the OEM code page corresponding to the user default locale, -as returned by - - (mswindows-locale-oem-code-page (mswindows-user-default-locale)) -" - locale user-default - code-page oem)) - -(let ((cplist - '(("EBCDIC" 037 "EBCDIC") - ("OEM" 437 "MS-DOS United States") - ("EBCDIC" 500 "EBCDIC \"500V1\"") - ("OEM" 708 "Arabic (ASMO 708)") - ("OEM" 709 "Arabic (ASMO 449+, BCON V4)") - ("OEM" 710 "Arabic (Transparent Arabic)") - ("OEM" 720 "Arabic (Transparent ASMO)") - ("OEM" 737 "Greek (formerly 437G)") - ("OEM" 775 "Baltic") - ("OEM" 850 "MS-DOS Multilingual (Latin I)") - ("OEM" 852 "MS-DOS Slavic (Latin II)") - ("OEM" 855 "IBM Cyrillic (primarily Russian)") - ("OEM" 857 "IBM Turkish") - ("OEM" 860 "MS-DOS Portuguese") - ("OEM" 861 "MS-DOS Icelandic") - ("OEM" 862 "Hebrew") - ("OEM" 863 "MS-DOS Canadian-French") - ("OEM" 864 "Arabic") - ("OEM" 865 "MS-DOS Nordic") - ("OEM" 866 "MS-DOS Russian") - ("OEM" 869 "IBM Modern Greek") - ("Ansi/OEM" 874 "Thai") - ("EBCDIC" 875 "EBCDIC") - ("Ansi/OEM" 932 "Japanese") - ("Ansi/OEM" 936 "Chinese (PRC, Singapore)") - ("Ansi/OEM" 949 "Korean") - ("Ansi/OEM" 950 "Chinese (Taiwan; Hong Kong SAR, PRC)") - ("EBCDIC" 1026 "EBCDIC") - ("ANSI" 1200 "Unicode (BMP of ISO 10646)") - ("ANSI" 1250 "Windows 3.1 Eastern European") - ("ANSI" 1251 "Windows 3.1 Cyrillic") - ("ANSI" 1252 "Windows 3.1 US (ANSI)") - ("ANSI" 1253 "Windows 3.1 Greek") - ("ANSI" 1254 "Windows 3.1 Turkish") - ("ANSI" 1255 "Hebrew") - ("ANSI" 1256 "Arabic") - ("ANSI" 1257 "Baltic") - ("ANSI" 1258 "VietNam") - ("Ansi/OEM" 1361 "Korean (Johab)") - ("Mac" 10000 "Macintosh Roman") - ("Mac" 10001 "Macintosh Japanese") - ("Mac" 10006 "Macintosh Greek I") - ("Mac" 10007 "Macintosh Cyrillic") - ("Mac" 10029 "Macintosh Latin 2") - ("Mac" 10079 "Macintosh Icelandic") - ("Mac" 10081 "Macintosh Turkish")))) - (dolist (cpprops cplist) - (let ((ansioem (first cpprops)) - (cp (second cpprops)) - (name (third cpprops))) - (make-coding-system - (intern (format "windows-%s" cp)) - 'mswindows-multibyte - (format "MS Windows code page %s (%s, %s)" cp ansioem name) - `(mnemonic - ,(format "MSW-%s" cp) - code-page ,cp - documentation - ,(format - "MS Windows Multibyte -- code page %s (%s, %s). - -This implements the encoding specified by code page %s. -For more information on code pages, see `mswindows-charset-code-page'." - cp ansioem name cp))))))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/mule/mule-win32-init.el Thu Feb 20 08:19:44 2003 +0000 @@ -0,0 +1,183 @@ +;;; mule-win32-init.el --- initialization code for MS Windows/Cygwin under MULE +;;; Copyright (C) 2001, 2002 Ben Wing. + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +(make-coding-system + 'mswindows-multibyte 'mswindows-multibyte + "MS Windows Multibyte (current code page)" + '(mnemonic "MSW-MB" + documentation + "MS Windows multibyte -- current code page. + +This implements the encoding specified by the current code page -- +i.e. the ANSI code page corresponding to the current locale, as +returned by + + (mswindows-locale-code-page (mswindows-current-locale)) +" + locale current + code-page ansi)) + +;; we temporarily aliased this to raw-text in intl-win32.c. +(define-coding-system-alias 'mswindows-multibyte-system-default nil) +(make-coding-system + 'mswindows-multibyte-system-default 'mswindows-multibyte + "MS Windows Multibyte (system default code page)" + '(mnemonic "MSW-MB-SysDef" + documentation + "MS Windows multibyte -- system default code page. + +This implements the encoding specified by the system default code page +-- i.e. the ANSI code page corresponding to the system default locale, +as returned by + + (mswindows-locale-code-page (mswindows-system-default-locale)) +" + locale system-default + code-page ansi)) + +(make-coding-system + 'mswindows-multibyte-user-default 'mswindows-multibyte + "MS Windows Multibyte (user default code page)" + '(mnemonic "MSW-MB-UserDef" + documentation + "MS Windows multibyte -- user default code page. + +This implements the encoding specified by the user default code page +-- i.e. the ANSI code page corresponding to the user default locale, +as returned by + + (mswindows-locale-code-page (mswindows-user-default-locale)) +" + locale user-default + code-page ansi)) + +(make-coding-system + 'mswindows-multibyte-oem 'mswindows-multibyte + "MS Windows Multibyte (current OEM code page)" + '(mnemonic "MSW-MB-OEM" + documentation + "MS Windows multibyte -- current OEM code page. + +This implements the encoding specified by the current OEM code page +-- i.e. the OEM code page corresponding to the current locale, +as returned by + + (mswindows-locale-oem-code-page (mswindows-current-locale)) +" + locale current + code-page oem)) + +(make-coding-system + 'mswindows-multibyte-oem-system-default 'mswindows-multibyte + "MS Windows Multibyte (system default OEM code page)" + '(mnemonic "MSW-MB-OEM-SysDef" + documentation + "MS Windows multibyte -- system default OEM code page. + +This implements the encoding specified by the system default OEM code page +-- i.e. the OEM code page corresponding to the system default locale, +as returned by + + (mswindows-locale-oem-code-page (mswindows-system-default-locale)) +" + locale system-default + code-page oem)) + +(make-coding-system + 'mswindows-multibyte-oem-user-default 'mswindows-multibyte + "MS Windows Multibyte (user default OEM code page)" + '(mnemonic "MSW-MB-OEM-UserDef" + documentation + "MS Windows multibyte -- user default OEM code page. + +This implements the encoding specified by the user default OEM code page +-- i.e. the OEM code page corresponding to the user default locale, +as returned by + + (mswindows-locale-oem-code-page (mswindows-user-default-locale)) +" + locale user-default + code-page oem)) + +(let ((cplist + '(("EBCDIC" 037 "EBCDIC") + ("OEM" 437 "MS-DOS United States") + ("EBCDIC" 500 "EBCDIC \"500V1\"") + ("OEM" 708 "Arabic (ASMO 708)") + ("OEM" 709 "Arabic (ASMO 449+, BCON V4)") + ("OEM" 710 "Arabic (Transparent Arabic)") + ("OEM" 720 "Arabic (Transparent ASMO)") + ("OEM" 737 "Greek (formerly 437G)") + ("OEM" 775 "Baltic") + ("OEM" 850 "MS-DOS Multilingual (Latin I)") + ("OEM" 852 "MS-DOS Slavic (Latin II)") + ("OEM" 855 "IBM Cyrillic (primarily Russian)") + ("OEM" 857 "IBM Turkish") + ("OEM" 860 "MS-DOS Portuguese") + ("OEM" 861 "MS-DOS Icelandic") + ("OEM" 862 "Hebrew") + ("OEM" 863 "MS-DOS Canadian-French") + ("OEM" 864 "Arabic") + ("OEM" 865 "MS-DOS Nordic") + ("OEM" 866 "MS-DOS Russian") + ("OEM" 869 "IBM Modern Greek") + ("Ansi/OEM" 874 "Thai") + ("EBCDIC" 875 "EBCDIC") + ("Ansi/OEM" 932 "Japanese") + ("Ansi/OEM" 936 "Chinese (PRC, Singapore)") + ("Ansi/OEM" 949 "Korean") + ("Ansi/OEM" 950 "Chinese (Taiwan; Hong Kong SAR, PRC)") + ("EBCDIC" 1026 "EBCDIC") + ("ANSI" 1200 "Unicode (BMP of ISO 10646)") + ("ANSI" 1250 "Windows 3.1 Eastern European") + ("ANSI" 1251 "Windows 3.1 Cyrillic") + ("ANSI" 1252 "Windows 3.1 US (ANSI)") + ("ANSI" 1253 "Windows 3.1 Greek") + ("ANSI" 1254 "Windows 3.1 Turkish") + ("ANSI" 1255 "Hebrew") + ("ANSI" 1256 "Arabic") + ("ANSI" 1257 "Baltic") + ("ANSI" 1258 "VietNam") + ("Ansi/OEM" 1361 "Korean (Johab)") + ("Mac" 10000 "Macintosh Roman") + ("Mac" 10001 "Macintosh Japanese") + ("Mac" 10006 "Macintosh Greek I") + ("Mac" 10007 "Macintosh Cyrillic") + ("Mac" 10029 "Macintosh Latin 2") + ("Mac" 10079 "Macintosh Icelandic") + ("Mac" 10081 "Macintosh Turkish")))) + (dolist (cpprops cplist) + (let ((ansioem (first cpprops)) + (cp (second cpprops)) + (name (third cpprops))) + (make-coding-system + (intern (format "windows-%s" cp)) + 'mswindows-multibyte + (format "MS Windows code page %s (%s, %s)" cp ansioem name) + `(mnemonic + ,(format "MSW-%s" cp) + code-page ,cp + documentation + ,(format + "MS Windows Multibyte -- code page %s (%s, %s). + +This implements the encoding specified by code page %s. +For more information on code pages, see `mswindows-charset-code-page'." + cp ansioem name cp))))))
--- a/lisp/packages.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/packages.el Thu Feb 20 08:19:44 2003 +0000 @@ -178,8 +178,7 @@ '("paths.el" "dumped-lisp.el" "dumped-pkg-lisp.el" - "version.el" - "very-early-lisp.el") + "version.el") "Lisp packages that should not be byte compiled.")
--- a/lisp/update-elc-2.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/update-elc-2.el Thu Feb 20 08:19:44 2003 +0000 @@ -66,8 +66,7 @@ "^site-start\\.el$" "^site-load\\.el$" "^site-init\\.el$" - "^version\\.el$" - "^very-early-lisp\\.el$")) + "^version\\.el$")) (defvar dirfiles-table (make-hash-table :test 'equal))
--- a/lisp/update-elc.el Thu Feb 20 08:16:21 2003 +0000 +++ b/lisp/update-elc.el Thu Feb 20 08:19:44 2003 +0000 @@ -81,7 +81,6 @@ (let ((build-root (expand-file-name ".." invocation-directory))) (setq load-path (list (expand-file-name "lisp" build-root)))) -(load "very-early-lisp.el") (load "find-paths.el") (load "packages.el") (load "setup-paths.el") @@ -108,8 +107,7 @@ "dumped-lisp.el" "dumped-pkg-lisp.el" "raw-process.el" - "version.el" - "very-early-lisp.el") + "version.el") "Lisp files that should not be byte compiled.") (defvar lisp-files-ignored-when-checking-for-autoload-updating @@ -311,13 +309,8 @@ (not need-to-rebuild-mule-autoloads) (not need-to-recompile-autoloads) (not need-to-recompile-mule-autoloads)) - ;; (1) Nothing to do at all. BYTECOMPILE_CHANGE is used (only by - ;; the Unix makefile) to indicate whether some files needed - ;; for dump got recompiled, and hence the executable must be - ;; redumped. We remove it if there were no files to compile. - (condition-case nil - (delete-file "../src/BYTECOMPILE_CHANGE") - (file-error nil))) + ;; (1) Nothing to do at all. + ) ((not update-elc-files-to-compile) ;; (2) We have no files to byte-compile, but we do need to ;; regenerate and compile the auto-autoloads file, so signal @@ -328,9 +321,7 @@ (condition-case nil (write-region-internal "foo" nil "../src/REBUILD_AUTOLOADS") (file-error nil)) - (condition-case nil - (delete-file "../src/BYTECOMPILE_CHANGE") - (file-error nil))) + ) (t (let ((bc-bootstrap (mapcar #'(lambda (arg)
--- a/lisp/very-early-lisp.el Thu Feb 20 08:16:21 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -;;; very-early-lisp.el --- Lisp support always needed by temacs - -;; Copyright (C) 1998 by Free Software Foundation, Inc. - -;; Author: SL Baur <steve@xemacs.org> -;; Michael Sperber [Mr. Preprocessor] <sperber@Informatik.Uni-Tuebingen.De> -;; Keywords: internal, dumped - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Synched up with: Not in FSF - -;;; Commentary: - -;; This file must be loaded by temacs if temacs is to process bytecode or -;; dumped-lisp.el files. The functions in here are used by dumped-lisp.el, -;; and by files called dumped-lisp.el in packages when they need to have -;; stuff dumped into XEmacs. (???? I thought we got rid of this entirely. -;; The only thing left is egg-its/dumped-lisp.el. We should fix it, then -;; combine this file into our own dumped-lisp.el. --ben - -;;; Code: - -;;; Intended replacement for read-time Lisp reader macros #-, #+ - -(defmacro assemble-list (&rest components) - "Assemble a list from COMPONENTS. -This is a poor man's backquote: -COMPONENTS is a list, each element of which is macro-expanded. -Each macro-expanded element either has the form (SPLICE stuff), -in which case stuff must be a list which is spliced into the result. -Otherwise, the component becomes an element of the list." - (cons - 'append - (mapcar #'(lambda (component) - (let ((component (macroexpand-internal component))) - (if (and (consp component) - (eq 'splice (car component))) - (car (cdr component)) - (list 'list component)))) - components))) - -(defmacro when-feature (feature stuff) - "Insert STUFF as a list element if FEATURE is a loaded feature. -This is intended for use as a component of ASSEMBLE-LIST." - (list 'splice - (list 'if (list 'featurep (list 'quote feature)) - (list 'list stuff) - '()))) - -(defmacro unless-feature (feature stuff) - "Insert STUFF as a list element if FEATURE is NOT a loaded feature. -This is intended for use as a component of ASSEMBLE-LIST." - (list 'splice - (list 'if (list 'featurep (list 'quote feature)) - '() - (list 'list stuff)))) - -(provide 'very-early-lisp) - -;;; very-early-lisp.el ends here
--- a/nt/ChangeLog Thu Feb 20 08:16:21 2003 +0000 +++ b/nt/ChangeLog Thu Feb 20 08:19:44 2003 +0000 @@ -1,3 +1,34 @@ +2003-02-19 Ben Wing <ben@xemacs.org> + + * xemacs.mak (DO_TEMACS): New. + * xemacs.mak (DO_XEMACS): New. + * xemacs.mak (TEMACS_BATCH): + * xemacs.mak (temacs_loadup_args): New. + * xemacs.mak (dump_temacs_args): New. + * xemacs.mak (run_temacs_args): New. + * xemacs.mak (dump_temacs): + * xemacs.mak (blddir): Removed. + * xemacs.mak (temacs_loadup): Removed. + * xemacs.mak (run_temacs): Removed. + * xemacs.mak (check): + * xemacs.mak (check-temacs): + * xemacs.mak (check-features): New. + * xemacs.mak (makeinfo-test): + * xemacs.mak (LOADPATH): Removed. + * xemacs.mak (update-elc): + * xemacs.mak (update-elc-2): + * xemacs.mak (load-shadows): New. + * xemacs.mak (all): + * xemacs.mak (OS): + Add macros DO_TEMACS, DO_XEMACS, and a few others; this macro + section is now completely in sync with src/Makefile.in.in. Copy + check-features, load-shadows, and rebuilding finder-inf.el from + src/Makefile.in.in. The main build/dump/recompile process is now + synchronized with src/Makefile.in.in. Change `WARNING' to `NOTE' + and `error checking' to `error-checking' TO avoid tripping + faux warnings and errors in the VC++ IDE. + + 2003-02-16 Steve Youngs <youngs@xemacs.org> * XEmacs 21.5.11 "cabbage" is released.
--- a/nt/xemacs.mak Thu Feb 20 08:16:21 2003 +0000 +++ b/nt/xemacs.mak Thu Feb 20 08:19:44 2003 +0000 @@ -1046,32 +1046,38 @@ PROGNAME = $(TEMACS_DIR)\xemacs.exe +DO_TEMACS = "$(LIB_SRC)\i" "$(TEMACS)" +DO_XEMACS = "$(LIB_SRC)\i" "$(PROGNAME)" + BATCH = -no-packages -batch BATCH_PACKAGES = -vanilla -batch -TEMACS_BATCH = "$(LIB_SRC)\i" "$(TEMACS)" $(BATCH) -XEMACS_BATCH = "$(LIB_SRC)\i" "$(PROGNAME)" $(BATCH) -XEMACS_BATCH_PACKAGES = "$(LIB_SRC)\i" "$(PROGNAME)" $(BATCH_PACKAGES) - +TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH) +XEMACS_BATCH = $(DO_XEMACS) $(BATCH) +XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES) +temacs_loadup_args = -l $(LISP)/loadup.el +dump_temacs_args = $(temacs_loadup_args) dump +run_temacs_args = $(temacs_loadup_args) run-temacs +dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args) # Section handling automated tests starts here -blddir=$(MAKEDIR:\=\\)\\.. -temacs_loadup= -dump_temacs = $(temacs_loadup) dump -run_temacs = $(temacs_loadup) run-temacs ## We have automated tests!! -testdir=../tests/automated -batch_test_emacs=$(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir) +testdir = ../tests/automated +batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir) # .PHONY: check check-temacs check: cd $(TEMACS_DIR) - $(PROGNAME) $(batch_test_emacs) + $(DO_XEMACS) $(batch_test_emacs) check-temacs: cd $(TEMACS_DIR) - $(TEMACS_BATCH) -l $(LISP)/loadup.el run-temacs $(batch_test_emacs) + $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs) + +check-features: all + cd $(TEMACS_DIR) + $(XEMACS_BATCH) -l check-features.el # Section handling automated tests ends here @@ -1285,8 +1291,8 @@ @echo XEmacs 'info' cannot be built! @echo Install XEmacs package 'texinfo' (see README.packages). :suggest_makeinfo -@echo Consider specifying path to makeinfo program: MAKEINFO=path -@echo as this will build info docs faster than XEmacs using 'texinfo'. +@echo Consider specifying path to 'makeinfo' in config.inc. +@echo as this will build the info docs much faster than XEmacs using 'texinfo'. @if errorlevel 1 exit 1 :test_done <<NOKEEP @@ -1295,10 +1301,6 @@ #------------------------------------------------------------------------------ -# LISP bits 'n bobs - -LOADPATH=$(LISP) - # Rebuild docfile target DOC=$(LIB_SRC)\DOC @@ -1323,11 +1325,23 @@ cd $(TEMACS_DIR) $(TEMACS_BATCH) -l $(LISP)\update-elc.el -# Update out-of-date .elcs, other than needed for dumping. +## Update out-of-date .elcs, other than needed for dumping. update-elc-2: $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP) -# This file is touched by update-elc.el when redumping is necessary. +$(LISP)/finder-inf.el: + @echo Building finder database ... + $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \ + -l finder -f finder-compile-keywords + @echo Building finder database ...(done) + +load-shadows: +!if !$(QUICK_BUILD) + @echo Testing for Lisp shadows ... + @$(XEMACS_BATCH) -f list-load-path-shadows +!endif + +## This file is touched by update-elc.el when redumping is necessary. $(TEMACS_DIR)\NEEDTODUMP : @echo >$(TEMACS_DIR)\NEEDTODUMP @@ -1351,7 +1365,7 @@ # use this rule to build the complete system all: installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \ $(LIB_SRC_TOOLS) $(TEMACS) update-elc $(DOC) $(PROGNAME) \ - update-elc-2 info + update-elc-2 $(LISP)/finder-inf.el load-shadows info temacs: $(LASTFILE) $(TEMACS) @@ -1499,20 +1513,20 @@ !endif !if $(HAVE_GTK) -------------------------------------------------------------------- - WARNING: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support. - WARNING: gtk-xemacs is not currently supported on MS Windows (mingw or msvc). - WARNING: Yes, we know that gtk has been ported to native MS Windows, but - WARNING: XEmacs is not yet ready to use that port. + NOTE: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support. + NOTE: gtk-xemacs is not currently supported on MS Windows (mingw or msvc). + NOTE: Yes, we know that gtk has been ported to native MS Windows, but + NOTE: XEmacs is not yet ready to use that port. -------------------------------------------------------------------- !endif !if $(HAVE_XPM) Compiling in support for XPM images. !else -------------------------------------------------------------------- - WARNING: Compiling without XPM support. - WARNING: You should strongly consider installing XPM. - WARNING: Otherwise toolbars and other graphics will look suboptimal. - WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux) + NOTE: Compiling without XPM support. + NOTE: You should strongly consider installing XPM. + NOTE: Otherwise toolbars and other graphics will look suboptimal. + NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux) -------------------------------------------------------------------- !endif !if $(HAVE_GIF) @@ -1522,10 +1536,10 @@ Compiling in support for PNG images. !else -------------------------------------------------------------------- - WARNING: Compiling without PNG image support. - WARNING: You should strongly consider installing the PNG libraries. - WARNING: Otherwise certain images and glyphs may not display. - WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux + NOTE: Compiling without PNG image support. + NOTE: You should strongly consider installing the PNG libraries. + NOTE: Otherwise certain images and glyphs may not display. + NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux -------------------------------------------------------------------- !endif !if $(HAVE_TIFF) @@ -1554,12 +1568,12 @@ !endif !if $(USE_UNION_TYPE) Using union type for Lisp object storage. - WARNING: --------------------------------------------------------- - WARNING: This tends to trigger compiler bugs, especially when combined - WARNING: with MULE and ERROR_CHECKING. Crashes in pdump have recently - WARNING: been observed using Visual C++ in combination with union type, - WARNING: MULE, and ERROR_CHECKING. - WARNING: --------------------------------------------------------- + NOTE: --------------------------------------------------------- + NOTE: This tends to trigger compiler bugs, especially when combined + NOTE: with MULE and ERROR_CHECKING. Crashes in pdump have recently + NOTE: been observed using Visual C++ in combination with union type, + NOTE: MULE, and ERROR_CHECKING. + NOTE: --------------------------------------------------------- !endif !if $(USE_PORTABLE_DUMPER) Using portable dumper. @@ -1572,11 +1586,11 @@ !endif !if $(ERROR_CHECK_ALL) Compiling in extra internal error-checking. - WARNING: --------------------------------------------------------- - WARNING: Compiling in support for runtime error checking. - WARNING: XEmacs will run noticeably more slowly as a result. - WARNING: Error checking is on by default for XEmacs beta releases. - WARNING: --------------------------------------------------------- + NOTE: --------------------------------------------------------- + NOTE: Compiling in support for runtime error-checking. + NOTE: XEmacs will run noticeably more slowly as a result. + NOTE: Error-checking is on by default for XEmacs beta releases. + NOTE: --------------------------------------------------------- !endif !if $(DEBUG_XEMACS) Compiling in debugging support (no slowdown).
--- a/src/ChangeLog Thu Feb 20 08:16:21 2003 +0000 +++ b/src/ChangeLog Thu Feb 20 08:19:44 2003 +0000 @@ -1,3 +1,207 @@ +2003-02-19 Ben Wing <ben@xemacs.org> + + * Makefile.in.in (all): New. + * Makefile.in.in (EXE_TARGET): + * Makefile.in.in (X11_libs): + * Makefile.in.in (external_widget_objs): + * Makefile.in.in (other_files): + * Makefile.in.in (extw_link_beg): Removed. + * Makefile.in.in (mo_file): + * Makefile.in.in (extw_link_mid): Removed. + * Makefile.in.in (extw_link_end): Removed. + * Makefile.in.in (temacs_loadup): Removed. + * Makefile.in.in (run_temacs): Removed. + * Makefile.in.in (dump_temacs): + * Makefile.in.in (DO_TEMACS): New. + * Makefile.in.in (DO_XEMACS): New. + * Makefile.in.in (debug_temacs): + * Makefile.in.in (LISP): New. + * Makefile.in.in (BATCH): New. + * Makefile.in.in (BATCH_PACKAGES): New. + * Makefile.in.in (TEMACS_BATCH): New. + * Makefile.in.in (XEMACS_BATCH): New. + * Makefile.in.in (XEMACS_BATCH_PACKAGES): New. + * Makefile.in.in (temacs_loadup_args): New. + * Makefile.in.in (dump_temacs_args): New. + * Makefile.in.in (run_temacs_args): New. + * Makefile.in.in (release): + * Makefile.in.in (build-the-mofo): New. + * Makefile.in.in (update-elc): New. + * Makefile.in.in (update-elc-2): New. + * Makefile.in.in (load-shadows): New. + * Makefile.in.in (NEEDTODUMP): New. + * Makefile.in.in (obj_src): + * Makefile.in.in (FRC.update-elc.stamp): Removed. + * Makefile.in.in (update-elc.stamp): Removed. + * Makefile.in.in (dortl): Removed. + * Makefile.in.in (link_deps): New. + * Makefile.in.in (temacs_deps): New. + * Makefile.in.in (temacs_link_args): New. + * Makefile.in.in (dump-id.c): New. + * Makefile.in.in (TopLevelEmacsShell.o): + * Makefile.in.in (LINT.c): Removed. + * Makefile.in.in (LINTFILES): Removed. + * Makefile.in.in (LINTINCLUDES): Removed. + * Makefile.in.in (LINTFLAGS): Removed. + * Makefile.in.in (lint): Removed. + * Makefile.in.in (dump_elcs): Removed. + * Makefile.in.in (all-elc): New. + * Makefile.in.in (dump-elcs): Removed. + * Makefile.in.in (run-temacs): Removed. + * Makefile.in.in (testdir): Removed. + * Makefile.in.in (batch_test_emacs): Removed. + * Makefile.in.in (check-temacs): Removed. + * Makefile.in.in (rtc_patch.o): Removed. + * Makefile.in.in (rtcmacs): Removed. + * Makefile.in.in (run-rtcmacs): Removed. + * Makefile.in.in (debug-temacs): Removed. + * Makefile.in.in (PURIFY_PROG): Removed. + * Makefile.in.in (PURIFY_LIBS): Removed. + * Makefile.in.in (PURIFY_FLAGS): Removed. + * Makefile.in.in (puremacs): Removed. + * Makefile.in.in (libextcli_Xlib.a): + * Makefile.in.in (QUANTIFY_PROG): Removed. + * Makefile.in.in (QUANTIFY_HOME): Removed. + * Makefile.in.in (QUANTIFY_FLAGS): Removed. + * Makefile.in.in (quantmacs): Removed. + * Makefile.in.in (PURECOV_PROG): Removed. + * Makefile.in.in (covmacs): Removed. + * Makefile.in.in (xemacs_res.o): + * Makefile.in.in (clean): + + Major surgery. Move all stuff related to building anything in the + src/ directory from top-level Makefile.in.in to here. Simplify + the dependencies. Rearrange into logical subsections. + Synchronize the main compile/dump/build-elcs section with + xemacs.mak, which is already clean and in good working order. + Remove weirdo targets like `all-elc[s]', dump-elc[s], etc. Add + additional levels of macros \(e.g. DO_TEMACS, DO_XEMACS, + TEMACS_BATCH, XEMACS_BATCH, XEMACS_BATCH_PACKAGES) to factor out + duplicated stuff. Clean up handling of "HEAP_IN_DATA" (Cygwin) so + it doesn't need to ignore the return value from dumping. Add + .NO_PARALLEL since various aspects of building and dumping must be + serialized but do not always have dependencies between them + (this is impossible in some cases). Everything related to src/ + now gets built in one pass in this directory by just running + `make' (except the Makefiles themselves and config.h, paths.h, + Emacs.ad.h, and other generated .h files). + + * console.c (Fvalid_console_type_p): + Update list of possibly valid console types. + + * emacs.c: + * emacs.c (check_compatible_window_system): + * emacs.c (main_1): + * emacs.c (standard_args): + * emacs.c (sort_args): + * emacs.c (main): + Rationalize the specifying and handling of the type of the first + frame. This was originally prompted by a workspace in which I got + GTK to compile under C++ and in the process fixed it so it could + coexist with X in the same build -- hence, a combined + TTY/X/MS-Windows/GTK build is now possible under Cygwin. (However, + you can't simultaneously *display* more than one kind of device + connection -- but getting that to work is not that difficult. + Perhaps a project for a bored grad student. I (ben) would do it + but don't see the use.) To make sense of this, I added new + switches that can be used to specifically indicate the window + system: -x [aka --use-x], -tty \[aka --use-tty], -msw [aka + --use-ms-windows], -gtk [aka --use-gtk], and -gnome [aka + --use-gnome, same as --use-gtk]. -nw continues as an alias for + -tty. When none have been given, XEmacs checks for other + parameters implying particular device types (-t -> tty, -display + -> x [or should it have same treatment as DISPLAY below?]), and + has ad-hoc logic afterwards: if env var DISPLAY is set, use x (or + gtk? perhaps should check whether gnome is running), else MS + Windows if it exsits, else TTY if it exists, else stream, and you + must be running in batch mode. This also fixes an existing bug + whereby compiling with no x, no mswin, no tty, when running non- + interactively (e.g. to dump) I get "sorry, must have TTY support". + + * emacs.c (Frun_emacs_from_temacs): + Turn on Vstack_trace_on_error so that errors are debuggable even + when occurring extremely early in reinitialization. + * emacs.c (pause_so_user_can_read_messages): + Try to make sure that the user can see message output under + Windows (i.e. it doesn't just disappear right away) regardless of + when it occurs, e.g. in the middle of creating the first frame. + * emacs.c (Femacs_run_status): + * emacs.c (syms_of_emacs): + Define new function `emacs-run-status', indicating whether XEmacs + is noninteractive or interactive, whether raw, + post-dump/pdump-load or run-temacs, whether we are dumping, + whether pdump is in effect. + + * event-stream.c: + It's "mommas are fat", not "momas are fat". + Fix other typo. + * event-stream.c (Fnext_event): + Conditionalize in_menu_callback check on HAVE_MENUBARS, + because it won't exist on w/o menubar support, + + * lisp.h: + More hackery on RETURN_NOT_REACHED. Cygwin v3.2 DOES complain here + if RETURN_NOT_REACHED() is blank, as it is for GCC 2.5+. So make it + blank only for GCC 2.5 through 2.999999999999999. + + Declare Vstack_trace_on_error. + + * profile.c: + Need to include "profile.h" to fix warnings. + + * sheap.c (report_sheap_usage): + Don't fatal() when need to rerun Make, just stderr_out() and exit(0). + That way we can distinguish between a dumping failing expectedly + (due to lack of stack space, triggering another dump) and unexpectedly, + in which case, we want to stop building. (or go on, if -K is given) + * syntax.c (Fmatching_paren): + * syntax.c (find_start_of_comment): + * syntax.h: + Use ints where they belong, and enum syntaxcode's where they belong, + and fix warnings thereby. + + * syntax.h: + Fix crash caused by an edge condition in the syntax-cache macros. + + * text.h: + * text.h (LISP_STRING_TO_ALLOCA): + * text.h (alloca_ibytes): + Spacing fixes. + + * xmotif.h: + New file, to get around shadowing warnings. + + * EmacsManager.c: + * event-Xt.c: + * glyphs-x.c: + * gui-x.c: + * input-method-motif.c: + * xmmanagerp.h: + * xmprimitivep.h: + Include xmotif.h. + + * alloc.c: + Conditionalize in_malloc on ERROR_CHECK_MALLOC. + + * config.h.in: + * file-coding.h: + * fileio.c: + * getloadavg.c (getloadavg): + * select-x.c: + * signal.c (qxe_setitimer): + * sysdep.c (total_data_usage): + * sysfile.h: + * systime.h: + * text.c (dfc_convert_to_external_format): + * text.c (dfc_convert_to_internal_format): + * unicode.c (dfc_coding_system_is_unicode): + Eliminate HAVE_WIN32_CODING_SYSTEMS, use WIN32_ANY instead. + Replace defined (WIN32_NATIVE) || defined (CYGWIN) with WIN32_ANY. + + * lisp.h: + More futile attempts to walk and chew gum at the same time when + dealing with subr's that don't return. + 2003-02-19 Ben Wing <ben@xemacs.org> * eval.c (unbind_to_hairy):
--- a/src/EmacsManager.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/EmacsManager.c Thu Feb 20 08:19:44 2003 +0000 @@ -28,6 +28,7 @@ #include <X11/StringDefs.h> #include "EmacsManagerP.h" #ifdef LWLIB_MENUBARS_MOTIF +#include "xmotif.h" #include <Xm/RowColumn.h> #endif /* LWLIB_MENUBARS_MOTIF */
--- a/src/Makefile.in.in Thu Feb 20 08:16:21 2003 +0000 +++ b/src/Makefile.in.in Thu Feb 20 08:19:44 2003 +0000 @@ -3,7 +3,7 @@ ## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois ## Copyright (C) 1996, 1997 Sun Microsystems, Inc. ## Copyright (C) 1998, 1999 J. Kean Johnston. -## Copyright (C) 2001, 2002 Ben Wing. +## Copyright (C) 2001, 2002, 2003 Ben Wing. ## This file is part of XEmacs. @@ -24,6 +24,9 @@ ## Synched up with: Not synched with FSF. +.PHONY: all +all: build-the-mofo + PROGNAME=@PROGNAME@ #define NOT_C_CODE @@ -38,9 +41,6 @@ EXE_TARGET = temacs #endif -all: ${DUMP_TARGET} -.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint - ## For performance and consistency, no built-in rules. .SUFFIXES: .SUFFIXES: .c .h .o .i .s .dep @@ -133,15 +133,15 @@ ######################################################################### -## Object files needed for compilation. +## Object files needed for compilation, and other rebuilt files. -## NOTE: Some of the object files are specified in this file, and -## others in configure.in. The general rule is that they be specified -## here whenever they have clear dependencies on configure defines. -## They should be in configure.in when there is no configure define or -## when there is extremely hairy code to determine which files are -## needed (e.g. native sound support) and it would be pointless to -## duplicate that code. +## NOTE: Some of the object files are specified in this file, and others in +## configure.in. The general rule is that they be specified here whenever +## possible -- in practice, that means that they have clear dependencies on +## configure defines. They should be in configure.in when there is no +## configure define or when there is extremely hairy code to determine +## which files are needed (e.g. native sound support) and it would be +## pointless to duplicate that code. gui_objs= gui.o #ifdef HAVE_MENUBARS @@ -377,49 +377,6 @@ # ifdef EXTERNAL_WIDGET external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o -## Now we try to figure out how to link a shared library. -## If we cannot figure it out, leave EXTW_LINK undefined and a shared -## library will not be created. - -# ifdef USE_GCC -# ifdef USG5 -# define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output -extw_link_beg = $(CC) -shared -extw_link_mid = -Xlinker -z -Xlinker text -o -extw_link_end = -## I cannot figure out how to do shared a.out libraries, so just punt. -# elif !defined (LINUX) || defined (__ELF__) -# define EXTW_LINK(objs, output) $(CC) -shared objs -o output -extw_link_beg = $(CC) -shared -extw_link_mid = -o -extw_link_end = -# endif -# elif defined (USG5) -# if defined (IRIX) -# define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output -extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations -extw_link_mid = -o -extw_link_end = -# else /* not IRIX */ -# define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output -extw_link_beg = $(CC) -G -extw_link_mid = -z text -o -extw_link_end = -# endif /* not IRIX */ -# else /* not USG5 */ -# if defined (DEC_ALPHA) && defined (OSF1) -# define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES) -extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d -extw_link_mid = -o -extw_link_end = $(LIBES) -# else /* !(DEC_ALPHA && OSF1) */ -# define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output -extw_link_beg = $(LD) -dc -extw_link_mid = -assert pure-text -o -extw_link_end = -# endif /* !(DEC_ALPHA && OSF1) */ -# endif /* not USG5 */ - # ifdef LWLIB_USES_MOTIF # ifdef EXTW_LINK motif_other_files = libextcli_Xm.a libextcli_Xm.so.1 @@ -436,7 +393,6 @@ libextcli_Xt.a libextcli_Xlib.a\ ${shared_other_files} -all: ${other_files} # endif /* EXTERNAL_WIDGET */ # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE) @@ -459,88 +415,139 @@ mo_file = ${mo_dir}emacs.mo #endif -batch = -no-packages -batch -batch_packages = -vanilla -batch -temacs_loadup = ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/loadup.el -dump_temacs = ${temacs_loadup} dump -run_temacs = ${temacs_loadup} run-temacs -debug_temacs = gdb ${EXE_TARGET} +######################################################################### + +## Primary rebuilding process + +DO_TEMACS = ${DUMPENV} ./${EXE_TARGET} +DO_XEMACS = ./${PROGNAME} +LISP = ${srcdir}/../lisp + +BATCH = -no-packages -batch +BATCH_PACKAGES = -vanilla -batch +TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH) +XEMACS_BATCH = $(DO_XEMACS) $(BATCH) +XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES) +temacs_loadup_args = -l $(LISP)/loadup.el +dump_temacs_args = $(temacs_loadup_args) dump +run_temacs_args = $(temacs_loadup_args) run-temacs +dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args) + +debug_temacs = gdb $(EXE_TARGET) + +.PHONY : build-the-mofo release update-elc update-elc-2 load-shadows + +## Compile, dump, and make sure all .elc files are up-to-date. + +## NOTE: The dependencies would (should) look like the following +## commented-out statement in linear order, but apparently this causes +## problems with some versions of `make' because there is insufficient +## serialization of the build steps. Evidently the .NO_PARALLEL directive +## doesn't help. `make' really seems to be designed to have all +## dependencies proceed upward, not across, and to be all calculable before +## actually running anything. The problem here is that update-elc may +## touch NEEDTODUMP and thus create an additional dependency +## -- but *NOT UNTIL* that step is run. There is no way I can come up with +## to express such a dependency in upward fashion. -release: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} -#ifdef CANNOT_DUMP - ln ${EXE_TARGET} ${PROGNAME} -#else - -if [ -w ${srcdir}/../lisp ]; then \ - w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/inc-vers; \ +## build-the-mofo: ${EXE_TARGET} update-elc ${libsrc}DOC $(mo_file) ${other_files} ${DUMP_TARGET} update-elc-2 $(LISP)/finder-inf.el load-shadows + +build-the-mofo: ${EXE_TARGET} update-elc ${libsrc}DOC $(mo_file) ${other_files} ${DUMP_TARGET} load-shadows +.NO_PARALLEL: ${EXE_TARGET} update-elc ${libsrc}DOC ${DUMP_TARGET} update-elc-2 + +release: all + -if [ -w $(LISP) ]; then \ + w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd ${BATCH} -l $(LISP)/inc-vers; \ else true; fi - -./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/loadup.el dump + -${dump_temacs} touch release -#endif /* ! defined (CANNOT_DUMP) */ + +update-elc: $(EXE_TARGET) + $(TEMACS_BATCH) -l $(LISP)/update-elc.el + +## Update out-of-date .elcs, other than needed for dumping. +update-elc-2: $(EXE_TARGET) $(DUMP_TARGET) + $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP) -${DUMP_TARGET}: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp +$(LISP)/finder-inf.el: update-elc-2 $(EXE_TARGET) $(DUMP_TARGET) + @echo "Building finder database ..." + $(XEMACS_BATCH) -eval '(setq finder-compile-keywords-quiet t)' \ + -l finder -f finder-compile-keywords + @echo "Building finder database ...(done)" + +load-shadows: $(LISP)/finder-inf.el $(EXE_TARGET) $(DUMP_TARGET) +#ifndef QUICK_BUILD + @echo "Testing for Lisp shadows ..." + @$(XEMACS_BATCH) -f list-load-path-shadows +#endif + +## This file is touched by update-elc.el when redumping is necessary. +NEEDTODUMP: + touch NEEDTODUMP + +${DUMP_TARGET}: ${EXE_TARGET} NEEDTODUMP #ifdef HEAP_IN_DATA @$(RM) $@ && touch SATISFIED - -${dump_temacs} - @if test -f $@; then if test -f SATISFIED; then \ - echo "Testing for Lisp shadows ..."; \ - ./${PROGNAME} ${batch} -f list-load-path-shadows; fi; \ - $(RM) SATISFIED; exit 0; fi; \ - if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \ - $(RM) $@; \ - $(RECURSIVE_MAKE) $@; + ${dump_temacs} + @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \ + $(RECURSIVE_MAKE) $@; fi #else @$(RM) $@ ${dump_temacs} - @echo "Testing for Lisp shadows ..." - @./${PROGNAME} ${batch} -f list-load-path-shadows #endif -fastdump: ${EXE_TARGET} - @$(RM) ${DUMP_TARGET} && touch SATISFIED - -${dump_temacs} - @./${PROGNAME} ${batch} -f list-load-path-shadows - -FRC.update-elc.stamp : - -update-elc.stamp : ${EXE_TARGET} FRC.update-elc.stamp - @touch BYTECOMPILE_CHANGE - ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/update-elc.el - @if test ! -f $@ -o -f BYTECOMPILE_CHANGE; then touch $@; fi; \ - $(RM) BYTECOMPILE_CHANGE - -obj_src = $(objs:.o=.c) - -dortl : $(obj_rtl) $(otherrtls) - echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el - (for a in $(obj_src) $(othersrcs);do \ - echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\ - done) - echo "))" >> ${srcdir}/../lisp/source-files.el - #ifdef DYNODUMP dynodump_deps = ../dynodump/dynodump.so ../dynodump/dynodump.so: cd ../dynodump && $(RECURSIVE_MAKE) #endif /* DYNODUMP */ -${libsrc}DOC: ${EXE_TARGET} update-elc.stamp +link_deps = $(start_files) ${objs} ${otherobjs} $(lwlib_deps) $(dynodump_deps) + +temacs_deps = $(link_deps) ${DUMP_ID} + +temacs_link_args = \ + ${start_flags} ${ldflags} \ + -o $@ ${start_files} ${objs} ${otherobjs} ${DUMP_ID} ${LIBES} + +${EXE_TARGET}: $(temacs_deps) + $(LD) $(temacs_link_args) + +dump-id.c: ${libsrc}make-dump-id ${link_deps} + ${libsrc}make-dump-id + +obj_src = $(objs:.o=.c) + +${libsrc}DOC: ${libsrc}make-docfile NEEDTODUMP ${temacs_deps} #ifdef QUICK_BUILD if test ! -f $@ ; then \ #else if true ; then \ #endif - ${DUMPENV} ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/make-docfile.el -- \ + $(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \ -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \ ${obj_src} ${mallocdocsrc} ${rallocdocsrc} \ ${extra_doc_files} ; fi -dump_elcs: dump-elcs +${libsrc}make-dump-id: + cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id + +${libsrc}make-docfile: + cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile -dump-elcs: ${EXE_TARGET} - -${DUMPENV} ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/update-elc.el +.PHONY: fastdump +fastdump: ${EXE_TARGET} + @$(RM) ${DUMP_TARGET} && touch SATISFIED + -${dump_temacs} + @$(XEMACS_BATCH) -f list-load-path-shadows -all-elc all-elcs: - cd .. && $(RECURSIVE_MAKE) all-elc +.PHONY: all-elc +all-elc: + cd .. && $(RECURSIVE_MAKE) + +######################################################################### + +## Subsidiary dependency rules #ifdef I18N3 @@ -571,118 +578,6 @@ #endif /* I18N3 */ -${libsrc}make-dump-id: - cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id - -${libsrc}make-docfile: - cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile - -## Lint Section -LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) -LINTFILES= $(objs:.o=.ln) -LINTINCLUDES = $(cppflags) -## LINTFLAGS= -fd -m -p -s -u -v -x -LINTFLAGS= -fd -m -s -u -v -x -lint: $(LINTFILES) - $(LINT.c) $(LINTFILES) -## end of Lint Section - -link_deps=\ - $(start_files) ${objs} ${otherobjs}\ - $(lwlib_deps) $(dynodump_deps) - -temacs_deps = $(link_deps) ${DUMP_ID} - -temacs_link_args=\ - ${start_flags} ${ldflags}\ - -o $@ ${start_files} ${objs} ${otherobjs} ${DUMP_ID} ${LIBES} - -${EXE_TARGET}: $(temacs_deps) - $(LD) $(temacs_link_args) - -dump-id.c: ${libsrc}make-dump-id ${link_deps} - ${libsrc}make-dump-id - -.PHONY : run-temacs - -run-temacs: ${EXE_TARGET} - -${run_temacs} - -## We have automated tests!! -testdir = ${srcdir}/../tests/automated -batch_test_emacs = ${batch_packages} -l ${testdir}/test-harness.el -f batch-test-emacs ${testdir} - -.PHONY: check check-temacs -check: - ./${PROGNAME} ${batch_test_emacs} -check-temacs: - ${run_temacs} ${batch_test_emacs} - -## Debugging targets: -## -## None of the debugging products work with a dumped xemacs binary, -## because it does unexpected things like free memory that has been -## malloc'ed in a *different* process!! So we need to run these on -## temacs. - -## RTC is Sun WorkShop's Run Time Checking, integrated with dbx -rtc_patch.o: - rtc_patch_area -o $@ - -rtcmacs: $(temacs_deps) rtc_patch.o - $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o - mv ${EXE_TARGET} rtcmacs - -.PHONY: run-rtcmacs -run-rtcmacs: rtcmacs - dbx -q -C -c \ - 'dbxenv rtc_error_log_file_name /dev/fd/1; \ - dbxenv suppress_startup_message 5.0; \ - ignore POLL; \ - check -access; \ - suppress rui; \ - runargs ${batch} -l ${srcdir}/../lisp/loadup.el run-temacs -vanilla; \ - run' rtcmacs - -debug-temacs: ${EXE_TARGET} - -${debug_temacs} - -## Purify, Quantify, PureCoverage are software quality products from -## Rational, formerly Pure Atria, formerly Pure Software. -## -## Purify -PURIFY_PROG = purify -PURIFY_LIBS = -PURIFY_FLAGS =\ -#ifdef PDUMP - -search-mmaps=yes\ -#endif - -chain-length=32 -ignore-signals=SIGPOLL\ - -cache-dir=${blddir}/purecache -always-use-cache-dir=yes - -puremacs: $(temacs_deps) - $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS) - cp $@ ${EXE_TARGET} - -## Quantify -#ifdef QUANTIFY -QUANTIFY_PROG = quantify -QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir` -QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes -cppflags += -I$(QUANTIFY_HOME) -temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a - -quantmacs: $(temacs_deps) - $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args) - cp $@ ${EXE_TARGET} -#endif /* QUANTIFY */ - - -PURECOV_PROG=purecov -covmacs: $(temacs_deps) - $(PURECOV_PROG) $(LD) $(temacs_link_args) - - TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c mv EmacsShell-sub.o TopLevelEmacsShell.o @@ -775,6 +670,49 @@ libextcli_Xlib.a: ${external_client_xlib_objs_nonshared} ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared} +## Now we try to figure out how to link a shared library. +## If we cannot figure it out, leave EXTW_LINK undefined and a shared +## library will not be created. + +# ifdef USE_GCC +# ifdef USG5 +# define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output +extw_link_beg = $(CC) -shared +extw_link_mid = -Xlinker -z -Xlinker text -o +extw_link_end = +## I cannot figure out how to do shared a.out libraries, so just punt. +# elif !defined (LINUX) || defined (__ELF__) +# define EXTW_LINK(objs, output) $(CC) -shared objs -o output +extw_link_beg = $(CC) -shared +extw_link_mid = -o +extw_link_end = +# endif +# elif defined (USG5) +# if defined (IRIX) +# define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output +extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations +extw_link_mid = -o +extw_link_end = +# else /* not IRIX */ +# define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output +extw_link_beg = $(CC) -G +extw_link_mid = -z text -o +extw_link_end = +# endif /* not IRIX */ +# else /* not USG5 */ +# if defined (DEC_ALPHA) && defined (OSF1) +# define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES) +extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d +extw_link_mid = -o +extw_link_end = $(LIBES) +# else /* !(DEC_ALPHA && OSF1) */ +# define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output +extw_link_beg = $(LD) -dc +extw_link_mid = -assert pure-text -o +extw_link_end = +# endif /* !(DEC_ALPHA && OSF1) */ +# endif /* not USG5 */ + #ifdef EXTW_LINK libextcli_Xm.so.1: ${external_client_motif_objs_shared} @@ -847,16 +785,109 @@ xemacs_res.o: ${srcdir}/../nt/xemacs.rc windres --include-dir ${srcdir}/../nt -i ${srcdir}/../nt/xemacs.rc -o $@ -## System-specific programs to be made. -## ${other_files}, $(objects_system) and $(objects_machine) -## select which of these should be compiled. */ +######################################################################### + +## Other random crap + +dortl : $(obj_rtl) $(otherrtls) + echo "(defvar source-files '(" > $(LISP)/source-files.el + (for a in $(obj_src) $(othersrcs);do \ + echo -n "\""$$a"\"" >> $(LISP)/source-files.el ;\ + done) + echo "))" >> $(LISP)/source-files.el + +## Lint Section +LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) +LINTFILES= $(objs:.o=.ln) +LINTINCLUDES = $(cppflags) +## LINTFLAGS= -fd -m -p -s -u -v -x +LINTFLAGS= -fd -m -s -u -v -x +.PHONY: lint +lint: $(LINTFILES) + $(LINT.c) $(LINTFILES) +## end of Lint Section + +## We have automated tests!! +testdir = ${srcdir}/../tests/automated +batch_test_emacs = ${BATCH_PACKAGES} -l ${testdir}/test-harness.el -f batch-test-emacs ${testdir} + +.PHONY: check check-temacs check-features +check: + $(DO_XEMACS) $(batch_test_emacs) +check-temacs: + $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs) +check-features: all + $(XEMACS_BATCH) -l check-features.el + +## Debugging targets: +## +## None of the debugging products work with a dumped xemacs binary, +## because it does unexpected things like free memory that has been +## malloc'ed in a *different* process!! So we need to run these on +## temacs. + +## RTC is Sun WorkShop's Run Time Checking, integrated with dbx +rtc_patch.o: + rtc_patch_area -o $@ + +rtcmacs: $(temacs_deps) rtc_patch.o + $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o + mv ${EXE_TARGET} rtcmacs + +.PHONY: run-rtcmacs +run-rtcmacs: rtcmacs + dbx -q -C -c \ + 'dbxenv rtc_error_log_file_name /dev/fd/1; \ + dbxenv suppress_startup_message 5.0; \ + ignore POLL; \ + check -access; \ + suppress rui; \ + runargs -nd ${BATCH} ${run_temacs_args} -vanilla; \ + run' rtcmacs + +debug-temacs: ${EXE_TARGET} + -${debug_temacs} + +## Purify, Quantify, PureCoverage are software quality products from +## Rational, formerly Pure Atria, formerly Pure Software. +## +## Purify +PURIFY_PROG = purify +PURIFY_LIBS = +PURIFY_FLAGS =\ +#ifdef PDUMP + -search-mmaps=yes\ +#endif + -chain-length=32 -ignore-signals=SIGPOLL\ + -cache-dir=${blddir}/purecache -always-use-cache-dir=yes + +puremacs: $(temacs_deps) + $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS) + cp $@ ${EXE_TARGET} + +## Quantify +#ifdef QUANTIFY +QUANTIFY_PROG = quantify +QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir` +QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes +cppflags += -I$(QUANTIFY_HOME) +temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a + +quantmacs: $(temacs_deps) + $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args) + cp $@ ${EXE_TARGET} +#endif /* QUANTIFY */ + +PURECOV_PROG=purecov +covmacs: $(temacs_deps) + $(PURECOV_PROG) $(LD) $(temacs_link_args) .PHONY: mostlyclean clean distclean realclean versionclean extraclean mostlyclean: $(RM) temacs puremacs quantmacs *.o *.i \ core temacs.exe sheap-adjust.h clean: mostlyclean versionclean - $(RM) libextcli* update-elc.stamp + $(RM) libextcli* ## This is used in making a distribution. ## Do not use it on development directories! distclean: clean
--- a/src/alloc.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/alloc.c Thu Feb 20 08:19:44 2003 +0000 @@ -313,7 +313,9 @@ /* like malloc and realloc but check for no memory left. */ +#ifdef ERROR_CHECK_MALLOC static int in_malloc; +#endif #undef xmalloc void *
--- a/src/config.h.in Thu Feb 20 08:16:21 2003 +0000 +++ b/src/config.h.in Thu Feb 20 08:19:44 2003 +0000 @@ -1006,10 +1006,6 @@ merge the two. */ #define USE_C_FONT_LOCK -#if defined (WIN32_NATIVE) || defined (CYGWIN) -# define HAVE_WIN32_CODING_SYSTEMS -#endif - #ifdef ERROR_CHECK_ALL #define ERROR_CHECK_EXTENTS #define ERROR_CHECK_TYPES
--- a/src/console.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/console.c Thu Feb 20 08:19:44 2003 +0000 @@ -262,7 +262,7 @@ DEFUN ("valid-console-type-p", Fvalid_console_type_p, 1, 1, 0, /* Return t if CONSOLE-TYPE is a valid console type. -Valid types are 'x, 'tty, and 'stream. +Valid types are 'x, 'tty, 'mswindows, 'gtk, and 'stream. */ (console_type)) {
--- a/src/emacs.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/emacs.c Thu Feb 20 08:19:44 2003 +0000 @@ -2,7 +2,7 @@ Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 2000, 2001, 2002 Ben Wing. + Copyright (C) 2000, 2001, 2002, 2003 Ben Wing. This file is part of XEmacs. @@ -268,7 +268,7 @@ #include TT_C_H_FILE #endif -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY #include "console-msw.h" #endif @@ -466,6 +466,8 @@ Lisp_Object Qkill_emacs_hook; Lisp_Object Qsave_buffers_kill_emacs; +Lisp_Object Qtemacs, Qdumping, Qrestarted, Qpdump, Qbatch; + /* Nonzero if handling a fatal error already. */ int fatal_error_in_progress; @@ -678,6 +680,15 @@ } } +static void +check_compatible_window_system (char *must) +{ + if (display_use && strcmp (display_use, must)) + fatal ("Incompatible window system type `%s': `%s' already specified", + must, display_use); + display_use = must; +} + /************************************************************************/ /* main and friends: XEmacs startup */ @@ -703,7 +714,6 @@ char stack_bottom_variable; int skip_args = 0; Lisp_Object load_me; - int inhibit_window_system; #ifdef NeXT extern int malloc_cookie; #endif @@ -730,6 +740,7 @@ #endif /* not SYSTEM_MALLOC or HAVE_LIBMCHECK or DOUG_LEA_MALLOC */ noninteractive = 0; + display_use = 0; inhibit_non_essential_printing_operations = 1; #ifdef NeXT @@ -803,12 +814,6 @@ EXTRA_INITIALIZE; #endif -#ifdef HAVE_WINDOW_SYSTEM - inhibit_window_system = 0; -#else - inhibit_window_system = 1; -#endif - /* NOTE NOTE NOTE: Keep the following args in sync with the big list of arguments below in standard_args[], with the help text in startup.el, and with the list of non-clobbered variables near where pdump_load() @@ -826,36 +831,11 @@ exit (0); } - /* Handle the -t switch, which specifies filename to use as terminal */ - { - Extbyte *term; - if (argmatch (argv, argc, "-t", "--terminal", 0, &term, &skip_args)) - { - retry_close (0); - retry_close (1); - if (open (term, O_RDWR | OPEN_BINARY, 2) < 0) - fatal ("%s: %s", term, strerror (errno)); - dup (0); - if (! isatty (0)) - fatal ("%s: not a tty", term); - -#if 0 - stderr_out ("Using %s", ttyname (0)); -#endif - stderr_out ("Using %s", term); - inhibit_window_system = 1; /* -t => -nw */ - } - } - /* Handle the --no-dump-file/-nd switch, which means don't load the dump file (ignored when not using pdump) */ if (argmatch (argv, argc, "-nd", "--no-dump-file", 0, NULL, &skip_args)) nodumpfile = 1; - /* Handle -nw switch */ - if (argmatch (argv, argc, "-nw", "--no-windows", 0, NULL, &skip_args)) - inhibit_window_system = 1; - /* Handle the -batch switch, which means don't do interactive display. */ if (argmatch (argv, argc, "-batch", "--batch", 0, NULL, &skip_args)) { @@ -950,35 +930,85 @@ /* Now, figure out which type of console is our first console. */ - display_arg = 0; - if (noninteractive) display_use = "stream"; - else - display_use = "tty"; - + + if (argmatch (argv, argc, "-nw", "--no-windows", 0, NULL, &skip_args) || + argmatch (argv, argc, "-tty", "--use-tty", 0, NULL, &skip_args)) + { + check_compatible_window_system ("tty"); #ifndef HAVE_TTY - if (inhibit_window_system) - fatal ("Sorry, this XEmacs was not compiled with TTY support"); -#endif - -#ifdef HAVE_WINDOW_SYSTEM + fatal ("Sorry, this XEmacs was not compiled with TTY support"); +#endif + } + + if (argmatch (argv, argc, "-x", "--use-x", 0, NULL, &skip_args)) + { + check_compatible_window_system ("x"); +#ifndef HAVE_X_WINDOWS + fatal ("Sorry, this XEmacs was not compiled with X support"); +#endif + } + + if (argmatch (argv, argc, "-gtk", "--use-gtk", 0, NULL, &skip_args) || + argmatch (argv, argc, "-gnome", "--use-gnome", 0, NULL, &skip_args)) + { + check_compatible_window_system ("gtk"); +#ifndef HAVE_GTK + fatal ("Sorry, this XEmacs was not compiled with GTK support"); +#endif + } + + if (argmatch (argv, argc, "-msw", "--use-ms-windows", 0, NULL, &skip_args)) + { + check_compatible_window_system ("mswindows"); +#ifndef HAVE_MS_WINDOWS + fatal ("Sorry, this XEmacs was not compiled with MS Windows support"); +#endif + } + + /* Handle other switches implying particular window systems: */ + + /* Handle the -t switch, which specifies filename to use as terminal */ + { + Extbyte *term; + if (argmatch (argv, argc, "-t", "--terminal", 0, &term, &skip_args)) + { + check_compatible_window_system ("tty"); +#ifndef HAVE_TTY + fatal ("Sorry, this XEmacs was not compiled with TTY support"); +#endif + + retry_close (0); + retry_close (1); + if (open (term, O_RDWR | OPEN_BINARY, 2) < 0) + fatal ("%s: %s", term, strerror (errno)); + dup (0); + if (! isatty (0)) + fatal ("%s: not a tty", term); + +#if 0 + stderr_out ("Using %s", ttyname (0)); +#endif + stderr_out ("Using %s", term); + } + } + /* Stupid kludge to catch command-line display spec. We can't handle this argument entirely in window-system-dependent code because we don't even know which window-system-dependent code to run until we've recognized this argument. */ - if (!inhibit_window_system && !noninteractive) - { + { #ifdef HAVE_X_WINDOWS - char *dpy = 0; - int count_before = skip_args; - - if (argmatch (argv, argc, "-d", "--display", 3, &dpy, &skip_args) || - argmatch (argv, argc, "-display", 0, 3, &dpy, &skip_args)) - { - display_arg = 1; - display_use = "x"; - } + char *dpy = 0; + int count_before = skip_args; + + if (argmatch (argv, argc, "-d", "--display", 3, &dpy, &skip_args) || + argmatch (argv, argc, "-display", 0, 3, &dpy, &skip_args)) + { + check_compatible_window_system ("x"); + display_arg = 1; + } /* If we have the form --display=NAME, convert it into -d name. This requires inserting a new element into argv. */ @@ -1003,27 +1033,43 @@ /* Don't actually discard this arg. */ skip_args = count_before; - - /* If there is a non-empty environment var DISPLAY, set - `display_use', but not `display_arg', which is only to be set - if the display was specified on the command line. */ +#endif /* HAVE_X_WINDOWS */ + } + + /* If no switch telling us which window system to use, try other + possibilities: */ + +#if defined (HAVE_X_WINDOWS) || defined (HAVE_GTK) + if (!display_use) + { + char *dpy; + /* If there is a non-empty environment var DISPLAY, assume X or GTK, + but don't set `display_arg', which is only to be set if the + display was specified on the command line. */ if ((dpy = getenv ("DISPLAY")) && dpy[0]) +#ifdef HAVE_X_WINDOWS + /* #### Who gets precedence? X or GTK? For the moment, GTK support is + unstable so use X. Maybe eventually we will switch this. */ display_use = "x"; - -#endif /* HAVE_X_WINDOWS */ -#ifdef HAVE_GTK - { - char *dpy = getenv ("DISPLAY"); - if (dpy && dpy[0]) - display_use = "gtk"; - } -#endif +#else + display_use = "gtk"; +#endif + } +#endif /* defined (HAVE_X_WINDOWS) || defined (HAVE_GTK) */ + #ifdef HAVE_MS_WINDOWS - if (strcmp (display_use, "x") != 0) - display_use = "mswindows"; + if (!display_use) + display_use = "mswindows"; #endif /* HAVE_MS_WINDOWS */ - } -#endif /* HAVE_WINDOW_SYSTEM */ + +#ifdef HAVE_TTY + if (!display_use) + display_use = "tty"; +#endif /* HAVE_MS_WINDOWS */ + + if (!display_use) + fatal ("No window systems and no TTY's in this XEmacs: Must specify " + "-batch"); noninteractive1 = noninteractive; @@ -1069,7 +1115,7 @@ As early as possible, of course, so we can be fairly accurate. */ -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY init_win32_very_early (); #endif #ifdef HAVE_MS_WINDOWS @@ -1137,7 +1183,7 @@ inhibit_site_modules = inhibit_site_modules_save; if (initialized) - run_temacs_argc = -1; + run_temacs_argc = restart ? -2 : -1; else purify_flag = 1; } @@ -1373,7 +1419,7 @@ syms_of_dired_mswindows (); syms_of_nt (); #endif -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY syms_of_win32 (); #endif @@ -1391,7 +1437,7 @@ #endif /* HAVE_CANNA */ #endif /* MULE */ -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY syms_of_intl_win32 (); #endif @@ -1556,7 +1602,7 @@ coding_system_type_create (); coding_system_type_create_unicode (); -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY coding_system_type_create_intl_win32 (); #endif #ifdef MULE @@ -1751,7 +1797,7 @@ vars_of_indent (); vars_of_insdel (); vars_of_intl (); -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY vars_of_intl_win32 (); #endif #ifdef HAVE_XIM @@ -1813,7 +1859,7 @@ #endif vars_of_undo (); vars_of_window (); -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY vars_of_win32 (); #endif @@ -1967,7 +2013,7 @@ complex_vars_of_(), for example if a charset appears anywhere, then we suddenly have dependence on the previous call. */ complex_vars_of_file_coding (); -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY complex_vars_of_intl_win32 (); #endif @@ -2089,7 +2135,7 @@ reinit_coding_system_type_create (); reinit_coding_system_type_create_unicode (); -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY reinit_coding_system_type_create_intl_win32 (); #endif #ifdef MULE @@ -2205,7 +2251,7 @@ to be done both at dump time and at run time. Some will be done only at run time, by querying the `initialized' variable. */ -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY init_intl_win32 (); /* Under Windows, determine whether we use Unicode or ANSI to call the system routines -- i.e. determine what the coding system `mswindows-tstr' @@ -2258,7 +2304,7 @@ #ifdef SUNPRO init_sunpro (); /* Set up Sunpro usage tracking */ #endif -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY init_win32 (); #endif #if defined (HAVE_NATIVE_SOUND) && defined (hp9000s800) @@ -2374,9 +2420,7 @@ /* Handled by main_1 above: Each must have its own priority and must be in the order mentioned in main_1. */ { "-sd", "--show-dump-id", 105, 0 }, - { "-t", "--terminal", 100, 1 }, { "-nd", "--no-dump-file", 95, 0 }, - { "-nw", "--no-windows", 90, 0 }, { "-batch", "--batch", 88, 0 }, #ifdef WIN32_NATIVE { "-mswindows-termination-handle", 0, 84, 1 }, @@ -2391,8 +2435,15 @@ { "-help", "--help", 72, 0 }, { "-version", "--version", 70, 0 }, { "-V", 0, 68, 0 }, - { "-d", "--display", 66, 1 }, - { "-display", 0, 64, 1 }, + { "-nw", "--no-windows", 66, 0 }, + { "-tty", "--use-tty", 65, 0 }, + { "-x", "--use-x", 64, 0 }, + { "-gtk", "--use-gtk", 63, 0 }, + { "-gnome", "--use-gnome", 62, 0 }, + { "-msw", "--use-ms-windows", 61, 0 }, + { "-t", "--terminal", 58, 1 }, + { "-d", "--display", 57, 1 }, + { "-display", 0, 56, 1 }, /* Handled by command-line-early in startup.el: */ { "-q", "--no-init-file", 50, 0 }, @@ -2560,7 +2611,8 @@ if (best < 0) abort (); - /* Copy the highest priority remaining option, with its args, to NEW_ARGV. */ + /* Copy the highest priority remaining option, with its args, to + NEW_ARGV. */ new_argv[to++] = argv[best]; for (i = 0; i < options[best]; i++) new_argv[to++] = argv[best + i + 1]; @@ -2587,6 +2639,48 @@ return run_temacs_argc >= 0 ? Qt : Qnil; } +DEFUN ("emacs-run-status", Femacs_run_status, 0, 0, 0, /* +Plist of values indicating the current run status of this XEmacs. +Currently defined values: + +`temacs' + If non-nil, we are running a "raw temacs" (no dump data is present + and `run-emacs-from-temacs' not called). (same as `running-temacs-p') + +`dumping' + If non-nil, we are in the process of creating dump data. (same as + `purify-flag') + +`restarted' + If non-nil, `run-emacs-from-temacs' was called. + +`pdump' + If non-nil, we were compiled with pdump (portable dumping) support. + +`batch' + If non-nil, we are running non-interactively. (same as `noninteractive') +*/ + ()) +{ + Lisp_Object plist = Qnil; + +#define ADD_PLIST(key, val) plist = Fcons (val, Fcons (key, plist)) + if (run_temacs_argc >= 0) + ADD_PLIST (Qtemacs, Qt); + if (purify_flag) + ADD_PLIST (Qdumping, Qt); + if (run_temacs_argc == -2) + ADD_PLIST (Qrestarted, Qt); +#ifdef PDUMP + ADD_PLIST (Qpdump, Qt); +#endif + if (noninteractive) + ADD_PLIST (Qbatch, Qt); + +#undef ADD_PLIST + return Fnreverse (plist); +} + DEFUN ("run-emacs-from-temacs", Frun_emacs_from_temacs, 0, MANY, 0, /* Do not call this. It will reinitialize your XEmacs. You'll be sorry. */ @@ -2654,6 +2748,12 @@ #if defined (HEAP_IN_DATA) && !defined (PDUMP) report_sheap_usage (0); #endif + + /* run-temacs usually only occurs as a result of building, and in all such + cases we want a backtrace, even if it occurs very early. */ + if (NILP (Vstack_trace_on_error)) + Vstack_trace_on_error = Qt; + LONGJMP (run_temacs_catch, 1); RETURN_NOT_REACHED (Qnil); } @@ -2750,7 +2850,7 @@ { extern char **_environ; if ((unsigned) environ == 0) - environ=_environ; + environ = _environ; } #endif /* _SCO_DS */ vol_envp = environ; @@ -2787,7 +2887,7 @@ } #endif /* DOUG_LEA_MALLOC */ - run_temacs_argc = -1; + run_temacs_argc = -2; main_1 (vol_argc, vol_argv, vol_envp, restarted); @@ -2984,7 +3084,7 @@ debugging_breakpoint (); } -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY /* Return whether all bytes in the specified memory block can be read. */ int @@ -2993,7 +3093,7 @@ return !IsBadReadPtr (ptr, len); } -#else /* !(defined (WIN32_NATIVE) || defined (CYGWIN)) */ +#else /* !WIN32_ANY */ /* #### There must be a better way!!!! */ @@ -3041,7 +3141,7 @@ return retval; } -#endif /* defined (WIN32_NATIVE) || defined (CYGWIN) */ +#endif /* WIN32_ANY */ #ifdef DEBUG_XEMACS @@ -3082,7 +3182,7 @@ { static int already_paused; - if (already_paused || !noninteractive) + if (already_paused) return; if (!allow_further) already_paused = 1; @@ -3090,7 +3190,11 @@ user to see this message. This may be unnecessary, but can't hurt, and we can't necessarily check arg; e.g. xemacs --help kills with argument 0. */ - if (mswindows_message_outputted) + if (mswindows_message_outputted && + /* noninteractive, we always show the box. Else, + do it when there is not yet an initial frame -- in such case, + XEmacs will just die immediately and we wouldn't see anything. */ + (noninteractive || NILP (Fselected_frame (Qnil)))) Fmswindows_message_box (build_msg_string ("Messages outputted. XEmacs is exiting."), Qnil, Qnil); @@ -3704,6 +3808,7 @@ DEFSUBR (Frun_emacs_from_temacs); DEFSUBR (Frunning_temacs_p); + DEFSUBR (Femacs_run_status); DEFSUBR (Finvocation_name); DEFSUBR (Finvocation_directory); DEFSUBR (Fkill_emacs); @@ -3721,6 +3826,12 @@ DEFSYMBOL (Qkill_emacs_hook); DEFSYMBOL (Qsave_buffers_kill_emacs); + + DEFSYMBOL (Qtemacs); + DEFSYMBOL (Qdumping); + DEFSYMBOL (Qrestarted); + DEFSYMBOL (Qpdump); + DEFSYMBOL (Qbatch); } /* Yuck! These variables may get set from command-line options when
--- a/src/event-Xt.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/event-Xt.c Thu Feb 20 08:19:44 2003 +0000 @@ -56,7 +56,7 @@ #include <X11/ShellP.h> #if defined (HAVE_XIM) && defined (XIM_MOTIF) -#include <Xm/Xm.h> +#include "xmotif.h" #endif #ifdef HAVE_DRAGNDROP
--- a/src/event-stream.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/event-stream.c Thu Feb 20 08:19:44 2003 +0000 @@ -131,11 +131,11 @@ /* Here FSF Emacs 20.7 defines Vpost_command_idle_hook, post_command_idle_delay, Vdeferred_action_list, and Vdeferred_action_function, but we don't because that stuff is crap, - and we're smarter than them, and their momas are fat. */ + and we're smarter than them, and their mommas are fat. */ /* FSF Emacs 20.7 also defines Vinput_method_function, Qinput_method_exit_on_first_char and Qinput_method_use_echo_area. - I don't know this should be imported or not. */ + I don't know whether this should be imported or not. */ /* Non-nil disable property on a command means do not execute it; call disabled-command-hook's value instead. */ @@ -2259,9 +2259,11 @@ #### I used to conditionalize on in_modal_loop but that fails utterly because event-msw.c specifically calls Fnext_event() inside of a modal loop to clear the dispatch queue. --ben */ +#ifdef HAVE_MENUBARS if (in_menu_callback) invalid_operation ("Attempt to call next-event inside menu callback", Qunbound); +#endif /* HAVE_MENUBARS */ PROFILE_RECORD_ENTERING_SECTION (Qnext_event);
--- a/src/file-coding.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/file-coding.h Thu Feb 20 08:19:44 2003 +0000 @@ -1029,7 +1029,7 @@ DECLARE_CODING_SYSTEM_TYPE (unicode); -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY DECLARE_CODING_SYSTEM_TYPE (mswindows_multibyte_to_unicode); DECLARE_CODING_SYSTEM_TYPE (mswindows_multibyte); #endif
--- a/src/fileio.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/fileio.c Thu Feb 20 08:19:44 2003 +0000 @@ -55,7 +55,7 @@ #endif /* HPUX_PRE_8_0 */ #endif /* HPUX */ -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY #define WIN32_FILENAMES #include "syswindows.h" #define IS_DRIVE(x) isalpha (x)
--- a/src/getloadavg.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/getloadavg.c Thu Feb 20 08:19:44 2003 +0000 @@ -750,7 +750,7 @@ : (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale)); #endif /* OSF_MIPS */ -#if !defined (LDAV_DONE) && (defined (WIN32_NATIVE) || defined (CYGWIN)) +#if !defined (LDAV_DONE) && defined (WIN32_ANY) #define LDAV_DONE /* A faithful emulation is going to have to be saved for a rainy day. */
--- a/src/glyphs-x.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/glyphs-x.c Thu Feb 20 08:19:44 2003 +0000 @@ -81,7 +81,7 @@ #include <setjmp.h> #ifdef LWLIB_WIDGETS_MOTIF -#include <Xm/Xm.h> +#include "xmotif.h" #include <Xm/Scale.h> #endif #include <X11/IntrinsicP.h>
--- a/src/gui-x.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/gui-x.c Thu Feb 20 08:19:44 2003 +0000 @@ -42,7 +42,7 @@ #include "gui-x.h" #ifdef LWLIB_USES_MOTIF -#include <Xm/Xm.h> /* for XmVersion */ +#include "xmotif.h" /* for XmVersion */ #endif /* we need a unique id for each popup menu, dialog box, and scrollbar */
--- a/src/input-method-motif.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/input-method-motif.c Thu Feb 20 08:19:44 2003 +0000 @@ -31,7 +31,7 @@ #include "device.h" #include "frame.h" #include "EmacsFrame.h" -#include <Xm/Xm.h> +#include "xmotif.h" #ifndef XIM_MOTIF #error XIM_MOTIF is not defined??
--- a/src/lisp.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/lisp.h Thu Feb 20 08:19:44 2003 +0000 @@ -813,7 +813,11 @@ #ifndef DOESNT_RETURN # if defined __GNUC__ # if ((__GNUC__ > 2) || (__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)) -# define RETURN_NOT_REACHED(value) DO_NOTHING +# if __GNUC__ < 3 + /* GCC 3.2 -O3 issues complaints in Fcommand_loop_1 about no return + statement if we have this definition */ +# define RETURN_NOT_REACHED(value) DO_NOTHING +# endif # define DOESNT_RETURN void # define DECLARE_DOESNT_RETURN(decl) \ extern void decl __attribute__ ((noreturn)) @@ -4038,6 +4042,7 @@ ...) PRINTF_ARGS (3, 4); extern int backtrace_with_internal_sections; +extern Lisp_Object Vstack_trace_on_error; /* Defined in event-stream.c */ EXFUN (Faccept_process_output, 3);
--- a/src/profile.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/profile.c Thu Feb 20 08:19:44 2003 +0000 @@ -26,6 +26,7 @@ #include "bytecode.h" #include "elhash.h" #include "hash.h" +#include "profile.h" #include "syssignal.h" #include "systime.h"
--- a/src/select-x.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/select-x.c Thu Feb 20 08:19:44 2003 +0000 @@ -45,7 +45,11 @@ #endif #ifdef MOTIF_CLIPBOARDS +# include "xmotif.h" +/* Kludge around shadowing warnings */ +# define index index_ # include <Xm/CutPaste.h> +# undef index static void hack_motif_clipboard_selection (Atom selection_atom, Lisp_Object selection_value, Time thyme, Display *display,
--- a/src/sheap.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/sheap.c Thu Feb 20 08:19:44 2003 +0000 @@ -134,21 +134,26 @@ (long) (STATIC_HEAP_SIZE / 1024), (long) STATIC_HEAP_SLOP / 1024); - if (lost > STATIC_HEAP_SLOP) { - sprintf (buf + strlen (buf), " -- %ldk wasted", (long)(lost/1024)); - if (die_if_pure_storage_exceeded) { - sheap_adjust_h(STATIC_HEAP_SLOP - lost); - sprintf (buf + strlen (buf), " -- reset to %ldk", - (long) ((STATIC_HEAP_SIZE + STATIC_HEAP_SLOP - lost) / 1024)); - rc = -1; + if (lost > STATIC_HEAP_SLOP) + { + sprintf (buf + strlen (buf), " -- %ldk wasted", (long)(lost/1024)); + if (die_if_pure_storage_exceeded) + { + sheap_adjust_h(STATIC_HEAP_SLOP - lost); + sprintf (buf + strlen (buf), " -- reset to %ldk", + (long) ((STATIC_HEAP_SIZE + STATIC_HEAP_SLOP - lost) / + 1024)); + rc = -1; + } + message ("%s\n", buf); } - message ("%s", buf); - } - if (rc < 0) { - unlink("SATISFIED"); - fatal ("Static heap size adjusted, Don't Panic! I will restart the `make'"); - } + if (rc < 0) + { + unlink ("SATISFIED"); + stderr_out ("Static heap size adjusted, don't panic! I will restart the `make'\n"); + exit (0); + } }
--- a/src/signal.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/signal.c Thu Feb 20 08:19:44 2003 +0000 @@ -292,7 +292,7 @@ qxe_setitimer (int kind, const struct itimerval *itnew, struct itimerval *itold) { -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY /* setitimer() does not exist on native MS Windows, and appears broken on Cygwin. See win32.c.
--- a/src/syntax.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/syntax.c Thu Feb 20 08:19:44 2003 +0000 @@ -646,7 +646,7 @@ (character, syntax_table)) { Lisp_Object mirrortab; - int code; + enum syntaxcode code; CHECK_CHAR_COERCE_INT (character); syntax_table = check_syntax_table (syntax_table, @@ -889,7 +889,8 @@ int prev_syncode; UPDATE_SYNTAX_CACHE_BACKWARD (scache, from - 1); prev_syncode = - SYNTAX_CODE_FROM_CACHE (scache, BUF_FETCH_CHAR (buf, from - 1)); + SYNTAX_CODE_FROM_CACHE (scache, + BUF_FETCH_CHAR (buf, from - 1)); if (SYNTAX_CODES_END_P (prev_syncode, syncode)) { @@ -913,7 +914,8 @@ int prev_syncode; UPDATE_SYNTAX_CACHE_BACKWARD (scache, from - 1); prev_syncode = - SYNTAX_CODE_FROM_CACHE (scache, BUF_FETCH_CHAR (buf, from - 1)); + SYNTAX_CODE_FROM_CACHE (scache, + BUF_FETCH_CHAR (buf, from - 1)); if (SYNTAX_CODES_START_P (prev_syncode, syncode)) {
--- a/src/syntax.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/syntax.h Thu Feb 20 08:19:44 2003 +0000 @@ -86,13 +86,13 @@ /* Return the syntax code for a particular character and mirror table. */ DECLARE_INLINE_HEADER ( -enum syntaxcode +int SYNTAX_CODE (Lisp_Object table, Ichar c) ) { type_checking_assert (XCHAR_TABLE (table)->mirror_table_p); update_mirror_syntax_if_dirty (table); - return (enum syntaxcode) XINT (get_char_table_1 (c, table)); + return XINT (get_char_table_1 (c, table)); } #ifdef NOT_WORTH_THE_EFFORT @@ -100,7 +100,7 @@ /* Same but skip the dirty check. */ DECLARE_INLINE_HEADER ( -enum syntaxcode +int SYNTAX_CODE_1 (Lisp_Object table, Ichar c) ) { @@ -353,7 +353,14 @@ UPDATE_SYNTAX_CACHE_FORWARD (struct syntax_cache *cache, Charxpos pos) ) { - if (!(pos >= cache->prev_change && pos < cache->next_change)) + /* #### Formerly this function, and the next one, had + + if (pos < cache->prev_change || pos >= cache->next_change) + + just like for plain UPDATE_SYNTAX_CACHE. However, sometimes the + value of POS may be invalid (particularly, it may be 0 for a buffer). + FSF has the check at only one end, so let's try the same. */ + if (pos >= cache->next_change) update_syntax_cache (cache, pos, 1); } @@ -364,7 +371,7 @@ UPDATE_SYNTAX_CACHE_BACKWARD (struct syntax_cache *cache, Charxpos pos) ) { - if (!(pos >= cache->prev_change && pos < cache->next_change)) + if (pos < cache->prev_change) update_syntax_cache (cache, pos, -1); } @@ -374,7 +381,7 @@ UPDATE_SYNTAX_CACHE (struct syntax_cache *cache, Charxpos pos) ) { - if (!(pos >= cache->prev_change && pos < cache->next_change)) + if (pos < cache->prev_change || pos >= cache->next_change) update_syntax_cache (cache, pos, 0); }
--- a/src/sysdep.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/sysdep.c Thu Feb 20 08:19:44 2003 +0000 @@ -2187,7 +2187,7 @@ void *data_start = minimum_address_seen; #endif -#if !defined (WIN32_NATIVE) && !defined (CYGWIN) +#ifndef WIN32_ANY void *data_end = sbrk (0); #else void *data_end = maximum_address_seen;
--- a/src/sysfile.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/sysfile.h Thu Feb 20 08:19:44 2003 +0000 @@ -60,7 +60,7 @@ #include <sys/stat.h> -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY # include <io.h> #endif @@ -452,7 +452,7 @@ #endif /* WIN32_NATIVE */ -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY #define DEVICE_SEP ':' @@ -468,13 +468,13 @@ return (c == '/' || c == '\\' || c == ':'); } -#else /* not (defined (WIN32_NATIVE) || defined (CYGWIN)) */ +#else /* not WIN32_ANY */ #define IS_DEVICE_SEP(c) 0 #define IS_DIRECTORY_SEP(c) ((c) == DIRECTORY_SEP) #define IS_ANY_SEP(c) IS_DIRECTORY_SEP (c) -#endif /* defined (WIN32_NATIVE) || defined (CYGWIN) */ +#endif /* WIN32_ANY */ #endif /* emacs */
--- a/src/systime.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/systime.h Thu Feb 20 08:19:44 2003 +0000 @@ -266,12 +266,12 @@ #endif /* WIN32_NATIVE */ -#if defined (WIN32_NATIVE) || defined (CYGWIN) +#ifdef WIN32_ANY int mswindows_setitimer (int kind, const struct itimerval *itnew, struct itimerval *itold); -#endif /* defined (WIN32_NATIVE) || defined (CYGWIN) */ +#endif /* WIN32_ANY */ /* #### Move this comment elsewhere when we figure out the place.
--- a/src/text.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/text.c Thu Feb 20 08:19:44 2003 +0000 @@ -2898,7 +2898,7 @@ #endif } -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY /* Optimize the common case involving Unicode where only ASCII is involved */ else if (source_type != DFC_TYPE_LISP_LSTREAM && sink_type != DFC_TYPE_LISP_LSTREAM && @@ -2932,7 +2932,7 @@ Dynarr_add (conversion_out_dynarr, (Extbyte) '\0'); } } -#endif /* HAVE_WIN32_CODING_SYSTEMS */ +#endif /* WIN32_ANY */ else { Lisp_Object streams_to_delete[3]; @@ -2940,9 +2940,9 @@ Lisp_Object instream, outstream; Lstream *reader, *writer; -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY the_hard_way: -#endif /* HAVE_WIN32_CODING_SYSTEMS */ +#endif /* WIN32_ANY */ delete_count = 0; if (source_type == DFC_TYPE_LISP_LSTREAM) instream = source->lisp_object; @@ -3088,7 +3088,7 @@ Dynarr_add_many (conversion_in_dynarr, source->data.ptr, source->data.len); #endif } -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY /* Optimize the common case involving Unicode where only ASCII/Latin-1 is involved */ else if (source_type != DFC_TYPE_LISP_LSTREAM && @@ -3131,7 +3131,7 @@ #endif /* MULE */ } } -#endif /* HAVE_WIN32_CODING_SYSTEMS */ +#endif /* WIN32_ANY */ else { Lisp_Object streams_to_delete[3]; @@ -3139,9 +3139,9 @@ Lisp_Object instream, outstream; Lstream *reader, *writer; -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY the_hard_way: -#endif /* HAVE_WIN32_CODING_SYSTEMS */ +#endif /* WIN32_ANY */ delete_count = 0; if (source_type == DFC_TYPE_LISP_LSTREAM) instream = source->lisp_object;
--- a/src/text.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/text.h Thu Feb 20 08:19:44 2003 +0000 @@ -1091,20 +1091,20 @@ /* Make an alloca'd copy of a Lisp string */ #define LISP_STRING_TO_ALLOCA(s, lval) \ do { \ - Ibyte **_lta_ = (Ibyte **) &(lval); \ + Ibyte **_lta_ = (Ibyte **) &(lval); \ Lisp_Object _lta_2 = (s); \ *_lta_ = alloca_array (Ibyte, 1 + XSTRING_LENGTH (_lta_2)); \ memcpy (*_lta_, XSTRING_DATA (_lta_2), 1 + XSTRING_LENGTH (_lta_2)); \ } while (0) -/* Make an alloca'd copy of a Ibyte * */ +/* Make an alloca'd copy of a Ibyte * */ \ #define IBYTE_STRING_TO_ALLOCA(p, lval) \ -do { \ +do { \ Ibyte **_bsta_ = (Ibyte **) &(lval); \ - const Ibyte *_bsta_2 = (p); \ - Bytecount _bsta_3 = qxestrlen (_bsta_2); \ + const Ibyte *_bsta_2 = (p); \ + Bytecount _bsta_3 = qxestrlen (_bsta_2); \ *_bsta_ = alloca_array (Ibyte, 1 + _bsta_3); \ - memcpy (*_bsta_, _bsta_2, 1 + _bsta_3); \ + memcpy (*_bsta_, _bsta_2, 1 + _bsta_3); \ } while (0)
--- a/src/unicode.c Thu Feb 20 08:16:21 2003 +0000 +++ b/src/unicode.c Thu Feb 20 08:19:44 2003 +0000 @@ -2288,7 +2288,7 @@ int dfc_coding_system_is_unicode (Lisp_Object codesys) { -#ifdef HAVE_WIN32_CODING_SYSTEMS +#ifdef WIN32_ANY codesys = Fget_coding_system (codesys); return (EQ (XCODING_SYSTEM_TYPE (codesys), Qunicode) && XCODING_SYSTEM_UNICODE_TYPE (codesys) == UNICODE_UTF_16 &&
--- a/src/xmmanagerp.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/xmmanagerp.h Thu Feb 20 08:19:44 2003 +0000 @@ -26,11 +26,11 @@ #ifndef INCLUDED_xmmanagerp_h_ #define INCLUDED_xmmanagerp_h_ -#include <Xm/Xm.h> /* to get XmVersion */ +#include "xmotif.h" /* to get XmVersion */ #if (XmVersion >= 1002) # include <Xm/ManagerP.h> #else -# include <Xm/XmP.h> +# include "xmprimitivep.h" #endif #endif /* INCLUDED_xmmanagerp_h_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/xmotif.h Thu Feb 20 08:19:44 2003 +0000 @@ -0,0 +1,31 @@ +/* This file just includes the Motif header file Xm.h, but does + the necessary magic to do this properly without warnings. + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +XEmacs is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Synched up with: Not in FSF. */ + +#ifndef INCLUDED_xmotif_h_ +#define INCLUDED_xmotif_h_ + +/* Kludge around shadowing warnings */ +#define time time_ +#include <Xm/Xm.h> +#undef time + +#endif /* INCLUDED_xmotif_h_ */
--- a/src/xmprimitivep.h Thu Feb 20 08:16:21 2003 +0000 +++ b/src/xmprimitivep.h Thu Feb 20 08:19:44 2003 +0000 @@ -26,11 +26,15 @@ #ifndef INCLUDED_xmprimitivep_h_ #define INCLUDED_xmprimitivep_h_ -#include <Xm/Xm.h> /* to get XmVersion */ +#include "xmotif.h" /* to get XmVersion */ +# define time time_ +# define message message_ #if (XmVersion >= 1002) # include <Xm/PrimitiveP.h> #else # include <Xm/XmP.h> #endif +# undef message +# undef time #endif /* INCLUDED_xmprimitivep_h_ */