From: tomo Date: Wed, 25 Sep 2002 12:04:52 +0000 (+0000) Subject: This commit was generated by cvs2svn to compensate for changes in r5209, X-Git-Tag: r21-4-11-chise-0_20-2^2~3 X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=commitdiff_plain;h=5550b5b91e953696b468934fd97770824224c3ee;hp=83ae2cea390538b6148af611d9dae32160eb3bd4 This commit was generated by cvs2svn to compensate for changes in r5209, which included commits to RCS files with non-trunk default branches. --- diff --git a/INSTALL b/INSTALL index 44a27d5..8282e8b 100644 --- a/INSTALL +++ b/INSTALL @@ -373,11 +373,16 @@ supports. MAIL LOCKING ============ -Find out what the preferred method for locking mail spool files is in -your environment. Presently, XEmacs supports lockf, flock, and dot -locking. Specify the locking method via the --mail-locking=METHOD -option to configure. Valid values for METHOD are --mail-locking are -`lockf', `flock', and `dot'. +For most platforms, configure or the src/s file have the preferred +method for locking mail spool files preconfigured. Otherwise you must +find out for youself. Do not choose a locking protocol "on the +objective merits." XEmacs must use the same method as other mail +utilities on your system, or you will lose mail. + +Presently, XEmacs supports lockf, flock, and dot locking. Specify the +locking method via the --mail-locking=METHOD option to configure. +Valid values for METHOD are --mail-locking are `lockf', `flock', and +`dot'. RUNNING CONFIGURE ================= diff --git a/PROBLEMS b/PROBLEMS index 52f2b30..ccce14f 100644 --- a/PROBLEMS +++ b/PROBLEMS @@ -17,19 +17,48 @@ Use `C-c C-f' to move to the next equal level of outline, and `C-c C-b' to move to previous equal level. `C-h m' will give more info about the Outline mode. -Also, Try finding the things you need using one of the search commands +Also, try finding the things you need using one of the search commands XEmacs provides (e.g. `C-s'). General advice: + WATCH OUT for your init file! (~/.xemacs/init.el or ~/.emacs) If you observe strange problems, invoke XEmacs with the `-vanilla' option and see if you can repeat the problem. + Note that most of the problems described here manifest at RUN + time, even those described as BUILD problems. It is quite unusual + for a released XEmacs to fail to build. So a "build problem" + requires you to tweak the build environment, then rebuild XEmacs. + A "runtime problem" is one that can be fixed by proper + configuration of the existing build. Compatibility problems and + Mule issues are generally runtime problems, but are treated + separately for convenience. + * Problems with building XEmacs =============================== ** General + Much general information is in INSTALL. If it's covered in + INSTALL, we don't repeat it here. + +*** How does I configure to get the buffer tabs/progress bars? + +These features depend on support for "native widgets". Use the +--with-widgets option to configure. Configuration of widgets is +automatic for "modern" toolkits (MS Windows, GTK, and Motif), but if +you are using Xt and the Athena widgets, you will probably want to +specify a "3d" widget set. See configure --usage, and don't forget to +install the corresponding development libraries. + +*** I know I have libfoo installed, but configure doesn't find it. + +Typical of Linux systems with package managers. To link with a shared +library, you only need the shared library. To compile objects that +link with it, you need the headers---and distros don't provide them with +the libraries. You need the additional "development" package, too. + *** Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures without also using `-fno-schedule-insns'. @@ -1362,6 +1391,34 @@ affected virtually all ioctl() calls. ** Linux +*** XEmacs crashes on startup, in make-frame. + +Typically the Lisp backtrace includes + + make-frame(nil #) + +somewhere near the top. One problem is due to an improvement in GNU +ld that sorts the ELF reloc sections in the executable, giving +dramatic speedups in startup for large executables. It also confuses +the traditional unexec code in XEmacs, leading to the core dump. The +solution is to use either the `--ldflags="-z nocombreloc" or the +"--pdump" option to configure. "--pdump" is recommended. + +Recent 21.4 and 21.5 versions of XEmacs autodetect this feature of ld +in configure. Unfortunately, Red Hat and SuSE (at least) distributed +prerelease versions of ld (numbered around 2.11.90.x.y, nicknamed +"Hannibal Lecter" at XEmacs.ORG) where autodetection fails but the +feature is enabled by default. The recommended procedure is to +upgrade to binutils >= 2.12 and rerun configure. Otherwise you must +apply the flags by hand. + +Andrew Jaffe reported a problem on Red Hat 7.3 with identical +symptoms, except that ld was already being invoked with -z +nocombreloc. Switching dialogs and widgets from Motif to Athena +eliminated the problem. Both LessTif and OpenMotif were installed, +and a bad interaction is suspected. This problem has not yet been +fully analyzed. + *** Debian **** XEmacs warns "Symbol `toggleClassRec' has different size in shared object, consider re-linking / Symbol `labelClassRec' has different @@ -1456,30 +1513,6 @@ http://www.geocities.com/kensanata/color-emacs.html#ansicolors This is written for the mainline GNU Emacs but the author has made efforts to adapt it to XEmacs. YMMV. -*** You get crashes in a non-C locale with Linux GNU Libc 2.0. - -Internationalization was not the top priority for GNU Libc 2.0. -As of this writing (1998-12-28) you may get crashes while running -XEmacs in a non-C locale. For example, `LC_ALL=en_US xemacs' crashes -while `LC_ALL=C xemacs' runs fine. This happens for example with GNU -libc 2.0.7. Installing libintl.a and libintl.h built from gettext -0.10.35 and re-building XEmacs solves the crashes. Presumably soon -everyone will upgrade to GNU Libc 2.1 and this problem will go away. - -*** `C-z', or `M-x suspend-emacs' hangs instead of suspending. - -If you build with `gpm' support on Linux, you cannot suspend XEmacs -because gpm installs a buggy SIGTSTP handler. Either compile with -`--with-gpm=no', or don't suspend XEmacs on the Linux console until -this bug is fixed. - -*** With certain fonts, when the cursor appears on a character, the -character doesn't appear--you get a solid box instead. - -One user on a Linux system reported that this problem went away with -installation of a new X server. The failing server was XFree86 3.1.1. -XFree86 3.1.2 works. - *** Slow startup on Linux. People using systems based on the Linux kernel sometimes report that @@ -1561,6 +1594,30 @@ second SIGUSR1 causes the default behavior of ending the process. The solution is either to build XEmacs with -sound=native,noesd or to make sure that esd is in fact running. +*** You get crashes in a non-C locale with Linux GNU Libc 2.0. + +Internationalization was not the top priority for GNU Libc 2.0. +As of this writing (1998-12-28) you may get crashes while running +XEmacs in a non-C locale. For example, `LC_ALL=en_US xemacs' crashes +while `LC_ALL=C xemacs' runs fine. This happens for example with GNU +libc 2.0.7. Installing libintl.a and libintl.h built from gettext +0.10.35 and re-building XEmacs solves the crashes. Presumably soon +everyone will upgrade to GNU Libc 2.1 and this problem will go away. + +*** `C-z', or `M-x suspend-emacs' hangs instead of suspending. + +If you build with `gpm' support on Linux, you cannot suspend XEmacs +because gpm installs a buggy SIGTSTP handler. Either compile with +`--with-gpm=no', or don't suspend XEmacs on the Linux console until +this bug is fixed. + +*** With certain fonts, when the cursor appears on a character, the +character doesn't appear--you get a solid box instead. + +One user on a Linux system reported that this problem went away with +installation of a new X server. The failing server was XFree86 3.1.1. +XFree86 3.1.2 works. + ** IRIX *** On Irix, I don't see the toolbar icons and I'm getting lots of entries in the warnings buffer. diff --git a/configure.usage b/configure.usage index 2a4aeee..361a596 100644 --- a/configure.usage +++ b/configure.usage @@ -169,7 +169,7 @@ Additional features: development environment. --with-socks Compile with support for SOCKS (an Internet proxy). --with-dnet (*) Compile with support for DECnet. ---with-modules Compile in experimental support for dynamically +--with-modules (*) Compile in experimental support for dynamically loaded libraries (Dynamic Shared Objects). --with-netinstall Compile in support for installation over the internet. Only functional on the MS Windows platforms. diff --git a/etc/BETA b/etc/BETA index cb00c65..26a91fd 100644 --- a/etc/BETA +++ b/etc/BETA @@ -151,7 +151,7 @@ and go play minesweep for a while on an older XEmacs while the binary is rebuilt. ** Building XEmacs from a full distribution -============================================== +=========================================== Locate a convenient place where you have at least 100MB of free space and issue the command @@ -266,7 +266,97 @@ build report should include: of the developers. -* Patching XEmacs +* Packages +========== + +[Note: these instructions have been partly updated, but not carefully +reviewed in some time. Caveat tester.] + +Starting with XEmacs 21.1, much of the functionality of XEmacs has +been unbundled into "the packages." For more information about the +package system, see the Info nodes on Packages (in the XEmacs User +Manual) and on Packaging (in the Lisp Reference). + +When bootstrapping XEmacs, you may need to manually install some +packages (at least xemacs-base and efs). These packages are available +by FTP at ftp://ftp.xemacs.org/pub/xemacs/packages/. + +** Binary package installation +============================== + +Prerequisite: XEmacs 21.0-b1. + +Binary packages are complete entities that can be untarred at the top +level of an XEmacs package hierarchy and work at runtime. To install files +in this directory, run the command `M-x package-admin-add-binary-package' +and fill in appropriate values to the prompts. + +** Manual procedures for package management +=========================================== + +Prerequisite: XEmacs 21.0 + +When adding and deleting files from a lisp directory the +auto-autoloads.el (global symbols) and custom-load.el (Customization +groups) must be kept in synch. Assuming one is manipulating a +directory called `lisp-utils', the command to rebuild the +auto-autoloads.el file is: + +xemacs -vanilla -batch -l autoload -f batch-update-directory lisp-utils + +The command to rebuild the custom-load.el file is: + +xemacs -vanilla -batch -l cus-dep -f Custom-make-dependencies lisp-utils + +To bytecompile both of these files the command is: + +xemacs -vanilla -batch -f batch-byte-compile \ + lisp-utils/auto-autoloads.el lisp-utils/custom-load.el + +** Building XEmacs and XEmacs packages from scratch +=================================================== + +To build everything completely from scratch (not a high priority as a +design goal), the following procedure should work. (I don't recommend +building this way). + +*** Phase 1 -- Get a minimal XEmacs binary with mule to build the package + lisp with. + +**** Grab a mule-base tarball and install it into a newly created package + directory. + +**** Configure XEmacs with mule and a package-path including the + directory created above. + +**** Do a `make dist' to build an XEmacs binary. + +*** Phase 2 -- Build and install the package lisp. + +**** Modify XEmacs.rules for local paths and the XEmacs binary created in + Phase 1. + +**** Do a make from the top level package lisp source directory.[1] + +**** Do `make bindist's on all the packages you wish to install and + remove the byproduct .tar.gz's. + +*** Phase 3 -- If necessary, redump XEmacs + with the packages that require dump-time support and install it. + +**** Reconfigure without Mule if you don't wish a Mule-ish XEmacs, and + rebuild XEmacs. + +- or - + +**** rm lib-src/DOC src/xemacs; make + +**** Install or run in-place. + +Note that this is in essence what `make all-elc' has always done. + + +* Improving XEmacs ================= ** Creating patches for submission @@ -386,91 +476,93 @@ then post a short COMMIT notice to xemacs-patches when you commit to CVS. Members of the Review Board will also post short notices of administrative action (APPROVE, VETO, QUERY, etc) to xemacs-patches. -* Packages -==================================== - -[Note: these instructions have been partly updated, but not carefully -reviewed in some time. Caveat tester.] - -Starting with XEmacs 21.1, much of the functionality of XEmacs has -been unbundled into "the packages." For more information about the -package system, see the Info nodes on Packages (in the XEmacs User -Manual) and on Packaging (in the Lisp Reference). - -When bootstrapping XEmacs, you may need to manually install some -packages (at least xemacs-base and efs). These packages are available -by FTP at ftp://ftp.xemacs.org/pub/xemacs/packages/. - -** Binary package installation -================================================ - -Prerequisite: XEmacs 21.0-b1. - -Binary packages are complete entities that can be untarred at the top -level of an XEmacs package hierarchy and work at runtime. To install files -in this directory, run the command `M-x package-admin-add-binary-package' -and fill in appropriate values to the prompts. - -** Manual procedures for package management -=========================================== - -Prerequisite: XEmacs 21.0 - -When adding and deleting files from a lisp directory the -auto-autoloads.el (global symbols) and custom-load.el (Customization -groups) must be kept in synch. Assuming one is manipulating a -directory called `lisp-utils', the command to rebuild the -auto-autoloads.el file is: - -xemacs -vanilla -batch -l autoload -f batch-update-directory lisp-utils - -The command to rebuild the custom-load.el file is: - -xemacs -vanilla -batch -l cus-dep -f Custom-make-dependencies lisp-utils - -To bytecompile both of these files the command is: - -xemacs -vanilla -batch -f batch-byte-compile \ - lisp-utils/auto-autoloads.el lisp-utils/custom-load.el - -** Building XEmacs and XEmacs packages from scratch -=================================================== - -To build everything completely from scratch (not a high priority as a -design goal), the following procedure should work. (I don't recommend -building this way). - -*** Phase 1 -- Get a minimal XEmacs binary with mule to build the package - lisp with. - -**** Grab a mule-base tarball and install it into a newly created package - directory. - -**** Configure XEmacs with mule and a package-path including the - directory created above. - -**** Do a `make dist' to build an XEmacs binary. - -*** Phase 2 -- Build and install the package lisp. - -**** Modify XEmacs.rules for local paths and the XEmacs binary created in - Phase 1. - -**** Do a make from the top level package lisp source directory.[1] - -**** Do `make bindist's on all the packages you wish to install and - remove the byproduct .tar.gz's. - -*** Phase 3 -- If necessary, redump XEmacs - with the packages that require dump-time support and install it. - -**** Reconfigure without Mule if you don't wish a Mule-ish XEmacs, and - rebuild XEmacs. - -- or - - -**** rm lib-src/DOC src/xemacs; make - -**** Install or run in-place. - -Note that this is in essence what `make all-elc' has always done. +** Large contributions +====================== + +Perhaps you have a whole new mode, or a major synchronization with +upstream for a neglected package, or a synchronization with GNU Emacs +you would like to contribute. We welcome such contributions, but they +are likely to be relatively controversial, generate more comments and +requests for revision, and take longer to integrate. Please be +patient with the process. + +*** Updates to existing packages +-------------------------------- + +If a package has gotten a bit out of date, or even started to bitrot, +we welcome patches to synchronize it with upstream/GNU Emacs versions. +Most packages end up varying somewhat from their GNU origins. See +"Syncing with GNU Emacs" for hints. Note that if you do a reasonably +large amount of syncing with GNU Emacs, you should log this in the +file itself as well as in the ChangeLog. + +If the package is important to you, please consider becoming the +maintainer. (See "New packages", below.) + +*** New packages +---------------- + +If you have a new mode or other large addition that does not require +changes to the core, please consider submitting it as a package, and +becoming the maintainer. You get direct commit privileges to the +repository for your package, "approval" privileges for your own +patches as well as third party patches to your package, and some +degree of veto power over patches you don't like. In return, you are +expected to maintain friendly liaison with the upstream developer (if +you aren't the upstream developer), keep watch on the XEmacs Patches +list for relevant patches, and be available by email to other +developers for discussion of changes that impact your package. It's +also a pretty standard route to the "core" development group, where we +have plenty of extra work waiting for volunteers. + +You don't have to become the maintainer, but it virtually ensures +rapid acceptance of the package. + +For help in creating new packages, see the (rather sparse) discussions +in the XEmacs User's Guide and the Lisp Reference Manual. The XEmacs +Package Release Engineer (Ville Skyttä is +currently serving with Peter Brown +assisting; Steve Youngs and Stephen Turnbull + also can help) is the most likely source of advice. + +*** Syncing with GNU Emacs +-------------------------- + +Syncing with GNU Emacs is an important activity. Although each +version has its advantages and areas of concentration, it is very +desirable that common functionality share specifications and APIs. +When porting GNU code to XEmacs, the following points should be given +special attention: + + o Recent GNU Emacsen cannot be built without Mule, but XEmacs can. + Make sure your changes do not assume the presence of Mule. + + o GNU Emacs nomenclature often differs from that of XEmacs. + Sometimes syncing the names is desirable, other times not. + + o GNU Emacs functionality often differs from that of XEmacs. + Syncing functionality is often controversial. + +It is important that you let other developers know that +synchronization has taken place, to what degree, and when. For this +purpose, we use comments of the form + +/* Synched up with: FSF 21.3 by Stephen Turnbull */ + +in the source file itself, as the last element of the prefatory +material (copyright notice and commentary). Obviously the comment +marker needs to be changed to leading semicolons for Lisp, but +otherwise the format is the same. + +Of course you should note syncing as the purpose in the ChangeLog, +too. But entries get buried deep in the ChangeLog file, and may even +get moved to a separate ChangeLog.OLD file for rarely synched files. + +Rather than dates we use the version of GNU Emacs to sync to. If the +synchronization is partial, add a new comment describing what has +actually been synched, leaving the description of the last full sync +in place. At each full sync, remove all previous synchronization +comments. + +This applies to Lisp that we have broken out into packages, but +remains in the GNU Emacs core, as well to core Lisp in XEmacs. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index f4b6416..72125a3 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,29 @@ +2002-08-23 Stephen J. Turnbull + + * XEmacs 21.4.9 "Informed Management" is released. + +2002-07-17 Stephen J. Turnbull + + * mmencode.c (fromqp): + * yow.c (yow): + * movemail.c (main): + * make-docfile.c (scan_c_file): + * gnuserv.c (permitted): + * ootags.c (erlang_func): + (prolog_pred): + * etags.c (C_entries): + Fix warnings. + +2002-05-29 Greg Steuck + + * gnuclient.c: Makes it possible again to #undef + INTERNET_DOMAIN_SOCKETS in lib-src/gnuserv.h and get a functional + gnuserv which is only accessible through UNIX_DOMAIN_SOCKETS. + +2002-05-10 Stephen J. Turnbull + + * Makefile.in.in: Add winclient targets (Andy synch). + 2002-05-09 Stephen J. Turnbull * XEmacs 21.4.8 "Honest Recruiter" is released. diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in index 12663b8..a90d682 100644 --- a/lib-src/Makefile.in.in +++ b/lib-src/Makefile.in.in @@ -88,6 +88,9 @@ PUBLIC_INSTALLABLE_EXES=\ #ifdef HAVE_SHLIB ellcc\ #endif +#ifdef HAVE_MS_WINDOWS + winclient\ +#endif etags ctags b2m ootags PUBLIC_INSTALLABLE_SCRIPTS=\ @@ -357,6 +360,9 @@ i: ${srcdir}/i.c minitar: ${srcdir}/../nt/minitar.c $(CC) $(cflags) ${srcdir}/../nt/minitar.c $(ldflags) -lz -o $@ +winclient: ${srcdir}/winclient.c + $(CC) $(cflags) ${srcdir}/winclient.c $(ldflags) -o $@ + hexl: ${srcdir}/hexl.c $(CC) $(cflags) ${srcdir}/hexl.c $(ldflags) -o $@ diff --git a/lib-src/etags.c b/lib-src/etags.c index 7ae810d..8b81e61 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -2805,6 +2805,7 @@ C_entries (c_ext, inf) midtoken = inquote = inchar = incomm = quotednl = FALSE; token.valid = savetoken.valid = FALSE; cblev = 0; + typdefcblev = 0; parlev = 0; cplpl = (c_ext & C_PLPL) == C_PLPL; cjava = (c_ext & C_JAVA) == C_JAVA; diff --git a/lib-src/gnuclient.c b/lib-src/gnuclient.c index 4ed986d..aaec46a 100644 --- a/lib-src/gnuclient.c +++ b/lib-src/gnuclient.c @@ -329,11 +329,11 @@ main (int argc, char *argv[]) char *remotearg; char thishost[HOSTNAMSZ]; /* this hostname */ char remotepath[MAXPATHLEN+1]; /* remote pathname */ - char *path; int rflg = 0; /* pathname given on cmdline */ char *portarg; unsigned short port = 0; /* port to server */ #endif /* INTERNET_DOMAIN_SOCKETS */ + char *path; /* used indiscriminately */ #ifdef SYSV_IPC struct msgbuf *msgp; /* message */ #endif /* SYSV_IPC */ @@ -470,13 +470,14 @@ main (int argc, char *argv[]) progname); exit (1); } +#if defined(INTERNET_DOMAIN_SOCKETS) if (suppress_windows_system && hostarg) { fprintf (stderr, "%s: Remote editing is available only on X\n", progname); exit (1); } - +#endif *result = '\0'; if (eval_function || eval_form || load_library) { @@ -568,7 +569,7 @@ main (int argc, char *argv[]) } /* Don't do disconnect_from_server because we have already read data, and disconnect doesn't do anything else. */ -#ifndef INTERNET_DOMAIN_SOCKETS +#ifdef SYSV_IPC if (connect_type == (int) CONN_IPC) disconnect_from_ipc_server (s, msgp, FALSE); #endif /* !SYSV_IPC */ diff --git a/lib-src/gnuserv.c b/lib-src/gnuserv.c index 27a9869..0c8cf22 100644 --- a/lib-src/gnuserv.c +++ b/lib-src/gnuserv.c @@ -490,7 +490,7 @@ permitted (unsigned long host_addr, int fd) auth_data_len = atoi(buf); - if (auth_data_len <= 0 || auth_data_len > sizeof(buf)) + if (auth_data_len <= 0 || auth_data_len > (int) sizeof(buf)) { return FALSE; } diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 2ccf4eb..aeee24a 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -509,7 +509,7 @@ scan_c_file (const char *filename, const char *mode) register int defvarperbufferflag = 0; register int defvarflag; int minargs, maxargs; - int l = strlen (filename); + size_t l = strlen (filename); char f[MAXPATHLEN]; if (l > sizeof (f)) diff --git a/lib-src/mmencode.c b/lib-src/mmencode.c index 96fb29b..7dcb0e6 100644 --- a/lib-src/mmencode.c +++ b/lib-src/mmencode.c @@ -349,7 +349,7 @@ toqp(FILE *infile, FILE *outfile) static void fromqp(FILE *infile, FILE *outfile, char **boundaries, int *boundaryct) { - unsigned int c1, c2; + int c1, c2; int sawnewline = 1, neednewline = 0; /* The neednewline hack is necessary because the newline leading into a multipart boundary is part of the boundary, not the data */ diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 7a9dd77..623b3c2 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -440,7 +440,7 @@ main (int argc, char *argv[]) errno = saved_errno; pfatal_with_name (outname); } - if (nread < sizeof buf) + if (nread < (int) sizeof buf) break; } } diff --git a/lib-src/ootags.c b/lib-src/ootags.c index fbeb766..23ef639 100644 --- a/lib-src/ootags.c +++ b/lib-src/ootags.c @@ -4411,7 +4411,7 @@ prolog_pred (s, last) /* Save only the first clause. */ if (last == NULL - || len != strlen (last) + || len != (int) strlen (last) || !strneq (s, last, len)) { pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE, @@ -4565,7 +4565,7 @@ erlang_func (s, last) /* Save only the first clause. */ if (s[pos++] == '(' && (last == NULL - || len != strlen (last) + || len != (int) strlen (last) || !strneq (s, last, len))) { pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE, diff --git a/lib-src/yow.c b/lib-src/yow.c index 7390373..399d070 100644 --- a/lib-src/yow.c +++ b/lib-src/yow.c @@ -124,7 +124,7 @@ yow (FILE *fp) long offset; int c, i = 0; char *buf; - unsigned int bufsize; + int bufsize; offset = rand() % len + header_len; if (fseek(fp, offset, 0) == -1) { diff --git a/lisp/about.el b/lisp/about.el index 31bf273..a0f5714 100644 --- a/lisp/about.el +++ b/lisp/about.el @@ -210,7 +210,7 @@ (marcpa . "http://www.positron911.com/products/power.htm") (ograf . "http://www.fga.de/~ograf/") (pez . "http://cbs.sportsline.com/") - (piper . "http://www.xemacs.freeserve.co.uk/") + (piper . "http://www.andypiper.com/") (rossini . "http://faculty.washington.edu/rossini/") (stigb . "http://www.tihlde.hist.no/~stigb/") (vin . "http://www.upa.org/") @@ -1244,8 +1244,10 @@ for CBS SportsLine. See ") My home page is here:\n") (about-url-link 'piper nil "Visit andy's home page") (widget-insert "\n -Andy has recently rejoined the XEmacs team to help port XEmacs to -MS Windows operating systems.\n")) + Andy has been active in the XEmacs team for a number of years, +helping port XEmacs to MS Windows operating systems. He is also the +current MS Windows release manager and maintains the MS Windows +netinstaller.\n")) (pittman (widget-insert "\ diff --git a/lisp/autoload.el b/lisp/autoload.el index 9911d82..8ca8bbc 100644 --- a/lisp/autoload.el +++ b/lisp/autoload.el @@ -40,30 +40,33 @@ ;;; Code: (defun make-autoload (form file) - "Turn FORM, a defun or defmacro, into an autoload for source file FILE. -Returns nil if FORM is not a defun, define-skeleton or defmacro." + "Turn a definition generator FORM into an autoload for source file FILE. +Returns nil if FORM is not a defun, define-skeleton, define-derived-mode, +or defmacro." (let ((car (car-safe form))) - (if (memq car '(defun define-skeleton defmacro)) + (if (memq car '(defun define-skeleton defmacro define-derived-mode)) (let ((macrop (eq car 'defmacro)) name doc) (setq form (cdr form) name (car form) ;; Ignore the arguments. - form (cdr (if (eq car 'define-skeleton) - form - (cdr form))) + form (cdr (cond ((eq car 'define-skeleton) + form) + ((eq car 'define-derived-mode) + (cddr form)) + (t + (cdr form)))) doc (car form)) (if (stringp doc) (setq form (cdr form)) (setq doc nil)) (list 'autoload (list 'quote name) file doc (or (eq car 'define-skeleton) + (eq car 'define-derived-mode) (eq (car-safe (car form)) 'interactive)) (if macrop (list 'quote 'macro) nil))) nil))) -(put 'define-skeleton 'doc-string-elt 3) - (defvar generate-autoload-cookie ";;;###autoload" "Magic comment indicating the following form should be autoloaded. Used by `update-file-autoloads'. This string should be @@ -112,6 +115,8 @@ the section of autoloads for a file.") (put 'defvar 'doc-string-elt 3) (put 'defconst 'doc-string-elt 3) (put 'defmacro 'doc-string-elt 3) +(put 'define-skeleton 'doc-string-elt 3) +(put 'define-derived-mode 'doc-string-elt 4) (defun autoload-trim-file-name (file) "Returns a relative pathname of FILE including the last directory." diff --git a/lisp/cmdloop.el b/lisp/cmdloop.el index 17989d0..269fa40 100644 --- a/lisp/cmdloop.el +++ b/lisp/cmdloop.el @@ -391,7 +391,7 @@ when called from Lisp." ; (call-interactively _command _record-flag))))) (defun y-or-n-p-minibuf (prompt) - "Ask user a \"y or n\" question. Return t if answer is \"y\". + "Ask user a \"y or n\" question. Return t if answer is \"y\", nil if \"n\". Takes one argument, which is the string to display to ask the question. It should end in a space; `y-or-n-p' adds `(y or n) ' to it. No confirmation of the answer is requested; a single character is enough. @@ -474,7 +474,7 @@ and can edit it until it as been confirmed." (yes-or-no-p-minibuf prompt))) (defun y-or-n-p (prompt) - "Ask user a \"y or n\" question. Return t if answer is \"y\". + "Ask user a \"y or n\" question. Return t if answer is \"y\", nil if \"n\". Takes one argument, which is the string to display to ask the question. The question is asked with a dialog box or the minibuffer, as appropriate. It should end in a space; `y-or-n-p' adds `(y or n) ' to it. diff --git a/lisp/custom.el b/lisp/custom.el index 5cd137d..4e17045 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -179,7 +179,7 @@ The following KEYWORD's are defined: `custom-initialize-set' :set VALUE should be a function to set the value of the symbol. It takes two arguments, the symbol to set and the value to - give it. The default is `set-default'. + give it. The default is `custom-set-default'. :get VALUE should be a function to extract the value of symbol. The function takes one argument, a symbol, and should return the current value for that symbol. The default is @@ -187,6 +187,11 @@ The following KEYWORD's are defined: :require VALUE should be a feature symbol. Each feature will be required after initialization, of the user have saved this option. +:version VALUE should be a string specifying that the variable was + first introduced, or its default value was changed, in Emacs + version VERSION. +:set-after VARIABLE specifies that SYMBOL should be set after VARIABLE when + both have been customized. Read the section about customization in the Emacs Lisp manual for more information." @@ -323,17 +328,38 @@ Third argument TYPE is the custom option type." "For customization option SYMBOL, handle KEYWORD with VALUE. Fourth argument TYPE is the custom option type." (cond ((eq keyword :group) - (custom-add-to-group value symbol type)) - ((eq keyword :version) - (custom-add-version symbol value)) - ((eq keyword :link) - (custom-add-link symbol value)) - ((eq keyword :load) - (custom-add-load symbol value)) - ((eq keyword :tag) - (put symbol 'custom-tag value)) - (t - (signal 'error (list "Unknown keyword" keyword))))) + (custom-add-to-group value symbol type)) + ((eq keyword :version) + (custom-add-version symbol value)) + ((eq keyword :link) + (custom-add-link symbol value)) + ((eq keyword :load) + (custom-add-load symbol value)) + ((eq keyword :tag) + (put symbol 'custom-tag value)) + ((eq keyword :set-after) + (custom-add-dependencies symbol value)) + (t + (signal 'error (list "Unknown keyword" keyword))))) + +(defun custom-add-dependencies (symbol value) + "To the custom option SYMBOL, add dependencies specified by VALUE. +VALUE should be a list of symbols. For each symbol in that list, +this specifies that SYMBOL should be set after the specified symbol, if +both appear in constructs like `custom-set-variables'." + (unless (listp value) + (error "Invalid custom dependency `%s'" value)) + (let* ((deps (get symbol 'custom-dependencies)) + (new-deps deps)) + (while value + (let ((dep (car value))) + (unless (symbolp dep) + (error "Invalid custom dependency `%s'" dep)) + (unless (memq dep new-deps) + (setq new-deps (cons dep new-deps))) + (setq value (cdr value)))) + (unless (eq deps new-deps) + (put symbol 'custom-dependencies new-deps)))) (defun custom-add-option (symbol option) "To the variable SYMBOL add OPTION. @@ -439,10 +465,18 @@ following keyword arguments (setq old (cdr old))) (put symbol prop (cons (list theme mode value) old)))) +(defvar custom-local-buffer nil + "Non-nil, in a Customization buffer, means customize a specific buffer. +If this variable is non-nil, it should be a buffer, +and it means customize the local bindings of that buffer. +This variable is a permanent local, and it normally has a local binding +in every Customization buffer.") +(put 'custom-local-buffer 'permanent-local t) + (defun custom-set-variables (&rest args) "Initialize variables according to user preferences. The settings are registered as theme `user'. -The arguments should be a list where each entry has the form: +Each argument should be a list of the form: (SYMBOL VALUE [NOW [REQUEST [COMMENT]]]) @@ -459,8 +493,29 @@ Records the settings as belonging to THEME. See `custom-set-variables' for a description of the arguments ARGS." (custom-check-theme theme) + (setq args + (sort args + (lambda (a1 a2) + (let* ((sym1 (car a1)) + (sym2 (car a2)) + (1-then-2 (memq sym1 (get sym2 'custom-dependencies))) + (2-then-1 (memq sym2 (get sym1 'custom-dependencies)))) + (cond ((and 1-then-2 2-then-1) + (error "Circular custom dependency between `%s' and `%s'" + sym1 sym2)) + (1-then-2 t) + (2-then-1 nil) + ;; Put symbols with :require last. The macro + ;; define-minor-mode generates a defcustom + ;; with a :require and a :set, where the + ;; setter function calls the mode function. + ;; Putting symbols with :require last ensures + ;; that the mode function will see other + ;; customized values rather than default + ;; values. + (t (nth 3 a2))))))) (let ((immediate (get theme 'theme-immediate))) - (while args * etc/custom/example-themes/example-theme.el: + (while args (let ((entry (car args))) (if (listp entry) (let* ((symbol (nth 0 entry)) @@ -468,10 +523,13 @@ See `custom-set-variables' for a description of the arguments ARGS." (now (nth 2 entry)) (requests (nth 3 entry)) (comment (nth 4 entry)) - (set (or (get symbol 'custom-set) 'set-default))) + (set (or (get symbol 'custom-set) 'custom-set-default))) (put symbol 'saved-value (list value)) (custom-push-theme 'theme-value symbol theme 'set value) (put symbol 'saved-variable-comment comment) + ;; Allow for errors in the case where the setter has + ;; changed between versions, say, but let the user know. + (condition-case data (cond ((or now immediate) ;; Rogue variable, set it now. (put symbol 'force-value (if now 'rogue 'immediate)) @@ -479,6 +537,8 @@ See `custom-set-variables' for a description of the arguments ARGS." ((default-boundp symbol) ;; Something already set this, overwrite it. (funcall set symbol (eval value)))) + (error + (message "Error setting %s: %s" symbol data))) (and (or now (default-boundp symbol)) (put symbol 'variable-comment comment)) (when requests @@ -634,6 +694,15 @@ Associate this setting with the `user' theme. The ARGS are as in `custom-theme-reset-variables'." (apply #'custom-theme-reset-variables 'user args)) +(defun custom-set-default (variable value) + "Default :set function for a customizable variable. +Normally, this sets the default value of VARIABLE to VALUE, +but if `custom-local-buffer' is non-nil, +this sets the local binding in that buffer instead." + (if custom-local-buffer + (with-current-buffer custom-local-buffer + (set variable value)) + (set-default variable value))) ;;; The End. diff --git a/lisp/dialog.el b/lisp/dialog.el index db1ed86..4b3f284 100644 --- a/lisp/dialog.el +++ b/lisp/dialog.el @@ -40,8 +40,8 @@ ;;; Code: (defun yes-or-no-p-dialog-box (prompt) "Ask user a yes-or-no question with a popup dialog box. -Return t if the answer is \"yes\". -Takes one argument, which is the string to display to ask the question." +Return t if the answer is \"yes\", nil if \"no\". Takes one argument, +the question string to display." (save-selected-frame (make-dialog-box 'question :question prompt diff --git a/lisp/faces.el b/lisp/faces.el index d92f15f..4f91086 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -847,10 +847,21 @@ the function to be called on it." (setq temp-sp (copy-specifier sp)) - (if (and (or (eq locale 'global) (eq locale 'all) (not locale)) - (not (face-property face property 'global))) - (copy-specifier (face-property 'default property) - temp-sp 'global)) + (if (or (eq locale 'global) (eq locale 'all) (not locale)) + (when (not (specifier-specs temp-sp 'global)) + ;; Try fallback via the official ways and then do it "by hand" + (let* ((fallback (specifier-fallback sp)) + (fallback-sp + (cond ((specifierp fallback) fallback) + ;; just an inst list + (fallback + (make-specifier-and-init (specifier-type sp) + fallback)) + ((eq (get-face face) (get-face 'default)) + (error "Unable to find global specification")) + ;; If no fallback we snoop from default + (t (face-property 'default property))))) + (copy-specifier fallback-sp temp-sp 'global)))) (if (and (valid-specifier-locale-p locale) (not (specifier-specs temp-sp locale))) (error "Property must have a specification in locale %S" locale)) @@ -1603,10 +1614,12 @@ and 'global)." (defun face-complain-about-font (face device) (if (symbolp face) (setq face (symbol-name face))) ;; (if (not inhibit-font-complaints) - (display-warning - 'font - (let ((default-name (face-font-name 'default device))) - (format "%s: couldn't deduce %s %s version of the font + ;; complaining for printers is generally annoying. + (unless (device-printer-p device) + (display-warning + 'font + (let ((default-name (face-font-name 'default device))) + (format "%s: couldn't deduce %s %s version of the font %S. Please specify X resources to make the %s face @@ -1616,14 +1629,14 @@ For example, you could add one of the following to $HOME/Emacs: Emacs.%s.attributeFont: -dt-*-medium-i-* or Emacs.%s.attributeForeground: hotpink\n" - invocation-name - (if (string-match "\\`[aeiouAEIOU]" face) "an" "a") - face - default-name - face - face - face - )))) + invocation-name + (if (string-match "\\`[aeiouAEIOU]" face) "an" "a") + face + default-name + face + face + face + ))))) ;; #### This is quite a mess. We should use the custom mechanism for diff --git a/lisp/find-paths.el b/lisp/find-paths.el index c8848b5..494ed16 100644 --- a/lisp/find-paths.el +++ b/lisp/find-paths.el @@ -236,7 +236,8 @@ If ENFORCE-VERSION is non-nil, the directory must contain the XEmacs version." (or ;; from more to less specific (paths-find-version-directory roots - (concat base system-configuration) + (paths-construct-path + (list system-configuration base)) envvar default) (paths-find-version-directory roots base diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d927539..b1cb31d 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -282,7 +282,7 @@ available for buffers in `c-mode', and level 1 decoration otherwise." (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) - (const :tag "maximum" t) + (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock) @@ -626,7 +626,7 @@ This is normally set via `font-lock-defaults'.") ;; #### barf gag retch. Horrid FSF lossage that we need to ;; keep around for compatibility with font-lock-keywords that ;; forget to properly quote their faces. I tried just let-binding -;; them when we eval the face expression, but that failes because +;; them when we eval the face expression, but that fails because ;; some files actually use the variables directly in their init code ;; without quoting them. --ben (defvar font-lock-comment-face 'font-lock-comment-face @@ -639,6 +639,9 @@ The corresponding face should be set using `edit-faces' or the It is present only for horrid FSF compatibility reasons. The corresponding face should be set using `edit-faces' or the `set-face-*' functions.") +;; GNU compatibility +(define-compatible-variable-alias + 'font-lock-doc-face 'font-lock-doc-string-face) (defvar font-lock-string-face 'font-lock-string-face "This variable should not be set. It is present only for horrid FSF compatibility reasons. @@ -649,6 +652,11 @@ The corresponding face should be set using `edit-faces' or the It is present only for horrid FSF compatibility reasons. The corresponding face should be set using `edit-faces' or the `set-face-*' functions.") +(defvar font-lock-builtin-face 'font-lock-builtin-face + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-function-name-face 'font-lock-function-name-face "This variable should not be set. It is present only for horrid FSF compatibility reasons. @@ -664,6 +672,11 @@ The corresponding face should be set using `edit-faces' or the It is present only for horrid FSF compatibility reasons. The corresponding face should be set using `edit-faces' or the `set-face-*' functions.") +(defvar font-lock-constant-face 'font-lock-constant-face + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-reference-face 'font-lock-reference-face "This variable should not be set. It is present only for horrid FSF compatibility reasons. @@ -680,9 +693,11 @@ The corresponding face should be set using `edit-faces' or the font-lock-string-face font-lock-doc-string-face font-lock-keyword-face + font-lock-builtin-face font-lock-function-name-face font-lock-variable-name-face font-lock-type-face + font-lock-constant-face font-lock-reference-face font-lock-preprocessor-face font-lock-warning-face)) @@ -731,6 +746,15 @@ on the major mode's symbol." "Font Lock mode face used to highlight keywords." :group 'font-lock-faces) +(defface font-lock-builtin-face + '((((class color) (background light)) (:foreground "Purple")) + (((class color) (background dark)) (:foreground "Cyan")) + (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) + (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) + (t (:bold t))) + "Font Lock mode face used to highlight builtins." +:group 'font-lock-faces) + (defface font-lock-function-name-face '((((class color) (background dark)) (:foreground "aquamarine")) ;; brown4 is hardly different from black on windows. @@ -763,6 +787,17 @@ on the major mode's symbol." "Font Lock mode face used to highlight types." :group 'font-lock-faces) +(defface font-lock-constant-face + '((((class color) (background light)) (:foreground "CadetBlue")) + (((class color) (background dark)) (:foreground "Aquamarine")) + (((class grayscale) (background light)) + (:foreground "LightGray" :bold t :underline t)) + (((class grayscale) (background dark)) + (:foreground "Gray50" :bold t :underline t)) + (t (:bold t :underline t))) + "Font Lock mode face used to highlight constants and labels." +:group 'font-lock-faces) + (defface font-lock-reference-face '((((class color) (background dark)) (:foreground "cadetblue2")) (((class color) (background light)) (:foreground "red3")) @@ -773,8 +808,6 @@ on the major mode's symbol." "Font Lock mode face used to highlight references." :group 'font-lock-faces) -;; #### FSF has font-lock-builtin-face. - (defface font-lock-preprocessor-face '((((class color) (background dark)) (:foreground "steelblue1")) (((class color) (background light)) (:foreground "blue3")) @@ -782,7 +815,6 @@ on the major mode's symbol." "Font Lock Mode face used to highlight preprocessor conditionals." :group 'font-lock-faces) -;; #### Currently unused (defface font-lock-warning-face '((((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Pink" :bold t)) @@ -1453,8 +1485,8 @@ Optional argument OBJECT is the string or buffer containing the text." (defun font-lock-apply-syntactic-highlight (highlight) "Apply HIGHLIGHT following a match. - HIGHLIGHT should be of the form MATCH-HIGHLIGHT, - see `font-lock-syntactic-keywords'." +HIGHLIGHT should be of the form MATCH-HIGHLIGHT, +see `font-lock-syntactic-keywords'." (let* ((match (nth 0 highlight)) (start (match-beginning match)) (end (match-end match)) (value (nth 1 highlight)) @@ -1532,8 +1564,7 @@ START should be at the beginning of a line." (font-lock-apply-syntactic-highlight (car highlights)) (font-lock-fontify-syntactic-anchored-keywords (car highlights) end)) - (setq highlights (cdr highlights))) - ) + (setq highlights (cdr highlights)))) (setq keywords (cdr keywords))))) ;;; Regexp fontification functions. @@ -1677,8 +1708,9 @@ START should be at the beginning of a line." ;; Various functions. (defun font-lock-compile-keywords (&optional keywords) - ;; Compile `font-lock-keywords' into the form (t KEYWORD ...) where KEYWORD - ;; is the (MATCHER HIGHLIGHT ...) shown in the variable's doc string. + "Compile KEYWORDS into the form (t KEYWORD ...). +Here KEYWORD is of the form (MATCHER HIGHLIGHT ...) as shown in the +`font-lock-keywords' doc string." (let ((keywords (or keywords font-lock-keywords))) (setq font-lock-keywords (if (eq (car-safe keywords) t) @@ -1700,7 +1732,7 @@ START should be at the beginning of a line." keyword))) (defun font-lock-eval-keywords (keywords) - ;; Evalulate KEYWORDS if a function (funcall) or variable (eval) name. + "Evaluate KEYWORDS if a function (funcall) or variable (eval) name." (if (listp keywords) keywords (font-lock-eval-keywords (if (fboundp keywords) diff --git a/lisp/font.el b/lisp/font.el index 8baaa84..6b27b64 100644 --- a/lisp/font.el +++ b/lisp/font.el @@ -99,6 +99,7 @@ (defconst font-window-system-mappings '((x . (x-font-create-name x-font-create-object)) + (gtk . (x-font-create-name x-font-create-object)) (ns . (ns-font-create-name ns-font-create-object)) (mswindows . (mswindows-font-create-name mswindows-font-create-object)) (pm . (x-font-create-name x-font-create-object)) ; Change? FIXME diff --git a/lisp/frame.el b/lisp/frame.el index c8ddc29..d9c8b98 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1031,7 +1031,8 @@ This is a subroutine of `get-frame-for-buffer' (which see)." ;; The pre-display-buffer-function is called for effect, so this needs to ;; actually select the frame it wants. Fdisplay_buffer() takes notice of ;; changes to the selected frame. -(defun get-frame-for-buffer (buffer &optional not-this-window-p on-frame) +(defun get-frame-for-buffer (buffer &optional not-this-window-p on-frame + shrink-to-fit) "Select and return a frame in which to display BUFFER. Normally, the buffer will simply be displayed in the selected frame. But if the symbol naming the major-mode of the buffer has a 'frame-name @@ -1110,20 +1111,13 @@ always displays the buffer in the selected frame, regardless of the behavior that would otherwise be introduced by the `pre-display-buffer-function', which is normally set to `get-frame-for-buffer' (which see)." (let ((pre-display-buffer-function nil)) ; turn it off, whatever it is - (let ((window (display-buffer buffer))) + (let ((window (display-buffer buffer nil nil temp-buffer-shrink-to-fit))) (if (not (eq (last-nonminibuf-frame) (window-frame window))) ;; only the pre-display-buffer-function should ever do this. (error "display-buffer switched frames on its own!!")) (setq minibuffer-scroll-window window) (set-window-start window 1) ; obeys narrowing (set-window-point window 1) - (when temp-buffer-shrink-to-fit - (let* ((temp-window-size (round (* temp-buffer-max-height - (frame-height (window-frame window))))) - (size (window-displayed-height window))) - (when (< size temp-window-size) - (enlarge-window (- temp-window-size size) nil window))) - (shrink-window-if-larger-than-buffer window)) nil))) (setq pre-display-buffer-function 'get-frame-for-buffer) diff --git a/lisp/info.el b/lisp/info.el index f9e74d0..2bd88a1 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2268,7 +2268,7 @@ Give a blank topic name to go to the Index node itself." (interactive "sIndex topic: ") (let ((pattern (format "\n\\* \\([^\n:]*%s[^\n:]*\\):[ \t]*%s" (regexp-quote topic) - "\\(.*\\)\\.[ t]*\\([0-9]*\\)$")) + "\\(.*\\)\\.[ \t]*\\([0-9]*\\)$")) node) (message "Searching index for `%s'..." topic) (Info-goto-node "Top") diff --git a/lisp/keydefs.el b/lisp/keydefs.el index ec4b6cb..c34c35d 100644 --- a/lisp/keydefs.el +++ b/lisp/keydefs.el @@ -340,6 +340,7 @@ Keymap for characters following C-c.") (define-key global-map "\C-xry" 'yank-rectangle) (define-key global-map "\C-xro" 'open-rectangle) (define-key global-map "\C-xrt" 'string-rectangle) +(define-key global-map "\C-xrp" 'replace-rectangle) (define-key global-map "\C-xrw" 'window-configuration-to-register) ;(define-key global-map "\C-xrf" 'frame-configuration-to-register) diff --git a/lisp/lib-complete.el b/lisp/lib-complete.el index bbdc5d8..ea0bc69 100644 --- a/lisp/lib-complete.el +++ b/lisp/lib-complete.el @@ -306,10 +306,7 @@ and CODESYS. The default for DISPLAY-FUNCTION is `find-file'." (let ((path (if (or (null library) (equal library "")) nil (locate-file library load-path - ;; decompression doesn't work with Mule -slb - (if (featurep 'mule) - ":.el:.elc" - ":.el:.el.gz:.el.Z:.elc"))))) + ":.el:.el.gz:.el.Z:.elc")))) (if path (funcall (if (fboundp display-function) display-function 'find-file) path codesys) diff --git a/lisp/list-mode.el b/lisp/list-mode.el index 25d2418..f171b11 100644 --- a/lisp/list-mode.el +++ b/lisp/list-mode.el @@ -571,23 +571,25 @@ Go to the window from which completion was requested." (and (button-event-p event) ;; Give temporary modes such as isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook)) - (or buffer (setq buffer (symbol-value-in-buffer - 'completion-reference-buffer - (or (and (button-event-p event) - (event-buffer event)) - (current-buffer))))) - (save-selected-window - (and (button-event-p event) - (select-window (event-window event))) - (if (and (one-window-p t 'selected-frame) - (window-dedicated-p (selected-window))) - ;; This is a special buffer's frame - (iconify-frame (selected-frame)) - (or (window-dedicated-p (selected-window)) - (bury-buffer)))) - (choose-completion-string (extent-string extent) - buffer - completion-base-size)) + (let ((list-buffer (or (and (button-event-p event) + (event-buffer event)) + (current-buffer)))) + (or buffer (setq buffer (symbol-value-in-buffer + 'completion-reference-buffer + list-buffer))) + (save-selected-window + (and (button-event-p event) + (select-window (event-window event))) + (if (and (one-window-p t 'selected-frame) + (window-dedicated-p (selected-window))) + ;; This is a special buffer's frame + (iconify-frame (selected-frame)) + (or (window-dedicated-p (selected-window)) + (bury-buffer)))) + (choose-completion-string (extent-string extent) + buffer + (symbol-value-in-buffer 'completion-base-size + list-buffer)))) ;; Delete the longest partial match for STRING ;; that can be found before POINT. diff --git a/lisp/menubar-items.el b/lisp/menubar-items.el index 3c0f547..5f2767f 100644 --- a/lisp/menubar-items.el +++ b/lisp/menubar-items.el @@ -147,7 +147,7 @@ which will not be used as accelerators." ["Save %_As..." write-file] ["Save So%_me Buffers" save-some-buffers] "-----" - ,@(if (eq system-type 'windows-nt) + ,@(if (valid-specifier-tag-p 'msprinter) '(["Page Set%_up..." generic-page-setup])) ["%_Print" generic-print-buffer :active (or (valid-specifier-tag-p 'msprinter) @@ -156,7 +156,7 @@ which will not be used as accelerators." :suffix (if (region-active-p) "Selection..." (if put-buffer-names-in-file-menu (concat (buffer-name) "...") "..."))] - ,@(unless (eq system-type 'windows-nt) + ,@(unless (valid-specifier-tag-p 'msprinter) '(["Prett%_y-Print" ps-print-buffer-with-faces :active (fboundp 'ps-print-buffer-with-faces) :suffix (if put-buffer-names-in-file-menu (buffer-name) "")])) diff --git a/lisp/menubar.el b/lisp/menubar.el index 71e4399..b26065c 100644 --- a/lisp/menubar.el +++ b/lisp/menubar.el @@ -671,6 +671,10 @@ If no response was received, nil is returned. MENU-DESC and EVENT are as in the call to `popup-menu'." ;; partially stolen from w3 + + ;; This function is way gross and assumes to much about menu + ;; processing that is X specific. Under mswindows popup menus behave + ;; in reasonable ways that you can't obstruct. (let ((echo-keystrokes 0) new-event) (popup-menu menu-desc event) @@ -679,14 +683,22 @@ MENU-DESC and EVENT are as in the call to `popup-menu'." (setq new-event (next-command-event new-event)) (cond ((misc-user-event-p new-event) (throw 'popup-done new-event)) - ((not (popup-up-p)) - (setq unread-command-events (cons new-event - unread-command-events)) - (throw 'popup-done nil)) ((button-release-event-p new-event);; don't beep twice nil) - ((event-matches-key-specifier-p (quit-char)) + ;; It shows how bogus this function is that the event + ;; arg could be missing and no-one noticed ... + ((event-matches-key-specifier-p new-event (quit-char)) (signal 'quit nil)) + ;; mswindows has no pop-down processing (selection is + ;; atomic) so doing anything more makes no sense. Since + ;; popup-up-p is always false under mswindows, this + ;; function has been ordered to do essentially X-specifc + ;; processing after this check. + ((not (popup-up-p)) + (setq unread-command-events (cons new-event + unread-command-events)) + (throw 'popup-done nil)) + ;; mswindows never gets here (t (beep) (message "please make a choice from the menu."))))))) diff --git a/lisp/msw-glyphs.el b/lisp/msw-glyphs.el index de2823a..bd6f753 100644 --- a/lisp/msw-glyphs.el +++ b/lisp/msw-glyphs.el @@ -1,6 +1,7 @@ ;;; msw-glyphs.el --- Support for glyphs in ms windows ;; Copyright (C) 1994, 1997 Free Software Foundation, Inc. +;; Copyright (C) 2002 Ben Wing. ;; Author: Kirill M. Katsnelson ;; Maintainer: XEmacs Development Team @@ -80,6 +81,9 @@ device class." (set-glyph-image continuation-glyph "\xC3" 'global 'msgdi) (set-glyph-image truncation-glyph "\xF0" 'global 'msgdi) (set-glyph-image hscroll-glyph "\xEF" 'global 'msgdi) + (set-glyph-contrib-p continuation-glyph nil) + (set-glyph-contrib-p truncation-glyph nil) + (set-glyph-contrib-p hscroll-glyph nil) (set-glyph-image octal-escape-glyph "\\") (set-glyph-image control-arrow-glyph "^") diff --git a/lisp/package-get.el b/lisp/package-get.el index 833042c..058e827 100644 --- a/lisp/package-get.el +++ b/lisp/package-get.el @@ -567,7 +567,8 @@ This is just an interactive wrapper for `package-admin-delete-binary-package'." (if (not (package-get (car pkg) nil 'never)) (throw 'exit nil) ;; Bail out if error detected )) - packages-package-list))) + packages-package-list)) + (package-net-update-installed-db)) ;;;###autoload (defun package-get-all (package version &optional fetched-packages install-dir) diff --git a/lisp/package-ui.el b/lisp/package-ui.el index 5509cde..c0b93ad 100644 --- a/lisp/package-ui.el +++ b/lisp/package-ui.el @@ -488,7 +488,7 @@ and whether or not it is up-to-date." "Display additional package info in the modeline. EXTENT determines the package to display (the package information is attached to the extent as properties)." - (let (pkg-sym info inst-ver auth-ver date maintainer) + (let (pkg-sym info inst-ver auth-ver date maintainer balloon req) (if (or force-update (not (current-message)) (string-match ".*: .*: " (current-message)) ) @@ -498,14 +498,29 @@ attached to the extent as properties)." inst-ver (package-get-key pkg-sym :version) auth-ver (package-get-info-prop info 'author-version) date (package-get-info-prop info 'date) - maintainer (package-get-info-prop info 'maintainer)) + maintainer (package-get-info-prop info 'maintainer) + req (package-get-info-prop info 'requires)) (if (not inst-ver) - (setq inst-ver "")) + (setq inst-ver 0)) + (if (featurep 'balloon-help) + (progn + (setq balloon (format " +Package Information: [For package: \"%s\"] +================ +Installed Version : %.2f +Author Version : %s +Maintainer: %s +Released: %s +Required Packages : %s\n\n" + pkg-sym inst-ver auth-ver maintainer + date req)) + (set-extent-property extent 'balloon-help balloon))) (if pui-list-verbose - (format "Author version: %-8s %11s: %s" - auth-ver date maintainer) - (format "%-6s: %-8s %11s: %s" - inst-ver auth-ver date maintainer)) + (format + "Inst V: %.2f Auth V: %s Maint: %s" + inst-ver auth-ver maintainer) + (format "%.2f : %s : %s" + inst-ver auth-ver maintainer)) )) )) diff --git a/lisp/process.el b/lisp/process.el index 79a81e6..7294e00 100644 --- a/lisp/process.el +++ b/lisp/process.el @@ -350,7 +350,7 @@ In either case, the output is inserted after point (leaving mark after it)." ;; then replace that region with the output. (progn (setq buffer-read-only nil) (delete-region (max start end) (point-max)) - (delete-region (point-min) (max start end)) + (delete-region (point-min) (min start end)) (setq exit-status (call-process-region (point-min) (point-max) shell-file-name t t nil diff --git a/lisp/rect.el b/lisp/rect.el index 6f42ee4..28f0549 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -310,6 +310,7 @@ When called from a program, the rectangle's corners are START and END." (apply-on-rectangle 'string-rectangle-line start end string (and (boundp 'pending-delete-mode) pending-delete-mode))) +;;;###autoload (defun replace-rectangle (start end string) "Like `string-rectangle', but unconditionally replace the original region, as if `pending-delete-mode' were active." diff --git a/lisp/select.el b/lisp/select.el index d654ea7..b185dea 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -210,8 +210,9 @@ See `interprogram-cut-function' for more information." (own-selection string 'CLIPBOARD)) (defun disown-selection (&optional secondary-p) - "Assuming we own the selection, disown it. With an argument, discard the -secondary selection instead of the primary selection." + "Assuming we own the selection, disown it. +With an argument, discard the secondary selection instead of the +primary selection." (disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY)) (when (and selection-sets-clipboard (or (not secondary-p) diff --git a/lisp/simple.el b/lisp/simple.el index 36566d4..763a897 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -298,6 +298,8 @@ With argument, join this line to following line." (delete-region (point) (+ (point) (length fill-prefix)))) (fixup-whitespace)))) +(defalias 'join-line 'delete-indentation) + (defun fixup-whitespace () "Fixup white space between objects around point. Leave one space or none, according to the context." diff --git a/lisp/subr.el b/lisp/subr.el index dcaf367..54cf7f1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -301,16 +301,24 @@ See also `add-hook', `add-local-hook', and `add-local-one-shot-hook'." (make-local-hook hook) (add-one-shot-hook hook function append t)) -(defun add-to-list (list-var element) +(defun add-to-list (list-var element &optional append) "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. The test for presence of ELEMENT is done with `equal'. +If ELEMENT is added, it is added at the beginning of the list, +unless the optional argument APPEND is non-nil, in which case +ELEMENT is added at the end. + If you want to use `add-to-list' on a variable that is not defined until a certain package is loaded, you should put the call to `add-to-list' into a hook function that will be run only after loading the package. `eval-after-load' provides one way to do this. In some cases other hooks, such as major mode hooks, can do the job." - (or (member element (symbol-value list-var)) - (set list-var (cons element (symbol-value list-var))))) + (if (member element (symbol-value list-var)) + (symbol-value list-var) + (set list-var + (if append + (append (symbol-value list-var) (list element)) + (cons element (symbol-value list-var)))))) ;; XEmacs additions ;; called by Fkill_buffer() @@ -380,12 +388,14 @@ Otherwise treat `\\' in NEWTEXT as special: (check-argument-type 'stringp str) (check-argument-type 'stringp newtext) (if (> (length str) 50) - (with-temp-buffer - (insert str) - (goto-char 1) + (let ((cfs case-fold-search)) + (with-temp-buffer + (setq case-fold-search cfs) + (insert str) + (goto-char 1) (while (re-search-forward regexp nil t) (replace-match newtext t literal)) - (buffer-string)) + (buffer-string))) (let ((start 0) newstr) (while (string-match regexp str start) (setq newstr (replace-match newtext t literal str) diff --git a/lisp/toolbar-items.el b/lisp/toolbar-items.el index 1c54a91..39d1f51 100644 --- a/lisp/toolbar-items.el +++ b/lisp/toolbar-items.el @@ -400,7 +400,7 @@ Newsreaders known by default are gnus, rn, nn, trn, xrn, slrn, pine (let ((command (cdr-safe (assq toolbar-news-reader toolbar-news-commands-alist)))) (or command - (error "Unkown news reader %s" toolbar-news-reader)) + (error "Unknown news reader %s" toolbar-news-reader)) (if (symbolp command) (call-interactively command) (eval command)))) diff --git a/lisp/toolbar.el b/lisp/toolbar.el index 030099d..4ddc1e0 100644 --- a/lisp/toolbar.el +++ b/lisp/toolbar.el @@ -71,7 +71,7 @@ customized through the options menu." "If non-nil help is echoed for toolbar buttons.") (defvar toolbar-icon-directory nil - "Location of standard toolbar icon bitmaps.") + "Location of standard toolbar icon bitmaps, with trailing path separator.") (defun toolbar-make-button-list (up &optional down disabled cap-up cap-down cap-disabled) "Call make-glyph on each arg and return a list of the results." diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index d9e203a..aaa80ca 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1054,7 +1054,7 @@ Recommended as a parent keymap for modes using widgets.") (defun widget-field-activate (pos &optional event) - "Invoke the ediable field at point." + "Invoke the editable field at point." (interactive "@d") (let ((field (widget-field-find pos))) (if field diff --git a/lisp/window-xemacs.el b/lisp/window-xemacs.el index 6fb0abd..4950427 100644 --- a/lisp/window-xemacs.el +++ b/lisp/window-xemacs.el @@ -216,11 +216,11 @@ FRAME must be a frame or nil." (defvar display-buffer-function nil "If non-nil, function to call to handle `display-buffer'. -It will receive three args: the same as those to `display-buffer'.") +It will receive four args: the same as those to `display-buffer'.") (defvar pre-display-buffer-function nil "If non-nil, function that will be called from `display-buffer' -as the first action. It will receive three args: the same as those +as the first action. It will receive four args: the same as those to `display-buffer'. This function may be used to select an appropriate frame for the buffer, for example. See also the variable `display-buffer-function', which may @@ -352,7 +352,8 @@ If there is only one window, it is split regardless of this value." ;; Can you believe that all of this crap was formerly in C? ;; Praise Jesus that it's not there any more. -(defun display-buffer (buffer &optional not-this-window-p override-frame) +(defun display-buffer (buffer &optional not-this-window-p override-frame + shrink-to-fit) "Make BUFFER appear in some window on the current frame, but don't select it. BUFFER can be a buffer or a buffer name. If BUFFER is shown already in some window in the current frame, @@ -365,6 +366,9 @@ the current frame, unless OVERRIDE-FRAME is non-nil. If OVERRIDE-FRAME is non-nil, display on that frame instead of the current frame (or the dedicated frame). +If SHRINK-TO-FIT is non-nil and splitting the window is appropriate, give +the new buffer less than half the space if it is small enough to fit. + If `pop-up-windows' is non-nil, always use the current frame and create a new window regardless of whether the buffer has a dedicated frame, and regardless of whether @@ -390,7 +394,8 @@ Returns the window displaying BUFFER." (if pre-display-buffer-function (funcall pre-display-buffer-function buffer not-this-window-p - override-frame))) + override-frame + shrink-to-fit))) ;; Give the user the ability to completely reimplement ;; this function via the `display-buffer-function'. @@ -398,7 +403,8 @@ Returns the window displaying BUFFER." (throw 'done (funcall display-buffer-function buffer not-this-window-p - override-frame))) + override-frame + shrink-to-fit))) ;; If the buffer has a dedicated frame, that takes ;; precedence over the current frame, and over what the @@ -615,7 +621,9 @@ Returns the window displaying BUFFER." (window-height window)) 2) (window-height upper)) - nil upper))))) + nil upper)) + (if shrink-to-fit + (shrink-window-if-larger-than-buffer window))))) (setq window (get-lru-window target-frame))) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 846f96c..865149d 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,30 @@ +2002-08-23 Stephen J. Turnbull + + * XEmacs 21.4.9 "Informed Management" is released. + +2002-06-07 Andy Piper + + * lwlib-Xm.c: (xm_safe_update_label): new function. Call + xm_update_label if the class is appropriate. + (make_menu_in_widget): use it. + (update_one_menu_entry): ditto. + (xm_update_one_widget): ditto. + +2002-08-14 Stephen J. Turnbull + + * lwlib-Xm.c: revert Darryl's patch in favor of Andy's. + +2002-07-17 Stephen J. Turnbull + + * lwlib-utils.c (XtApplyUntilToWidgets): + * xlwmenu.c (close_to_reference_time): + Fix warnings. + +2002-05-14 Darryl Okahata + + * lwlib-Xm.c: prevent non-label widgets from being treated as + labels and having their "labels" updated. + 2002-05-09 Stephen J. Turnbull * XEmacs 21.4.8 "Honest Recruiter" is released. diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 64ea878..acd68df 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -301,6 +301,14 @@ xm_update_label (widget_instance* instance, Widget widget, widget_value* val) XmStringFree (val_string); } +static void +xm_safe_update_label (widget_instance* instance, Widget widget, widget_value* val) +{ + /* Don't clobber non-labels. */ + if (XtIsSubclass (widget, xmLabelWidgetClass)) + xm_update_label (instance, widget, val); +} + #endif /* defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) */ /* update of list */ @@ -540,7 +548,7 @@ make_menu_in_widget (widget_instance* instance, Widget widget, XtSetArg (al [ac], XmNsubMenuId, menu); ac++; button = XmCreateCascadeButton (widget, cur->name, al, ac); - xm_update_label (instance, button, cur); + xm_safe_update_label (instance, button, cur); XtAddCallback (button, XmNcascadingCallback, xm_pull_down_callback, (XtPointer)instance); @@ -561,7 +569,7 @@ make_menu_in_widget (widget_instance* instance, Widget widget, else button = XmCreatePushButtonGadget (widget, cur->name, al, ac); - xm_update_label (instance, button, cur); + xm_safe_update_label (instance, button, cur); /* don't add a callback to a simple label */ if (cur->type == TOGGLE_TYPE || cur->type == RADIO_TYPE) @@ -615,7 +623,8 @@ update_one_menu_entry (widget_instance* instance, Widget widget, /* update the menu button as a label. */ if (val->change >= VISIBLE_CHANGE) { - xm_update_label (instance, widget, val); + xm_safe_update_label (instance, widget, val); + if (XtClass (widget) == xmToggleButtonWidgetClass || XtClass (widget) == xmToggleButtonGadgetClass) { @@ -829,8 +838,7 @@ xm_update_one_widget (widget_instance* instance, Widget widget, #if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF) /* Common to all label like widgets */ - if (XtIsSubclass (widget, xmLabelWidgetClass)) - xm_update_label (instance, widget, val); + xm_safe_update_label (instance, widget, val); #endif class = XtClass (widget); /* Class specific things */ diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c index bca952e..39da1c7 100644 --- a/lwlib/lwlib-utils.c +++ b/lwlib/lwlib-utils.c @@ -118,7 +118,7 @@ XtApplyUntilToWidgets (Widget w, XtApplyUntilToWidgetsProc proc, XtPointer arg) if (XtIsComposite (w)) { CompositeWidget cw = (CompositeWidget)w; - int i; + unsigned int i; for (i = 0; i < cw->composite.num_children; i++) if (XtIsWidget (cw->composite.children [i])){ result = proc (cw->composite.children [i], arg); diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 1d89c0b..ef1cc9f 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -348,7 +348,8 @@ close_to_reference_time (Widget w, Time reference_time, XEvent *ev) { return reference_time && - (ev->xbutton.time - reference_time < XtGetMultiClickTime (XtDisplay (w))); + (ev->xbutton.time - reference_time + < (Time) XtGetMultiClickTime (XtDisplay (w))); } /* Size code */ diff --git a/man/ChangeLog b/man/ChangeLog index b42d899..78e5c97 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,122 @@ +2002-08-23 Stephen J. Turnbull + + * XEmacs 21.4.9 "Informed Management" is released. + +2002-08-20 Simon Josefsson + + * lispref/building.texi (Pure Storage): Deprecate purecopy. + +2002-08-16 Stephen J. Turnbull + + * internals/internals.texi (Regression Testing XEmacs): Fix typo. + +2002-08-15 Stephen J. Turnbull + + * internals/internals.texi (GCPROing): Add comment on GCPRO. + (Regression Testing XEmacs): New node. + (Modules for Regression Testing): New node. + +2002-08-14 Stephen J. Turnbull + + * xemacs/packages.texi (Installing Packages): Revert EFS patch. + +2002-07-13 Adrian Aichner + + * xemacs/packages.texi (Installing Packages): Fix reference to + EFS. + +2002-08-09 Stephen J. Turnbull + + * packages.texi: Replace with rev 1.16 (from 21.5 current). + Includes changes by Ville Skyttä, Adrian Aichner, Simon + Josefsson, and Steve Youngs. + +2002-07-24 Ville Skyttä + + * term.texi (Input to the inferior): Fix term line/char mode + switch keybindings. Kudos to Jacob P. Burckhardt. + + * xemacs/misc.texi (Term Mode): Ditto. + +2002-07-06 Adrian Aichner + + * new-users-guide/custom1.texi (Customizing key Bindings): Fix + improper use of indef. art. "a". + +2002-07-06 Adrian Aichner + + * lispref/commands.texi (Peeking and Discarding): Ditto. + * lispref/customize.texi (Type Keywords): Ditto. + * lispref/dragndrop.texi (Drop Interface): Ditto. + +2002-07-06 Adrian Aichner + + * termcap.texi (Clearing): Ditto. + * widget.texi (User Interface): Ditto. + * widget.texi (Basic Types): Ditto. + * widget.texi (group): Ditto. + +2002-07-05 Adrian Aichner + + * xemacs/menus.texi (Edit Menu): Typo fixes for incorrect use of + indef. art. "an". + +2002-07-05 Adrian Aichner + + * lispref/control.texi (Processing of Errors): Ditto. + * lispref/mule.texi (ISO 2022): Ditto. + * lispref/packaging.texi (Package Terminology): Ditto. + * lispref/text.texi (Transformations): Ditto. + +2002-07-05 Adrian Aichner + + * termcap.texi (Naming): Ditto. + * texinfo.texi (itemize): Ditto. + * texinfo.texi (Tips): Ditto. + * widget.texi (Introduction): Ditto. + * widget.texi (group): Ditto. + +2002-07-02 Stephen J. Turnbull + + * xemacs-faq.texi (Top, Customization, Q3.10.5, Q3.10.6): + New "killing is slow" FAQ and link updates.. + +2002-06-17 Jerry James + + * emodules.texi (Loading other Modules): Describe why we do not + use RTLD_GLOBAL. + +2002-06-11 Adrian Aichner + + * xemacs-faq.texi (Q1.3.7): Update broken link to russian.el + (found by linklint) with Google's help. + +2002-05-25 Adrian Aichner + + * xemacs/custom.texi (Syntax Entry): Deprecate ` ' in favor of `-'. + +2002-06-11 Stephen J. Turnbull + + * xemacs/mule.texi (Mule Intro): Better title, explanation. + +2002-05-23 Stephen J. Turnbull + + * lispref/packaging.texi (package-info.in Fields): Typo fix. + +2002-05-20 Stephen J. Turnbull + + * xemacs/files.texi (Reverting): Mention use of prefix argument + and mode recalculation. + +2002-05-11 Adrian Aichner + + * xemacs-faq.texi (Top): Add Q2.0.15 under "Installation and + Trouble Shooting". + * xemacs-faq.texi (Installation): Add Q2.0.15 to Installation + menu. + * xemacs-faq.texi (Q2.0.14): Fix unnumberedsubsec argument. + * xemacs-faq.texi (Q2.0.15): New. + 2002-05-09 Stephen J. Turnbull * XEmacs 21.4.8 "Honest Recruiter" is released. diff --git a/man/emodules.texi b/man/emodules.texi index 538a72a..93edb70 100644 --- a/man/emodules.texi +++ b/man/emodules.texi @@ -478,6 +478,20 @@ will be unloaded. This means that if any child modules fail to load, then their parents will also fail to load. This does not include previous successful calls to @code{emodules_load} at the top level. +@strong{Warning:} Modules are @emph{not} loaded with the +@code{RTLD_GLOBAL} flag. The practical upshot is that individual +modules do not have access to each other's C symbols. One module cannot +make a C function call to a function defined in another module, nor can +it read or set a C variable in another module. All interaction between +modules must, therefore, take place at the Lisp level. This is by +design. Other projects have attempted to use @code{RTLD_GLOBAL}, only +to find that spurious symbol name clashes were the result. Helper +functions often have simple names, increasing the probability of such a +clash. If you really need to share symbols between modules, create a +shared library containing those symbols, and link your modules with +that library. Otherwise, interactions between modules must take place +via Lisp function calls and Lisp variables accesses. + @node Using ellcc, Defining Functions, Anatomy of a Module, Top @chapter Using @code{ellcc} @cindex @code{ellcc} diff --git a/man/internals/internals.texi b/man/internals/internals.texi index 1314398..54a94a8 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -117,6 +117,7 @@ This Info file contains v1.4 of the XEmacs Internals Manual, March 2001. * The XEmacs Object System (Abstractly Speaking):: * How Lisp Objects Are Represented in C:: * Rules When Writing New C Code:: +* Regression Testing XEmacs:: * A Summary of the Various XEmacs Modules:: * Allocation of Objects in XEmacs Lisp:: * Dumping:: @@ -166,6 +167,8 @@ Coding for Mule * General Guidelines for Writing Mule-Aware Code:: * An Example of Mule-Aware Code:: +Regression Testing XEmacs + A Summary of the Various XEmacs Modules * Low-Level Modules:: @@ -180,6 +183,7 @@ A Summary of the Various XEmacs Modules * Modules for Interfacing with the Operating System:: * Modules for Interfacing with X Windows:: * Modules for Internationalization:: +* Modules for Regression Testing:: Allocation of Objects in XEmacs Lisp @@ -1893,7 +1897,7 @@ performance is an issue, use @code{type_checking_assert}, nothing unless the corresponding configure error checking flag was specified. -@node Rules When Writing New C Code, A Summary of the Various XEmacs Modules, How Lisp Objects Are Represented in C, Top +@node Rules When Writing New C Code, Regression Testing XEmacs, How Lisp Objects Are Represented in C, Top @chapter Rules When Writing New C Code @cindex writing new C code, rules when @cindex C code, rules when writing new @@ -3150,7 +3154,75 @@ add a DEFINE_LRECORD_IMPLEMENTATION call to @file{@var{foo}.c} add an INIT_LRECORD_IMPLEMENTATION call to @code{syms_of_@var{foo}.c} @end enumerate -@node A Summary of the Various XEmacs Modules, Allocation of Objects in XEmacs Lisp, Rules When Writing New C Code, Top + +@node Regression Testing XEmacs, A Summary of the Various XEmacs Modules, Rules When Writing New C Code, Top +@chapter Regression Testing XEmacs +@cindex testing, regression + +The source directory @file{tests/automated} contains XEmacs' automated +test suite. The usual way of running all the tests is running +@code{make check} from the top-level source directory. + +The test suite is unfinished and it's still lacking some essential +features. It is nevertheless recommended that you run the tests to +confirm that XEmacs behaves correctly. + +If you want to run a specific test case, you can do it from the +command-line like this: + +@example +$ xemacs -batch -l test-harness.elc -f batch-test-emacs TEST-FILE +@end example + +If something goes wrong, you can run the test suite interactively by +loading @file{test-harness.el} into a running XEmacs and typing +@kbd{M-x test-emacs-test-file RET RET}. You will see a log of +passed and failed tests, which should allow you to investigate the +source of the error and ultimately fix the bug. + +Adding a new test file is trivial: just create a new file here and it +will be run. There is no need to byte-compile any of the files in +this directory---the test-harness will take care of any necessary +byte-compilation. + +Look at the existing test cases for the examples of coding test cases. +It all boils down to your imagination and judicious use of the macros +@code{Assert}, @code{Check-Error}, @code{Check-Error-Message}, and +@code{Check-Message}. + +Here's a simple example checking case-sensitive and case-insensitive +comparisons from @file{case-tests.el}. + +@example +(with-temp-buffer + (insert "Test Buffer") + (let ((case-fold-search t)) + (goto-char (point-min)) + (Assert (eq (search-forward "test buffer" nil t) 12)) + (goto-char (point-min)) + (Assert (eq (search-forward "Test buffer" nil t) 12)) + (goto-char (point-min)) + (Assert (eq (search-forward "Test Buffer" nil t) 12)) + + (setq case-fold-search nil) + (goto-char (point-min)) + (Assert (not (search-forward "test buffer" nil t))) + (goto-char (point-min)) + (Assert (not (search-forward "Test buffer" nil t))) + (goto-char (point-min)) + (Assert (eq (search-forward "Test Buffer" nil t) 12)))) +@end example + +This example could be inserted in a file in @file{tests/automated}, and +it would be a complete test, automatically executed when you run +@kbd{make check} after building XEmacs. More complex tests may require +substantial temporary scaffolding to create the environment that elicits +the bugs, but the top-level Makefile and @file{test-harness.el} handle +the running and collection of results from the @code{Assert}, +@code{Check-Error}, @code{Check-Error-Message}, and @code{Check-Message} +macros. + +@node A Summary of the Various XEmacs Modules, Allocation of Objects in XEmacs Lisp, Regression Testing XEmacs, Top @chapter A Summary of the Various XEmacs Modules @cindex modules, a summary of the various XEmacs @@ -3169,6 +3241,7 @@ add an INIT_LRECORD_IMPLEMENTATION call to @code{syms_of_@var{foo}.c} * Modules for Interfacing with the Operating System:: * Modules for Interfacing with X Windows:: * Modules for Internationalization:: +* Modules for Regression Testing:: @end menu @node Low-Level Modules @@ -4833,6 +4906,36 @@ Asian-language support, and is not currently used. +@node Modules for Regression Testing +@section Modules for Regression Testing +@cindex modules for regression testing +@cindex regression testing, modules for + +@example +test-harness.el +base64-tests.el +byte-compiler-tests.el +case-tests.el +ccl-tests.el +c-tests.el +database-tests.el +extent-tests.el +hash-table-tests.el +lisp-tests.el +md5-tests.el +mule-tests.el +regexp-tests.el +symbol-tests.el +syntax-tests.el +@end example + +@file{test-harness.el} defines the macros @code{Assert}, +@code{Check-Error}, @code{Check-Error-Message}, and +@code{Check-Message}. The other files are test files, testing various +XEmacs modules. + + + @node Allocation of Objects in XEmacs Lisp, Dumping, A Summary of the Various XEmacs Modules, Top @chapter Allocation of Objects in XEmacs Lisp @cindex allocation of objects in XEmacs Lisp @@ -5100,6 +5203,10 @@ weirdly corrupted objects or even in incorrect values in a totally different section of code. @end enumerate +If you don't understand whether to @code{GCPRO} in a particular +instance, ask on the mailing lists. A general hint is that @code{prog1} +is the canonical example + @cindex garbage collection, conservative @cindex conservative garbage collection Given the extremely error-prone nature of the @code{GCPRO} scheme, and diff --git a/man/lispref/building.texi b/man/lispref/building.texi index 4e9c1cd..414ab0a 100644 --- a/man/lispref/building.texi +++ b/man/lispref/building.texi @@ -209,10 +209,7 @@ vectors and cons cells. It does not make copies of other objects such as symbols, but just returns them unchanged. It signals an error if asked to copy markers. -This function is a no-op except while XEmacs is being built and dumped; -it is usually called only in the file -@file{xemacs/lisp/prim/loaddefs.el}, but a few packages call it just in -case you decide to preload them. +This function is a no-op in XEmacs, and its use in new code is deprecated. @end defun @defvar pure-bytes-used diff --git a/man/lispref/commands.texi b/man/lispref/commands.texi index 9821a57..3620037 100644 --- a/man/lispref/commands.texi +++ b/man/lispref/commands.texi @@ -1755,7 +1755,7 @@ This variable holds a list of events waiting to be read as command input. The events are used in the order they appear in the list, and removed one by one as they are used. -The variable is needed because in some cases a function reads a event +The variable is needed because in some cases a function reads an event and then decides not to use it. Storing the event in this variable causes it to be processed normally, by the command loop or by the functions to read command input. diff --git a/man/lispref/control.texi b/man/lispref/control.texi index 59000f7..5860ca5 100644 --- a/man/lispref/control.texi +++ b/man/lispref/control.texi @@ -922,7 +922,7 @@ formatting are explained below. This function displays @var{error-object} on @var{stream}. @var{error-object} is a cons of error type, a symbol, and error arguments, a list. If the error type symbol of one of its error -condition superclasses has an @code{display-error} property, that +condition superclasses has a @code{display-error} property, that function is invoked for printing the actual error message. Otherwise, the error is printed as @samp{Error: arg1, arg2, ...}. @end defun diff --git a/man/lispref/customize.texi b/man/lispref/customize.texi index fddbf33..1bd271c 100644 --- a/man/lispref/customize.texi +++ b/man/lispref/customize.texi @@ -739,7 +739,7 @@ in the buffer with a positive tabbing order, or @code{nil} @item :parent The parent of a nested widget (e.g. a @code{menu-choice} item or an -element of a @code{editable-list} widget). +element of an @code{editable-list} widget). @item :sibling-args This keyword is only used for members of a @code{radio-button-choice} or diff --git a/man/lispref/dragndrop.texi b/man/lispref/dragndrop.texi index 5d48ba6..8c2085c 100644 --- a/man/lispref/dragndrop.texi +++ b/man/lispref/dragndrop.texi @@ -100,7 +100,7 @@ the XEmacs API, cause it also uses MIME types to encode dragged data. @cindex drop @cindex Drop API -For each activated low-level protocol, a internal routine will catch +For each activated low-level protocol, an internal routine will catch incoming drops and convert them to a dragdrop-drop type misc-user-event. diff --git a/man/lispref/mule.texi b/man/lispref/mule.texi index 4f7422e..a3b68bf 100644 --- a/man/lispref/mule.texi +++ b/man/lispref/mule.texi @@ -805,7 +805,7 @@ well), or by use of shifting (affecting only the following character in the data stream) or locking (effective until the next designation or locking) control sequences. An encoding conformant to ISO 2022 is typically defined by designating the initial contents of the G0-G3 -registers, specifying an 7 or 8 bit environment, and specifying whether +registers, specifying a 7 or 8 bit environment, and specifying whether further designations will be recognized. Some examples of character sets and the registered final characters diff --git a/man/lispref/text.texi b/man/lispref/text.texi index 233e73c..1d8b9b1 100644 --- a/man/lispref/text.texi +++ b/man/lispref/text.texi @@ -2761,7 +2761,7 @@ implemented in C, with an appropriate interface for Lisp programmers. Examples of algorithms thus provided are MD5 and base64 support. MD5 is an algorithm for calculating message digests, as described in -rfc1321. Given a message of arbitrary length, MD5 produces an 128-bit +rfc1321. Given a message of arbitrary length, MD5 produces a 128-bit ``fingerprint'' (``message digest'') corresponding to that message. It is considered computationally infeasible to produce two messages having the same MD5 digest, or to produce a message having a prespecified diff --git a/man/new-users-guide/custom1.texi b/man/new-users-guide/custom1.texi index 97f679f..f504172 100644 --- a/man/new-users-guide/custom1.texi +++ b/man/new-users-guide/custom1.texi @@ -78,7 +78,7 @@ C-c} to @samp{Exit Emacs} you can type the following expression in your @noindent You might want to have this statement in your @file{init.el} file because its easy to hit this command by mistake and it could be annoying to exit -Emacs unintentionally. There is a @b{Exit Emacs} option in the @b{File +Emacs unintentionally. There is an @b{Exit Emacs} option in the @b{File menu} which you might want to use instead. To make a particular key undefined you can also use: diff --git a/man/term.texi b/man/term.texi index 330d1c9..0153e0d 100644 --- a/man/term.texi +++ b/man/term.texi @@ -178,8 +178,8 @@ When return is typed, the entire current line of the buffer (except possibly the prompt) is sent to the inferior process. Line mode is basically the original shell mode from earlier Emacs versions. -To switch from line mode to character mode type @kbd{C-c c}. -To switch from character mode to line mode type @kbd{C-c l}. +To switch from line mode to character mode type @kbd{C-c C-k}. +To switch from character mode to line mode type @kbd{C-c C-j}. In either mode, "echoing" of user input is handled by the inferior. Therefor, in line mode after an input line at the end of the buffer diff --git a/man/termcap.texi b/man/termcap.texi index b18dd63..42c6c22 100644 --- a/man/termcap.texi +++ b/man/termcap.texi @@ -1147,7 +1147,7 @@ obey. does not touch (@pxref{Status Line}). Some terminals have a special line that is used only as a status line. -For these terminals, there is no need for an @samp{-s} variant; the +For these terminals, there is no need for a @samp{-s} variant; the status line commands should be defined by default. On other terminals, enabling a status line means removing one screen line from ordinary use and reducing the effective screen height. For these @@ -1920,7 +1920,7 @@ large parameter would be undefined. Clear to end of line (@samp{ce}) is extremely important in programs that maintain an updating display. Nearly all display terminals support this -operation, so it is acceptable for a an application program to refuse to +operation, so it is acceptable for an application program to refuse to work if @samp{ce} is not present. However, if you do not want this limitation, you can accomplish clearing to end of line by outputting spaces until you reach the right margin. In order to do this, you must know the diff --git a/man/texinfo.texi b/man/texinfo.texi index b9e80cb..b0408bb 100644 --- a/man/texinfo.texi +++ b/man/texinfo.texi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: texinfo.texi,v 1.14 2001/04/12 18:22:02 michaels Exp $ +@c $Id: texinfo.texi,v 1.14.2.1 2002/08/20 11:35:25 stephent Exp $ @c %**start of header @c All text is ignored before the setfilename. @@ -7789,7 +7789,7 @@ interline whitespace in either case.) Except when the entries are very brief, these blank lines make the list look better.@refill Here is an example of the use of @code{@@itemize}, followed by the -output it produces. Note that @code{@@bullet} produces an @samp{*} in +output it produces. Note that @code{@@bullet} produces a @samp{*} in Info and a round dot in @TeX{}.@refill @example @@ -14919,7 +14919,7 @@ Evidently, @samp{au} is an abbreviation for ``author''. @end example @noindent -since @samp{au} does @emph{not} serve as an abbreviation for +since @samp{au} does @emph{not} serve as an abbreviation for @samp{author.} (with a period following the word). @subsubheading Introducing New Terms diff --git a/man/widget.texi b/man/widget.texi index 743217f..fe91363 100644 --- a/man/widget.texi +++ b/man/widget.texi @@ -69,7 +69,7 @@ visible in the buffer. A simple constant widget intended to be used in the @code{menu-choice} and @code{radio-button-choice} widgets. @item choice-item -An button item only intended for use in choices. When invoked, the user +A button item only intended for use in choices. When invoked, the user will be asked to select another option from the choice widget. @item toggle A simple @samp{on}/@samp{off} switch. @@ -130,11 +130,11 @@ it will be autoloaded when needed. @comment node-name, next, previous, up @section User Interface -A form consist of read only text for documentation and some fields, -where each the fields contain two parts, as tag and a value. The tags -are used to identify the fields, so the documentation can refer to the -foo field, meaning the field tagged with @samp{Foo}. Here is an example -form: +A form consists of read only text for documentation and some fields, +where each of the fields contains two parts, a tag and a value. The +tags are used to identify the fields, so the documentation can refer to +the foo field, meaning the field tagged with @samp{Foo}. Here is an +example form: @example Here is some documentation. @@ -226,7 +226,7 @@ between a number of different options. This is how you edit an option field. Option fields are created by the @code{menu-choice} widget. In the example, @samp{@b{Choose}} is an option field tag. @item The @samp{@b{[INS]}} and @samp{@b{[DEL]}} buttons. -Activating these will insert or delete elements from a editable list. +Activating these will insert or delete elements from an editable list. The list is created by the @code{editable-list} widget. @item Embedded Buttons. The @samp{@b{_other work_}} is an example of an embedded @@ -591,7 +591,7 @@ in the buffer with a positive tabbing order, or @code{nil} @item :parent The parent of a nested widget (e.g. a @code{menu-choice} item or an -element of a @code{editable-list} widget). +element of an @code{editable-list} widget). @item :sibling-args This keyword is only used for members of a @code{radio-button-choice} or @@ -1029,7 +1029,7 @@ List whose car is the type of the list elements. @comment node-name, next, previous, up @subsection The @code{group} Widget -This widget simply group other widget together. +This widget simply groups other widgets together. Syntax: diff --git a/man/xemacs-faq.texi b/man/xemacs-faq.texi index e3eec91..5901e23 100644 --- a/man/xemacs-faq.texi +++ b/man/xemacs-faq.texi @@ -7,7 +7,7 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2002/04/30 16:06:09 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2002/08/20 11:35:32 $ @sp 1 @author Tony Rossini @author Ben Wing @@ -151,6 +151,7 @@ Installation and Trouble Shooting * Q2.0.12:: Why can't I strip XEmacs? * Q2.0.13:: I don't need no steenkin' packages. Do I? (NEW) * Q2.0.14:: How do I figure out which packages to install? (NEW) +* Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW) Trouble Shooting: * Q2.1.1:: XEmacs just crashed on me! @@ -267,6 +268,7 @@ Text Selections: * Q3.10.3:: Can I turn off the highlight during isearch? * Q3.10.4:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling. +* Q3.10.6:: Why is killing so slow? (NEW) Major Subsystems @@ -1061,7 +1063,7 @@ modification to @email{ava@@math.jhu.ed, Valery Alexeev's} @file{russian.el} which can be obtained from @end quotation -@uref{http://ftpsearch.lycos.com/?query=russian.el.Z&form=medium}. +@uref{http://www.math.uga.edu/~valery/russian.el}. @email{d.barsky@@ee.surrey.ac.uk, Dima Barsky} writes: @@ -1272,6 +1274,7 @@ Installation: * Q2.0.12:: Why can't I strip XEmacs? * Q2.0.13:: I don't need no steenkin' packages. Do I? (NEW) * Q2.0.14:: I don't want to install a million .els one at a time! (NEW) +* Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW) Trouble Shooting: * Q2.1.1:: XEmacs just crashed on me! @@ -1644,8 +1647,8 @@ any packages installed. However, only the most basic editing functions will be available with no packages installed, so installing packages is an essential part of making your installed XEmacs _useful_. -@node Q2.0.14, Q2.1.1, Q2.0.13, Installation -@unnumberedsubsec Q2.0.12: How do I figure out which packages to install? (NEW) +@node Q2.0.14, Q2.0.15, Q2.0.13, Installation +@unnumberedsubsec Q2.0.14: How do I figure out which packages to install? (NEW) Many people really liked the old way that packages were bundled and do not want to mess with packages at all. You can grab all the packages at @@ -1671,7 +1674,22 @@ As the Sumo tarballs are not regenerated as often as the individual packages, it is recommended that you use the automatic package tools afterwards to pick up any recent updates. -@node Q2.1.1, Q2.1.2, Q2.0.14, Installation +@node Q2.0.15, Q2.1.1, Q2.0.14, Installation +@unnumberedsubsec Q2.0.15: EFS fails with "500 AUTH not understood" (NEW) + +A typical error: FTP Error: USER request failed; 500 AUTH not understood. + +Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends +on comp.emacs.xemacs: + + tell your ftp client to not attempt AUTH authentication (or do not + use FTP servers that don't understand AUTH) + +and notes that you need to add an element (often "-u") to +`efs-ftp-program-args'. Use M-x customize-variable, and verify the +needed flag with `man ftp' or other local documentation. + +@node Q2.1.1, Q2.1.2, Q2.0.15, Installation @unnumberedsec 2.1: Trouble Shooting @unnumberedsubsec Q2.1.1: Help! XEmacs just crashed on me! @@ -2498,6 +2516,7 @@ Text Selections: * Q3.10.3:: Can I turn off the highlight during isearch? * Q3.10.4:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling. +* Q3.10.6:: Why is killing so slow? @end menu @node Q3.0.1, Q3.0.2, Customization, Customization @@ -3790,7 +3809,7 @@ Put this in your @code{.emacs}: Also see @ref{Q3.10.1}. -@node Q3.10.5, , Q3.10.4, Customization +@node Q3.10.5, Q3.10.6, Q3.10.4, Customization @unnumberedsubsec Q3.10.5: The region disappears when I hit the end of buffer while scrolling. This has been fixed by default starting with XEmacs-20.3. @@ -3821,6 +3840,68 @@ off like this: Thanks to @email{raman@@adobe.com, T. V. Raman} for assistance in deriving this answer. +@node Q3.10.6, , Q3.10.5, Customization +@unnumberedsubsec Q3.10.6: Why is killing so slow? + +This actually is an X Windows question, although you'll notice it with +keyboard operations as well as while using the GUI. Basically, there +are four ways to communicate interprogram via the X server: + +@table @strong +@item Primary selection +a transient selection that gets replaced every time a new selection is made + +@item Secondary selection +for "exchanging" with the primary selection + +@item Cut buffers +a clipboard internal to the X server (deprecated) + +@item Clipboard selection +a selection with a notification protocol that allows a separate app to +manage the clipboard +@end table + +The cut buffers are deprecated because managing them is even more +inefficient than the clipboard notification protocol. The primary +selection works fine for many users and applications, but is not very +robust under intensive or sophisticated use. + +In Motif and MS Windows, a clipboard has become the primary means for +managing cut and paste. These means that "modern" applications tend to +be oriented toward a true clipboard, rather than the primary selection. +(On Windows, there is nothing equivalent to the primary selection.) +It's not that XEmacs doesn't support the simple primary selection +method, it's that more and more other applications don't. + +So the slowdown occurs because XEmacs now engages in the clipboard +notification protocol on @emph{every} kill. This is especially slow on +Motif. + +With most people running most clients and server on the same host, and +many of the rest working over very fast communication, you may expect +that the situation is not going to improve. + +There are a number of workarounds. The most effective is to use a +special command to do selection ownership only when you intend to paste +to another application. Useful commands are @code{kill-primary-selection} +and @code{copy-primary-selection'}. These work only on text selected +with the mouse (probably; experiment), and are bound by default to the +Cut and Copy, respectively, buttons on the toolbar. + +If you are communicating by cut and paste with applications that use the +primary selection, then you can customize @code{interprogram-cut-function} +to @code{nil}, restoring the XEmacs version 20 behavior. How can you +tell if a program will support this? Motifly-correct programs require +the clipboard; you lose. For others, only by trying it. You usually +don't need to customize the complementary @code{interprogram-paste-function} +to @code{nil}; presumably you're willing to wait for a paste from another +program if delays only happen when you specifically request a paste. + +You can get some relief on Motif by setting +@code{x-selection-strict-motif-ownership} to nil, but this means you will +only intermittently be able to paste XEmacs kills to Motif applications. + @node Subsystems, Miscellaneous, Customization, Top @unnumbered 4 Major Subsystems diff --git a/man/xemacs/custom.texi b/man/xemacs/custom.texi index 608c2cc..84ea5fb 100644 --- a/man/xemacs/custom.texi +++ b/man/xemacs/custom.texi @@ -1416,8 +1416,9 @@ is used to specify the syntactic class of opening delimiters. Here is a table of syntactic classes, with the characters that specify them. @table @samp -@item @w{ } -The class of whitespace characters. +@item @w{-} +The class of whitespace characters. Please don't use the formerly +advertised @w{ }, which is not supported by GNU Emacs. @item w The class of word-constituent characters. @item _ diff --git a/man/xemacs/files.texi b/man/xemacs/files.texi index 1d81300..142f489 100644 --- a/man/xemacs/files.texi +++ b/man/xemacs/files.texi @@ -643,31 +643,34 @@ version of the file. To do this, use @kbd{M-x revert-buffer}, which operates on the current buffer. Since reverting a buffer can result in very extensive changes, you must confirm it with @kbd{yes}. - If the current buffer has been auto-saved more recently than it has been -saved explicitly, @code{revert-buffer} offers to read the auto save file -instead of the visited file (@pxref{Auto Save}). Emacs asks you about -the auto-save file before the request for confirmation of the -@kbd{revert-buffer} operation, and demands @kbd{y} or @kbd{n} -as an answer. If you have started to type @kbd{yes} for confirmation -without realizing that the auto-save question was going to be asked, the -@kbd{y} will answer that question, but the @kbd{es} will not be valid -confirmation. This gives you a chance to cancel the operation with -@kbd{C-g} and try again with the answers you really intend. - - @code{revert-buffer} keeps point at the same distance (measured in -characters) from the beginning of the file. If the file was edited only -slightly, you will be at approximately the same piece of text after -reverting as before. If you have made more extensive changes, the value of -point in the old file may bring you to a totally different piece of text -than your last editing point. + You may request that @code{revert-buffer} check for an auto-save file +that is more recent than the visited file by providing a prefix +argument. If a recent auto-save file exists, @code{revert-buffer} +offers to read the auto-save file instead of the visited file +(@pxref{Auto Save}). Emacs asks you about the auto-save file before the +request for confirmation of the @kbd{revert-buffer} operation, and +demands @kbd{y} or @kbd{n} as an answer. If you have started to type +@kbd{yes} to confirm the revert operation, the @kbd{y} will answer the +question about using the auto-save file, but the @kbd{es} will not be +valid confirmation for the reversion. This gives you a chance to cancel +the operation with @kbd{C-g} and try again with the answers you really +intend. + + @code{revert-buffer} preserves the value of point (in characters from +the beginning of the file). If the file was edited only slightly, you +will be at approximately the same piece of text after reverting as +before. If you have made more extensive changes, after reversion point +may be in a totally different context than your last edits before +reversion. A buffer reverted from its visited file is marked ``not modified'' until -you make a change. +you make a change. The buffer's modes will also be recalculated, by +@code{normal-mode}. Some kinds of buffers whose contents reflect data bases other than files, such as Dired buffers, can also be reverted. For them, reverting means -recalculating their contents from the appropriate data. Buffers -created randomly with @kbd{C-x b} cannot be reverted; @code{revert-buffer} +refreshing their contents from the appropriate data. Buffers created +randomly with @kbd{C-x b} cannot be reverted; @code{revert-buffer} reports an error when asked to do so. @node Auto Save, Version Control, Reverting, Files diff --git a/man/xemacs/menus.texi b/man/xemacs/menus.texi index 6513323..4cd40e7 100644 --- a/man/xemacs/menus.texi +++ b/man/xemacs/menus.texi @@ -223,7 +223,7 @@ information.@refill @c **** zmacs-regions is on by default these days - jwz @c @c Note: By default, you can use the @b{Edit} menu items on the region between -@c point an the mark as well as regions selected with the mouse. To change +@c point and the mark as well as regions selected with the mouse. To change @c this behavior, set the variable @code{zmacs-regions} to @c @code{t}. @xref{Active Regions} for more information. diff --git a/man/xemacs/misc.texi b/man/xemacs/misc.texi index d26bc10..0e4aa8c 100644 --- a/man/xemacs/misc.texi +++ b/man/xemacs/misc.texi @@ -417,14 +417,14 @@ except for the Term escape character, normally @kbd{C-c}. To switch between line and char mode, use these commands: @table @kbd -@kindex C-c C-k @r{(Term mode)} +@kindex C-c C-j @r{(Term mode)} findex term-char-mode -@item C-c C-k +@item C-c C-j Switch to line mode. Do nothing if already in line mode. -@kindex C-c C-j @r{(Term mode)} +@kindex C-c C-k @r{(Term mode)} @findex term-line-mode -@item C-c C-j +@item C-c C-k Switch to char mode. Do nothing if already in char mode. @end table diff --git a/man/xemacs/mule.texi b/man/xemacs/mule.texi index f88923d..b71786b 100644 --- a/man/xemacs/mule.texi +++ b/man/xemacs/mule.texi @@ -38,18 +38,60 @@ Enhancement to GNU Emacs''). @end menu @node Mule Intro, Language Environments, Mule, Mule -@section Introduction to world scripts - - The users of these scripts have established many more-or-less standard -coding systems for storing files. -@c XEmacs internally uses a single multibyte character encoding, so that it -@c can intermix characters from all these scripts in a single buffer or -@c string. This encoding represents each non-ASCII character as a sequence -@c of bytes in the range 0200 through 0377. +@section What is Mule? + +Mule is the MUltiLingual Extension to XEmacs. It provides facilities +not only for handling text written in many different languages, but in +fact multilingual texts containing several languages in the same buffer. +This goes beyond the simple facilities offered by Unicode for +representation of multilingual text. Mule also supports input methods, +composing display using fonts in various different encodings, changing +character syntax and other editing facilities to correspond to local +language usage, and more. + +The most obvious problem is that of the different character coding +systems used by different languages. ASCII supplies all the characters +needed for most computer programming languages and US English (it lacks +the currency symbol for British English), but other Western European +languages (French, Spanish, German) require more than 96 code positions +for accented characters. In fact, even with 8 bits to represent 96 more +character (including accented characters and symbols such as currency +symbols), some languages' alphabets remain incomplete (Croatian, +Polish). (The 64 "missing characters" are reserved for control +characters.) Furthermore, many European languages have their own +alphabets, which must conflict with the accented characters since the +ASCII characters are needed for computer interaction (error and log +messages are typically in ASCII). + +For economy of space, historical practice has been for each language to +establish its own encoding for the characters it needs. This allows +most European languages to represented with one octet (byte) per +character. However, many Asian languages have thousands of characters +and require two or more octets per character. For multilingual +purposes, the ISO 2022 standard establishes escape codes that allow +switching encodings in midstream. (It's also ISO 2022 that establishes +the standard that code points 0-31 and 128-159 are control codes.) + +However, this is error-prone and complex for internal processing. For +this reason XEmacs uses an internal coding system which can encode all +of the world's scripts. Unfortunately, for historical reasons, this +code is not Unicode, although we are moving in that direction. + XEmacs translates between the internal character encoding and various other coding systems when reading and writing files, when exchanging data with subprocesses, and (in some cases) in the @kbd{C-q} command -(see below). +(see below). The internal encoding is never visible to the user in a +production XEmacs, but unfortunately the process cannot be completely +transparent to the user. This is because the same ranges of octets may +represent 1-octet ISO-8859-1 (which is satisfactory for most Western +European use prior to the introduction of the Euro currency), 1-octet +ISO-8859-15 (which substitutes the Euro for the rarely used "generic +currency" symbol), 1-octet ISO-8859-5 (Cyrillic), or multioctet EUC-JP +(Japanese). There's no way to tell without being able to read! + +A number of heuristics are incorporated in Mule for automatic +recognition, there are facilities for the user to set defaults, and +where necessary (rarely, we hope) to set coding systems directly. @kindex C-h h @findex view-hello-file @@ -423,6 +465,41 @@ the usual three variants to specify the kind of end-of-line conversion. @node Recognize Coding, Specify Coding, Coding Systems, Mule @section Recognizing Coding Systems +@c #### This section is out of date. The following set-*-coding-system +@c functions are known: + +@c set-buffer-file-coding-system +@c set-buffer-file-coding-system-for-read +@c set-buffer-process-coding-system +@c set-console-tty-coding-system +@c set-console-tty-input-coding-system +@c set-console-tty-output-coding-system +@c set-default-buffer-file-coding-system +@c set-default-coding-systems +@c set-default-file-coding-system +@c set-file-coding-system +@c set-file-coding-system-for-read +@c set-keyboard-coding-system +@c set-pathname-coding-system +@c set-process-coding-system +@c set-process-input-coding-system +@c set-process-output-coding-system +@c set-terminal-coding-system + +@c Some are marked as broken. Agenda: (1) Update this section using +@c docstrings. Note that they may be inaccurate. (2) Correct the +@c documentation here, updating docstrings at the same time. + +@c Document this. + +@c set-language-environment-coding-systems + +@c What are these? + +@c dontusethis-set-value-file-name-coding-system-handler +@c dontusethis-set-value-keyboard-coding-system-handler +@c dontusethis-set-value-terminal-coding-system-handler + Most of the time, XEmacs can recognize which coding system to use for any given file--once you have specified your preferences. diff --git a/man/xemacs/packages.texi b/man/xemacs/packages.texi index 10d700f..6a9cba0 100644 --- a/man/xemacs/packages.texi +++ b/man/xemacs/packages.texi @@ -95,28 +95,19 @@ where you grabbed the core distribution from, and are located in the subdirectory @file{packages}. Package file names follow the naming convention @file{--pkg.tar.gz}. -If you have EFS @ref{(EFS)}, packages can be installed over the network. +If you have @ref{(EFS)}, packages can be installed over the network. Alternatively, if you have copies of the packages locally, you can install packages from a local disk or CDROM. The file @file{etc/PACKAGES} in the core distribution contains a list of -the @ref{Available Packages} at the time of the XEmacs release. Packages are -also listed on the @code{Options} menu under: - -@example - Options->Customize->Emacs->Packages -@end example - -However, don't select any of these menu picks unless you actually want -to install the given package (and have properly configured your system -to do so). +the @ref{Available Packages} at the time of the XEmacs release. You can also get a list of available packages, and whether or not they are installed, using the visual package browser and installer. You can access it via the menus: @example - Options->Manage Packages->List & Install + Tools -> Packages -> List and Install @end example Or, you can get to it via the keyboard: @@ -244,14 +235,10 @@ and optionally: After installing these by hand, fire up XEmacs and follow these steps. -Note: The menus in XEmacs 21.2.x and up have changed slightly, so -where I mention "Options -> Manage Packages", substitute "Tools -> -Packages". - @enumerate 1 @item Choose a download site. -via menu: Options -> Manages Packages -> Add Download Site +via menu: Tools -> Packages -> Add Download Site via keyb: @code{M-x customize-variable RET package-get-remote RET} (put in the details of remote host and directory) @@ -261,7 +248,7 @@ local directory, you can: @code{M-x pui-add-install-directory RET} @item Obtain a list of packages and display the list in a buffer named @file{*Packages*}. -menu: Options -> Manage Packages -> List & Install +menu: Tools -> Packages -> List & Install keyb: @code{M-x pui-list-packages RET} XEmacs will now connect to the remote site and download the @@ -677,7 +664,7 @@ xemacs.org and it's mirrors. If a particular package that you are looking for isn't here, please send a message to the @email{xemacs-beta@@xemacs.org, XEmacs Beta list}. -This data is up-to-date as of May 15, 2001. +This data is up-to-date as of August 8, 2002. @subsection Normal Packages A very broad selection of elisp packages. @@ -696,7 +683,7 @@ A Portable Emacs Library. Used by XEmacs MIME support. Basic TeX/LaTeX support. @item bbdb -The Big Brother Data Base +The Big Brother Data Base: a rolodex-like database program. @item build Build XEmacs using custom widgets. @@ -713,8 +700,12 @@ Calendar and diary support. @item cc-mode C, C++ and Java language support. +@item clearcase +Support for the Clearcase version control system. + @item cookie -Spook and Yow (Zippy quotes). +"Fortune cookie"-style messages. Includes Spook (suspicious phrases) +and Yow (Zippy quotes). @item crisp Crisp/Brief emulation. @@ -722,10 +713,19 @@ Crisp/Brief emulation. @item debug GUD, gdb, dbx debugging support. +@item dictionary +Interface to RFC2229 dictionary servers. + @item dired The DIRectory EDitor is for manipulating, and running commands on files in a directory. +@item docbookide +DocBook editing support. + +@item ecrypto +Crypto functionality in Emacs Lisp. + @item edebug A Lisp debugger. @@ -742,10 +742,6 @@ DEC EDIT/EDT emulation. @item efs Treat files on remote systems the same as local files. -@item eicq -ICQ Client developed and tested on Linux x86; -only supported on that platform - @item eieio Enhanced Implementation of Emacs Interpreted Objects. @@ -758,6 +754,9 @@ Another interface over patch. @item eshell Command shell implemented entirely in Emacs Lisp. +@item ess +ESS: Emacs Speaks Statistics. + @item eterm Terminal emulator. @@ -785,9 +784,15 @@ XEmacs bug reports. @item gnus The Gnus Newsreader and Mailreader. +@item haskell-mode +Haskell editing support. + @item hm--html-menus HTML editing. +@item ibuffer +Advanced replacement for buffer-menu. + @item idlwave Editing and Shell mode for the Interactive Data Language. @@ -795,7 +800,7 @@ Editing and Shell mode for the Interactive Data Language. Enhanced front-end for Grep. @item ilisp -Front-end for Inferior Lisp. +Front-end for interacting with Inferior Lisp (external lisps). @item ispell Spell-checking with ispell. @@ -803,6 +808,9 @@ Spell-checking with ispell. @item jde Java language and development support. +@item liece +IRC (Internet Relay Chat) client for Emacs. + @item mail-lib Fundamental lisp files for providing email support. @@ -810,17 +818,20 @@ Fundamental lisp files for providing email support. Support for messaging encryption with PGP. @item mew -Messaging in an Emacs World. +Messaging in an Emacs World; a MIME-based email program. @item mh-e Front end support for MH. @item mine -Minehunt. +Elisp implementation of the game 'Minehunt'. @item misc-games Other amusements and diversions. +@item mmm-mode +Support for Multiple Major Modes within a single buffer. + @item net-utils Miscellaneous Networking Utilities. This is a single-file package and files may be deleted at will. @@ -829,6 +840,9 @@ files may be deleted at will. Miscellaneous single-file O/S utilities, for printing, archiving, compression, remote shells, etc. +@item ocaml +Objective Caml editing support. + @item pc PC style interface emulation. @@ -841,8 +855,8 @@ Provides programmatic completion. @item prog-modes Miscellaneous single-file lisp files for various programming languages. -@item ps-print-nomule -Old, but no-Mule safe ps-print. +@item ps-print +Print buffers to PostScript printers. @item psgml Validated HTML/SGML editing. @@ -853,6 +867,9 @@ Emacs support for LaTeX cross-references, citations. @item rmail An obsolete Emacs mailer. If you do not already use it don't start. +@item sasl +Simple Authentication and Security Layer (SASL) library. + @item scheme Front-end support for Inferior Scheme. @@ -865,9 +882,15 @@ SGML/Linuxdoc-SGML editing. @item sh-script Support for editing shell scripts. +@item sieve +Manage Sieve email filtering scripts. + @item slider User interface tool. +@item sml-mode +Standard ML editing support. + @item sounds-au XEmacs Sun sound files. @@ -904,6 +927,10 @@ Support for building with Tooltalk. @item tpu DEC EDIT/TPU support. +@item tramp +Remote shell-based file editing. This is similar to EFS or Ange-FTP, +but works with rsh/ssh and rcp/scp. + @item vc Version Control for Free systems. @@ -935,6 +962,9 @@ XEmacs Lisp developer support. This package contains utilities for supporting Lisp development. It is a single-file package so it may be tailored. +@item xslide +XSL editing support. + @item xslt-process A minor mode for (X)Emacs which allows running an XSLT processor on a buffer. @@ -958,6 +988,12 @@ Lisp Interface to EDICT, Kanji Dictionary. Wnn (4.2 and 6) support. SJ3 support. Must be installed prior to XEmacs build. +@item latin-unity +Unify character sets in a buffer. When characters belong to disjoint +character sets, this attempts to translate the characters so +that they belong to one character set. If the buffer coding system is +not sufficient, this suggests different coding systems. + @item leim Quail. Used for everything other than English and Japanese. @@ -971,6 +1007,9 @@ Dictionary support. (This isn't an English dictionary program) @item mule-base Basic Mule support. Must be installed prior to building with Mule. +@item mule-ucs +Extended coding systems (including Unicode) for XEmacs. + @item skk Another Japanese Language Input Method. Can be used without a separate process running as a dictionary server. diff --git a/nt/ChangeLog b/nt/ChangeLog index 5178ece..3b81c6f 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,7 +1,44 @@ +2002-08-23 Stephen J. Turnbull + + * XEmacs 21.4.9 "Informed Management" is released. + +2002-08-16 Jonathan Harris + + * config.inc.samp (USE_PORTABLE_DUMPER): Default to on. + * config.inc.samp (USE_MINIMAL_TAGBITS): Removed. + * config.inc.samp (USE_INDEXED_LRECORD_IMPLEMENTATION): Removed. + * config.inc.samp (GUNG_HO): Removed. + * xemacs.mak (USE_MINIMAL_TAGBITS): Removed. + * xemacs.mak (USE_INDEXED_LRECORD_IMPLEMENTATION): Removed. + * xemacs.mak (GUNG_HO): Removed. + * xemacs.mak (TAGBITS_DEFINES): Removed. + * xemacs.mak (LRECORD_DEFINES): Removed. + * xpm.mak: Default to using MSVCRT as the C runtime + + Remove all vestiges of USE_MINIMAL_TAGBITS, + USE_INDEXED_LRECORD_IMPLEMENTATION, and GUNG_HO, since those + ifdefs have long been removed. + + Make pdump the default. + +2002-07-05 Jonathan Harris + + * README: Document Visual Studio .NET setup + +2002-05-06 Jonathan Harris + + * README: + * config.inc.samp: + Update PNG version to 1.0.9, zlib version to 1.1.14. + 2002-05-09 Stephen J. Turnbull * XEmacs 21.4.8 "Honest Recruiter" is released. +2002-03-26 Vin Shelton + + * xemacs.mak: Added special rule to build winclient.exe. + 2002-05-04 Stephen J. Turnbull * XEmacs 21.4.7 "Economic Science" is released. diff --git a/nt/README b/nt/README index 7078852..82a7a01 100644 --- a/nt/README +++ b/nt/README @@ -1,11 +1,11 @@ -Building and Installing XEmacs on Windows 95/98/NT/2000 -*- mode:outline -*- +Building and Installing XEmacs on Windows 95/98/NT/2000/XP -*- mode:outline -*- David Hobley Marc Paquette Jonathan Harris Ben Wing -This is a port of XEmacs to Windows 95/98/NT/2000. If you are looking for a +This is a port of XEmacs to Windows 95/98/NT/2000/XP. If you are looking for a port of GNU Emacs, see http://www.cs.washington.edu/homes/voelker/ntemacs.html. NT 3.51 or later is required for building on Windows NT. Note that the developers typically use NT 4.0 and Windows 2000, and there may possibly be @@ -17,7 +17,7 @@ systems listed. ============================ 1. You will need Visual C++ V4.0 or later to compile everything. Personally - we have tested V4.0, V4.2, V5.0 and v6.0. + we have tested V4.0, V4.2, V5.0, v6.0 and v7.0/.NET. Note that Visual C++ assumes that the environment variables INCLUDE and LIB are set to specify the location of the includes and libraries. @@ -31,6 +31,9 @@ systems listed. environment variables automatically set up in the registry, which is generally a good idea. + Visual Studio .NET calls this batch file vsvars32.bat and installs it in + $Installdir\Common7\Tools, but doesn't offer at install time to + automatically set these environment variables up in the registry. 2. Grab the latest XEmacs source from @@ -114,17 +117,17 @@ If you want support for X you will also need: * Optional libraries ==================== -1. You really want the XPM library. Grab the latest version of the - xpm sources (xpm-3.4k.tar.gz at time of writing) from - ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack them somewhere. - Copy nt\xpm.mak from the xemacs sources to the lib subdirectory of the - xpm sources, cd to that directory and build xpm with 'nmake -f xpm.mak'. +1. You really want the XPM library. Grab the latest version of the xpm + sources (xpm-3.4k.tar.gz as of 2002-04-27) from + ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack them somewhere. Copy + nt\xpm.mak from the xemacs sources to the lib subdirectory of the xpm + sources, cd to that directory and build xpm with 'nmake -f xpm.mak'. -2. You probably also want PNG image support. Grab the latest versions of zlib - and libpng (zlib-1.1.3 and libpng-1.0.2 at time of writing) from - ftp://ftp.xemacs.org/pub/xemacs/aux/, unpack them somewhere and read - the respective READMEs for details on how to build them. The following - build procedure works for zlib-1.1.3 and libpng-1.0.2: +2. You probably also want PNG image support. Grab the latest versions of + zlib and libpng (zlib-1.1.4 and libpng-1.0.9 as of 2002-04-27) from + ftp://ftp.xemacs.org/pub/xemacs/aux/, unpack them somewhere and read the + respective READMEs for details on how to build them. The following + build procedure works for zlib-1.1.4 and libpng-1.0.9: cd to the zlib directory, type 'copy msdos\makefile.w32 Makefile' and then type 'nmake'. @@ -133,16 +136,16 @@ If you want support for X you will also need: and type 'nmake -f scripts\makefile.w32'. 3. If you want TIFF support, grap the latest version of libtiff (tiff-v3.4 - at time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack + as of 2002-04-27) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack it somewhere. Copy nt\tiff.mak from the xemacs sources to the contrib\winnt subdirectory of the tiff sources, cd to that directory and build libtiff with 'nmake -f tiff.mak'. Note: tiff.mak has only been verified to work under WinNT, not Win95 or 98. However, the latest - distribution of libtiff includes a contrib\win95\makefile.w95; that might - work. + distribution of libtiff includes a contrib\win95\makefile.w95; that + might work. -4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b at - time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the +4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b as + of 2002-04-27) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the README for details on how to build it. 5. If you want X-Face support, grab the compface distribution from @@ -238,7 +241,7 @@ If you want support for X you will also need: XEmacs will be installed (by default) as "c:\Program Files\XEmacs\XEmacs-21.4\i586-pc-win32\xemacs.exe". - To run from the build directory, run the file "nt\xemacs.exe" off of the + To run from the build directory, run the file "src\xemacs.exe" off of the root of the build directory. You may want to create a shortcut to the file from your Desktop or diff --git a/nt/xemacs.mak b/nt/xemacs.mak index e59b895..db8534b 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -167,18 +167,9 @@ USE_UNION_TYPE=0 !if !defined(USE_MINITAR) USE_MINITAR=$(HAVE_ZLIB) !endif -!if !defined(USE_MINIMAL_TAGBITS) -USE_MINIMAL_TAGBITS=0 -!endif -!if !defined(USE_INDEXED_LRECORD_IMPLEMENTATION) -USE_INDEXED_LRECORD_IMPLEMENTATION=0 -!endif !if !defined(USE_PORTABLE_DUMPER) USE_PORTABLE_DUMPER=0 !endif -!if !defined(GUNG_HO) -GUNG_HO=0 -!endif # A little bit of adhockery. Default to use system malloc and # DLL version of the C runtime library when using portable @@ -305,14 +296,6 @@ CONFIG_ERROR=1 !endif # -# Handle GUNG_HO -# -!if defined(GUNG_HO) -USE_MINIMAL_TAGBITS=$(GUNG_HO) -USE_INDEXED_LRECORD_IMPLEMENTATION=$(GUNG_HO) -!endif - -# # Whether to use dependency information generated by make-src-depend # !if !defined(DEPEND) @@ -461,12 +444,6 @@ DEBUG_FLAGS=-debug:full QUICK_DEFINES=-DQUICK_BUILD !endif -!if $(USE_MINIMAL_TAGBITS) -TAGBITS_DEFINES=-DUSE_MINIMAL_TAGBITS -!endif -!if $(USE_INDEXED_LRECORD_IMPLEMENTATION) -LRECORD_DEFINES=-DUSE_INDEXED_LRECORD_IMPLEMENTATION -!endif !if $(USE_UNION_TYPE) UNION_DEFINES=-DUSE_UNION_TYPE !endif @@ -495,8 +472,7 @@ PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\" INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(LWLIB_SRCDIR) -DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \ - $(TAGBITS_DEFINES) $(LRECORD_DEFINES) $(UNION_DEFINES) \ +DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \ $(DUMPER_DEFINES) $(MALLOC_DEFINES) $(QUICK_DEFINES) \ -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \ -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES) @@ -565,6 +541,11 @@ $(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS) $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib -link -incremental:no cd $(NT) +$(LIB_SRC)/winclient.exe: $(LIB_SRC)/winclient.c + cd $(LIB_SRC) + $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** user32.lib -link -incremental:no + cd $(NT) + $(LIB_SRC)/minitar.exe : $(NT)/minitar.c $(CCV) $(CFLAGS) -I$(ZLIB_DIR) -Fe$@ $** $(ZLIB_DIR)\zlib.lib -link -incremental:no @@ -572,6 +553,7 @@ LIB_SRC_TOOLS = \ $(LIB_SRC)/etags.exe \ $(LIB_SRC)/hexl.exe \ $(LIB_SRC)/i.exe \ + $(LIB_SRC)/winclient.exe \ $(LIB_SRC)/make-docfile.exe \ $(LIB_SRC)/mmencode.exe \ $(LIB_SRC)/movemail.exe \ @@ -1596,12 +1578,6 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_ WARNING: expense of an additional ~4KB of code. -------------------------------------------------------------------- !endif -!if $(USE_MINIMAL_TAGBITS) - Using minimal tagbits. -!endif -!if $(USE_INDEXED_LRECORD_IMPLEMENTATION) - Using indexed lrecord implementation. -!endif !if $(USE_UNION_TYPE) Using union type for Lisp object storage. !endif diff --git a/nt/xpm.mak b/nt/xpm.mak index 2adc736..2cdbe2a 100644 --- a/nt/xpm.mak +++ b/nt/xpm.mak @@ -10,7 +10,7 @@ DEBUG=0 !endif !if !defined(USE_CRTDLL) -USE_CRTDLL=0 +USE_CRTDLL=1 !endif !if $(DEBUG) @@ -67,9 +67,4 @@ all: ..\X11\xpm.h Xpm.lib mkdir ..\X11 Xpm.lib: $(OBJS) -!if $(USE_CRTDLL) -# Target is ok, link builds lib as a side effect. - link -nologo -dll -def:xpm.def -out:Xpm.dll gdi32.lib $(OBJS) -!else lib -nologo -out:$@ $(OBJS) -!endif diff --git a/src/EmacsFrame.c b/src/EmacsFrame.c index 78ac737..0a14334 100644 --- a/src/EmacsFrame.c +++ b/src/EmacsFrame.c @@ -517,7 +517,7 @@ EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, if (cur->core.width == new->core.width && cur->core.height == new->core.height) { - int i; + Cardinal i; for (i=0; i<*argc; i++) if (strcmp (argv[i].name, XtNwidth) == 0 || strcmp (argv[i].name, XtNheight) == 0) diff --git a/src/ExternalShell.c b/src/ExternalShell.c index 9c8a7ed..767c3ab 100644 --- a/src/ExternalShell.c +++ b/src/ExternalShell.c @@ -612,7 +612,7 @@ hack_event_masks_1 (Display *display, Window w, int this_window_propagate) { Window root, parent, *children; unsigned int nchildren; - int i; + unsigned int i; if (!XQueryTree (display, w, &root, &parent, &children, &nchildren)) return; diff --git a/src/backtrace.h b/src/backtrace.h index fba7130..7ca942b 100644 --- a/src/backtrace.h +++ b/src/backtrace.h @@ -147,7 +147,7 @@ extern struct backtrace *backtrace_list; /* Most callers should simply use specbind() and unbind_to(), but if speed is REALLY IMPORTANT, you can use the faster macros below */ void specbind_magic (Lisp_Object, Lisp_Object); -void grow_specpdl (size_t reserved); +void grow_specpdl (EMACS_INT reserved); void unbind_to_hairy (int); extern int specpdl_size; @@ -214,8 +214,9 @@ extern int specpdl_size; } while (0) /* Request enough room for SIZE future entries on special binding stack */ +/* SR_size will typically be compared to an unsigned short */ #define SPECPDL_RESERVE(size) do { \ - size_t SR_size = (size); \ + EMACS_INT SR_size = (size); \ if (specpdl_depth() + SR_size >= specpdl_size) \ grow_specpdl (SR_size); \ } while (0) diff --git a/src/bytecode.c b/src/bytecode.c index 8a2c963..58ebc0c 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -211,6 +211,7 @@ typedef enum Opcode Opcode; typedef unsigned char Opbyte; +static void check_opcode (Opcode opcode); static void invalid_byte_code_error (char *error_message, ...); Lisp_Object * execute_rare_opcode (Lisp_Object *stack_ptr, @@ -637,6 +638,7 @@ execute_optimized_program (const Opbyte *program, invalid_byte_code_error ("byte code stack overflow"); if (stack_ptr < stack_beg) invalid_byte_code_error ("byte code stack underflow"); + check_opcode (opcode); #endif #ifdef BYTE_CODE_METER diff --git a/src/callint.c b/src/callint.c index faa910d..8676692 100644 --- a/src/callint.c +++ b/src/callint.c @@ -307,8 +307,9 @@ when reading the arguments. if (EQ (funcar, Qautoload)) { - struct gcpro gcpro1, gcpro2; - GCPRO2 (function, prefix); + struct gcpro gcpro1; + GCPRO1 (prefix); + /* do_autoload GCPROs both arguments */ do_autoload (fun, function); UNGCPRO; goto retry; diff --git a/src/console-msw.h b/src/console-msw.h index 8d8e3f9..59a6033 100644 --- a/src/console-msw.h +++ b/src/console-msw.h @@ -342,6 +342,8 @@ USID emacs_mswindows_delete_stream_pair (Lisp_Object instream, HANDLE get_nt_process_handle (Lisp_Process *p); #endif +void mswindows_unwait_process (Lisp_Process *p); + extern Lisp_Object Vmswindows_frame_being_created; extern Lisp_Object mswindows_frame_being_created; diff --git a/src/device-msw.c b/src/device-msw.c index 63ac69d..d215238 100644 --- a/src/device-msw.c +++ b/src/device-msw.c @@ -809,20 +809,20 @@ mswindows_get_default_margin (Lisp_Object prop) } static int -plist_get_margin (Lisp_Object plist, Lisp_Object prop) +plist_get_margin (Lisp_Object plist, Lisp_Object prop, int mm_p) { Lisp_Object val = Fplist_get (plist, prop, make_int (mswindows_get_default_margin (prop))); if (!INTP (val)) invalid_argument ("Margin value must be an integer", val); - return MulDiv (XINT (val), 100, 144); + return MulDiv (XINT (val), mm_p ? 254 : 100, 144); } static Lisp_Object plist_set_margin (Lisp_Object plist, Lisp_Object prop, int margin, int mm_p) { - Lisp_Object val = make_int (MulDiv (margin, 144, mm_p ? 2450 : 100)); + Lisp_Object val = make_int (MulDiv (margin, 144, mm_p ? 254 : 100)); return Fcons (prop, Fcons (val, plist)); } @@ -866,15 +866,21 @@ mswindows_handle_page_setup_dialog_box (struct frame *f, Lisp_Object keys) { Lisp_Devmode *ldm = decode_devmode (device); PAGESETUPDLG pd; + TCHAR measure[2]; + int data; + + GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_IMEASURE, + measure, sizeof(measure)); + data = (strcmp (measure, "0")); memset (&pd, 0, sizeof (pd)); pd.lStructSize = sizeof (pd); pd.hwndOwner = mswindows_get_selected_frame_hwnd (); pd.Flags = PSD_MARGINS; - pd.rtMargin.left = plist_get_margin (plist, Qleft_margin); - pd.rtMargin.top = plist_get_margin (plist, Qtop_margin); - pd.rtMargin.right = plist_get_margin (plist, Qright_margin); - pd.rtMargin.bottom = plist_get_margin (plist, Qbottom_margin); + pd.rtMargin.left = plist_get_margin (plist, Qleft_margin, !data); + pd.rtMargin.top = plist_get_margin (plist, Qtop_margin, !data); + pd.rtMargin.right = plist_get_margin (plist, Qright_margin, !data); + pd.rtMargin.bottom = plist_get_margin (plist, Qbottom_margin, !data); pd.hDevMode = devmode_to_hglobal (ldm); if (!PageSetupDlg (&pd)) diff --git a/src/device.h b/src/device.h index a870bbf..3c5dcd2 100644 --- a/src/device.h +++ b/src/device.h @@ -167,6 +167,8 @@ struct device unsigned int extents_changed :1; unsigned int faces_changed :1; unsigned int frame_changed :1; + unsigned int frame_layout_changed :1; /* The layout of frame + elements has changed. */ unsigned int glyphs_changed :1; unsigned int subwindows_changed :1; unsigned int subwindows_state_changed :1; @@ -425,6 +427,9 @@ int valid_device_class_p (Lisp_Object class); #define MARK_DEVICE_FRAME_CHANGED(d) \ ((void) (frame_changed = (d)->frame_changed = 1)) +#define MARK_DEVICE_FRAME_LAYOUT_CHANGED(d) \ + ((void) (frame_layout_changed = (d)->frame_layout_changed = 1)) + #define MARK_DEVICE_WINDOWS_CHANGED(d) \ ((void) (windows_changed = (d)->windows_changed = 1)) diff --git a/src/dialog-msw.c b/src/dialog-msw.c index 5a7eecf..954a27a 100644 --- a/src/dialog-msw.c +++ b/src/dialog-msw.c @@ -285,6 +285,14 @@ free_dynarr_opaque_ptr (Lisp_Object arg) return arg; } +/* Unwind protection decrements dialog count */ +static Lisp_Object +dialog_popped_down (Lisp_Object arg) +{ + popup_up_p--; + return Qnil; +} + #define ALIGN_TEMPLATE \ { \ @@ -434,12 +442,13 @@ handle_directory_dialog_box (struct frame *f, Lisp_Object keys) pMalloc->lpVtbl->Free(pMalloc, pidl); pMalloc->lpVtbl->Release(pMalloc); return ret; - } + } else if (pd.unknown_fname != 0) { ret = tstr_to_local_file_format (pd.unknown_fname); xfree(pd.unknown_fname); } - + else while (1) + signal_quit (); } else signal_type_error (Qdialog_box_error, @@ -791,16 +800,21 @@ static Lisp_Object mswindows_make_dialog_box_internal (struct frame* f, Lisp_Object type, Lisp_Object keys) { + int unbind_count = specpdl_depth (); + record_unwind_protect (dialog_popped_down, Qnil); + popup_up_p++; + if (EQ (type, Qfile)) - return handle_file_dialog_box (f, keys); + return unbind_to (unbind_count, handle_file_dialog_box (f, keys)); else if (EQ (type, Qdirectory)) - return handle_directory_dialog_box (f, keys); + return unbind_to (unbind_count, handle_directory_dialog_box (f, keys)); else if (EQ (type, Qquestion)) - return handle_question_dialog_box (f, keys); + return unbind_to (unbind_count, handle_question_dialog_box (f, keys)); else if (EQ (type, Qprint)) - return mswindows_handle_print_dialog_box (f, keys); + return unbind_to (unbind_count, mswindows_handle_print_dialog_box (f, keys)); else if (EQ (type, Qpage_setup)) - return mswindows_handle_page_setup_dialog_box (f, keys); + return unbind_to (unbind_count, + mswindows_handle_page_setup_dialog_box (f, keys)); else signal_type_error (Qunimplemented, "Dialog box type", type); return Qnil; diff --git a/src/dired-msw.c b/src/dired-msw.c index a652937..791ed06 100644 --- a/src/dired-msw.c +++ b/src/dired-msw.c @@ -173,6 +173,7 @@ mswindows_get_files (char *dirfile, int nowild, Lisp_Object pattern, int findex, len; char win32pattern[MAXNAMLEN+3]; HANDLE fh; + int errm; /* * Much of the following code and comments were taken from dired.c. @@ -214,6 +215,8 @@ mswindows_get_files (char *dirfile, int nowild, Lisp_Object pattern, */ findex = 0; fh = INVALID_HANDLE_VALUE; + errm = SetErrorMode (SEM_FAILCRITICALERRORS + | SEM_NOOPENFILEERRORBOX); while (1) { @@ -226,6 +229,7 @@ mswindows_get_files (char *dirfile, int nowild, Lisp_Object pattern, fh = FindFirstFile(win32pattern, &files[findex]); if (fh == INVALID_HANDLE_VALUE) { + SetErrorMode (errm); report_file_error ("Opening directory", list1(build_string(dirfile))); } @@ -239,6 +243,7 @@ mswindows_get_files (char *dirfile, int nowild, Lisp_Object pattern, break; } FindClose(fh); + SetErrorMode (errm); report_file_error ("Reading directory", list1(build_string(dirfile))); } @@ -277,6 +282,8 @@ mswindows_get_files (char *dirfile, int nowild, Lisp_Object pattern, *nfiles = findex; break; } + + SetErrorMode (errm); return (files); } diff --git a/src/editfns.c b/src/editfns.c index a5f4275..ca314b9 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1107,10 +1107,11 @@ characters appearing in the day and month names may be incorrect. { time_t value; size_t size; + struct tm * tm; CHECK_STRING (format_string); - if (! lisp_to_time (time_, &value)) + if (! lisp_to_time (time_, &value) || ! (tm = localtime (&value))) error ("Invalid time specification"); /* This is probably enough. */ @@ -1122,7 +1123,7 @@ characters appearing in the day and month names may be incorrect. *buf = 1; if (emacs_strftime (buf, size, (const char *) XSTRING_DATA (format_string), - localtime (&value)) + tm) || !*buf) return build_ext_string (buf, Qbinary); /* If buffer was too small, make it bigger. */ @@ -1151,10 +1152,10 @@ ZONE is an integer indicating the number of seconds east of Greenwich. struct tm *decoded_time; Lisp_Object list_args[9]; - if (! lisp_to_time (specified_time, &time_spec)) + if (! lisp_to_time (specified_time, &time_spec) + || ! (decoded_time = localtime (&time_spec))) error ("Invalid time specification"); - decoded_time = localtime (&time_spec); list_args[0] = make_int (decoded_time->tm_sec); list_args[1] = make_int (decoded_time->tm_min); list_args[2] = make_int (decoded_time->tm_hour); @@ -1179,10 +1180,10 @@ static void set_time_zone_rule (char *tzstring); /* from GNU Emacs 21, per Simon Josefsson, modified by stephen The slight inefficiency is justified since negative times are weird. */ Lisp_Object -make_time (time_t time) +make_time (time_t tval) { - return list2 (make_int (time < 0 ? time / 0x10000 : time >> 16), - make_int (time & 0xFFFF)); + return list2 (make_int (tval < 0 ? tval / 0x10000 : tval >> 16), + make_int (tval & 0xFFFF)); } DEFUN ("encode-time", Fencode_time, 6, MANY, 0, /* diff --git a/src/eval.c b/src/eval.c index b4622b1..0f0b879 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1236,6 +1236,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. if (EQ (tem, Qt) || EQ (tem, Qmacro)) { /* Yes, load it and try again. */ + /* do_autoload GCPROs both arguments */ do_autoload (def, sym); continue; } @@ -2952,7 +2953,10 @@ when reading the arguments. { final = indirect_function (cmd, 1); if (CONSP (final) && EQ (Fcar (final), Qautoload)) - do_autoload (final, cmd); + { + /* do_autoload GCPROs both arguments */ + do_autoload (final, cmd); + } else break; } @@ -3135,10 +3139,10 @@ do_autoload (Lisp_Object fundef, /* This function can GC */ int speccount = specpdl_depth(); Lisp_Object fun = funname; - struct gcpro gcpro1, gcpro2; + struct gcpro gcpro1, gcpro2, gcpro3; CHECK_SYMBOL (funname); - GCPRO2 (fun, funname); + GCPRO3 (fun, funname, fundef); /* Value saved here is to be restored into Vautoload_queue */ record_unwind_protect (un_autoload, Vautoload_queue); @@ -3401,6 +3405,7 @@ Evaluate FORM and return its value. if (EQ (funcar, Qautoload)) { + /* do_autoload GCPROs both arguments */ do_autoload (fun, original_fun); goto retry; } @@ -3458,6 +3463,7 @@ Evaluate FORM and return its value. } +/* #### Why is Feval so anal about GCPRO, Ffuncall so cavalier? */ DEFUN ("funcall", Ffuncall, 1, MANY, 0, /* Call first argument as a function, passing the remaining arguments to it. Thus, (funcall 'cons 'x 'y) returns (x . y). @@ -3525,7 +3531,10 @@ Thus, (funcall 'cons 'x 'y) returns (x . y). if (fun_nargs == max_args) /* Optimize for the common case */ { funcall_subr: - FUNCALL_SUBR (val, subr, fun_args, max_args); + { + /* The "extra" braces placate GCC 2.95.4. */ + FUNCALL_SUBR (val, subr, fun_args, max_args); + } } else if (fun_nargs < subr->min_args) { @@ -3572,6 +3581,7 @@ Thus, (funcall 'cons 'x 'y) returns (x . y). } else if (EQ (funcar, Qautoload)) { + /* do_autoload GCPROs both arguments */ do_autoload (fun, args[0]); goto retry; } @@ -3650,11 +3660,8 @@ function_argcount (Lisp_Object function, int function_min_args_p) } else if (EQ (funcar, Qautoload)) { - struct gcpro gcpro1; - - GCPRO1 (function); + /* do_autoload GCPROs both arguments */ do_autoload (function, orig_function); - UNGCPRO; function = orig_function; goto retry; } @@ -4788,9 +4795,9 @@ call2_trapping_errors (const char *warning_string, Lisp_Object function, #define min_max_specpdl_size 400 void -grow_specpdl (size_t reserved) +grow_specpdl (EMACS_INT reserved) { - size_t size_needed = specpdl_depth() + reserved; + EMACS_INT size_needed = specpdl_depth() + reserved; if (size_needed >= max_specpdl_size) { if (max_specpdl_size < min_max_specpdl_size) diff --git a/src/event-Xt.c b/src/event-Xt.c index 8c55b2b..4345bb1 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -310,9 +310,11 @@ maybe_define_x_key_as_self_inserting_character (KeySym keysym, Lisp_Object symbo { extern Lisp_Object Vcurrent_global_map; extern Lisp_Object Qascii_character; - Fput (symbol, Qascii_character, character); - if (NILP (Flookup_key (Vcurrent_global_map, symbol, Qnil))) - Fdefine_key (Vcurrent_global_map, symbol, Qself_insert_command); + if (NILP (Flookup_key (Vcurrent_global_map, symbol, Qnil))) + { + Fput (symbol, Qascii_character, character); + Fdefine_key (Vcurrent_global_map, symbol, Qself_insert_command); + } } } diff --git a/src/event-msw.c b/src/event-msw.c index e4e1be5..aaeaa4f 100644 --- a/src/event-msw.c +++ b/src/event-msw.c @@ -186,7 +186,7 @@ static DWORD mswindows_last_mouse_button_state; exists. For example, "start notepad" command is issued from the shell, then the shell is closed by C-c C-d. Although the shell process exits, its output pipe will not get closed until the - notepad process exits also, because it inherits the pipe form the + notepad process exits also, because it inherits the pipe from the shell. In this case, we abandon the thread, and let it live until all such processes exit. While struct ntpipe_slurp_stream is deallocated in this case, ntpipe_slurp_stream_shared_data are not. */ @@ -1149,6 +1149,21 @@ remove_waitable_handle (HANDLE h) } #endif /* HAVE_MSG_SELECT */ +/* + * Given a lisp process pointer remove the corresponding process handle + * from mswindows_waitable_handles if it is in it. Normally the handle is + * removed when the process terminates, but if the lisp process structure + * is deleted before the process terminates we must delete the process + * handle since it will be invalid and will cause the wait to fail + */ +void +mswindows_unwait_process (Lisp_Process *p) +{ +#ifndef HAVE_MSG_SELECT + remove_waitable_handle (get_nt_process_handle (p)); +#endif /* HAVE_MSG_SELECT */ +} + /************************************************************************/ /* Event pump */ @@ -1494,6 +1509,8 @@ mswindows_need_event (int badly_p) #else /* Now try getting a message or process event */ DWORD what_events; + MSG msg; + if (mswindows_in_modal_loop) /* In a modal loop, only look for timer events, and only if we really need one. */ @@ -1507,10 +1524,23 @@ mswindows_need_event (int badly_p) /* Look for any event */ what_events = QS_ALLINPUT; - active = MsgWaitForMultipleObjects (mswindows_waitable_count, - mswindows_waitable_handles, - FALSE, badly_p ? INFINITE : 0, - what_events); + /* This fixes a long outstanding bug, where XEmacs would occasionally + * not redraw its window (or process other events) until "something + * happened" - usually the mouse moving over a frame. + * + * The problem is that MsgWaitForMultipleObjects only checks to see + * if NEW messages have been placed into the thread queue. So we + * specifically check to see if the queue is empty (using PeekMessage + * with the PM_NOREMOVE flag) before we wait. + */ + if (what_events == QS_ALLINPUT && badly_p && + PeekMessage (&msg, 0, 0, 0, PM_NOREMOVE)) + active = WAIT_OBJECT_0 + mswindows_waitable_count; + else + active = MsgWaitForMultipleObjects (mswindows_waitable_count, + mswindows_waitable_handles, + FALSE, badly_p ? INFINITE : 0, + what_events); /* This will assert if handle being waited for becomes abandoned. Not the case currently tho */ @@ -1526,10 +1556,10 @@ mswindows_need_event (int badly_p) else if (active == WAIT_OBJECT_0 + mswindows_waitable_count) { /* Got your message, thanks */ - if (mswindows_in_modal_loop) - mswindows_need_event_in_modal_loop (badly_p); - else - mswindows_drain_windows_queue (); + if (mswindows_in_modal_loop) + mswindows_need_event_in_modal_loop (badly_p); + else + mswindows_drain_windows_queue (); } else { @@ -2619,6 +2649,70 @@ mswindows_wnd_proc (HWND hwnd, UINT message_, WPARAM wParam, LPARAM lParam) mswindows_handle_paint (XFRAME (mswindows_find_frame (hwnd))); break; + case WM_ACTIVATE: + { + /* + * If we receive a WM_ACTIVATE message that indicates that our frame + * is being activated, make sure that the frame is marked visible + * if the window itself is visible. This seems to fix the problem + * where XEmacs appears to lock-up after switching desktops with + * some virtual window managers. + */ + int state = (int)(short) LOWORD(wParam); +#ifdef DEBUG_XEMACS + if (debug_mswindows_events) + stderr_out("state = %d\n", state); +#endif /* DEBUG_XEMACS */ + if (state == WA_ACTIVE || state == WA_CLICKACTIVE) + { +#ifdef DEBUG_XEMACS + if (debug_mswindows_events) + stderr_out(" activating\n"); +#endif /* DEBUG_XEMACS */ + + fobj = mswindows_find_frame (hwnd); + frame = XFRAME (fobj); + if (IsWindowVisible (hwnd)) + { +#ifdef DEBUG_XEMACS + if (debug_mswindows_events) + stderr_out(" window is visible\n"); +#endif /* DEBUG_XEMACS */ + if (!FRAME_VISIBLE_P (frame)) + { +#ifdef DEBUG_XEMACS + if (debug_mswindows_events) + stderr_out(" frame is not visible\n"); +#endif /* DEBUG_XEMACS */ + /* + * It seems that we have to enqueue the XM_MAPFRAME event + * prior to setting the frame visible so that + * suspend-or-iconify-emacs works properly. + */ + mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); + FRAME_VISIBLE_P (frame) = 1; + FRAME_ICONIFIED_P (frame) = 0; + } +#ifdef DEBUG_XEMACS + else + { + if (debug_mswindows_events) + stderr_out(" frame is visible\n"); + } +#endif /* DEBUG_XEMACS */ + } +#ifdef DEBUG_XEMACS + else + { + if (debug_mswindows_events) + stderr_out(" window is not visible\n"); + } +#endif /* DEBUG_XEMACS */ + } + return DefWindowProc (hwnd, message_, wParam, lParam); + } + break; + case WM_WINDOWPOSCHANGED: /* This is sent before WM_SIZE; in fact, the processing of this by DefWindowProc() sends WM_SIZE. But WM_SIZE is not sent when @@ -2634,7 +2728,11 @@ mswindows_wnd_proc (HWND hwnd, UINT message_, WPARAM wParam, LPARAM lParam) } else if (IsWindowVisible (hwnd)) { - FRAME_VISIBLE_P (frame) = 1; + /* APA: It's too early here to set the frame visible. + * Let's do this later, in WM_SIZE processing, after the + * magic XM_MAPFRAME event has been sent (just like 21.1 + * did). */ + /* FRAME_VISIBLE_P (frame) = 1; */ FRAME_ICONIFIED_P (frame) = 0; } else @@ -2646,6 +2744,30 @@ mswindows_wnd_proc (HWND hwnd, UINT message_, WPARAM wParam, LPARAM lParam) return DefWindowProc (hwnd, message_, wParam, lParam); } + case WM_SHOWWINDOW: + /* + The WM_SHOWWINDOW message is sent to a window when the window + is about to be hidden or shown. + APA: This message is also sent when switching to a virtual + desktop under the virtuawin virtual window manager. + + */ + { + fobj = mswindows_find_frame (hwnd); + frame = XFRAME (fobj); + if (wParam == TRUE) + { + mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); + FRAME_VISIBLE_P (frame) = 1; + } + else + { + mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME); + FRAME_VISIBLE_P (frame) = 0; + } + } + break; + case WM_SIZE: /* We only care about this message if our size has really changed */ if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED || wParam==SIZE_MINIMIZED) @@ -2698,7 +2820,13 @@ mswindows_wnd_proc (HWND hwnd, UINT message_, WPARAM wParam, LPARAM lParam) else { if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) - mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); + { + mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); + /* APA: Now that the magic XM_MAPFRAME event has + * been sent we can mark the frame as visible (just + * like 21.1 did). */ + FRAME_VISIBLE_P (frame) = 1; + } if (!msframe->sizing || mswindows_dynamic_frame_resize) redisplay (); @@ -2821,20 +2949,14 @@ mswindows_wnd_proc (HWND hwnd, UINT message_, WPARAM wParam, LPARAM lParam) { int keys = LOWORD (wParam); /* Modifier key flags */ int delta = (short) HIWORD (wParam); /* Wheel rotation amount */ - struct gcpro gcpro1, gcpro2; if (mswindows_handle_mousewheel_event (mswindows_find_frame (hwnd), keys, delta, MAKEPOINTS (lParam))) - { - GCPRO2 (emacs_event, fobj); - if (UNBOUNDP(mswindows_pump_outstanding_events ())) /* Can GC */ - SendMessage (hwnd, WM_CANCELMODE, 0, 0); - UNGCPRO; - } + /* We are not in a modal loop so no pumping is necessary. */ + break; else goto defproc; - break; } #endif @@ -3984,6 +4106,25 @@ debug_output_mswin_message (HWND hwnd, UINT message_, WPARAM wParam, stderr_out (" wparam=%d lparam=%d hwnd=%x frame: ", wParam, (int) lParam, (unsigned int) hwnd); debug_print (frame); + if (message_ == WM_WINDOWPOSCHANGED || + message_ == WM_WINDOWPOSCHANGING) + { + WINDOWPOS *wp = (WINDOWPOS *) lParam; + stderr_out(" WINDOWPOS: x=%d, y=%d, h=%d, w=%d\n", + wp->x, wp->y, wp->cx, wp->cy); + } + else if (message_ == WM_MOVE) + { + int x = (int)(short) LOWORD(lParam); /* horizontal position */ + int y = (int)(short) HIWORD(lParam); /* vertical position */ + stderr_out(" MOVE: x=%d, y=%d\n", x, y); + } + else if (message_ == WM_SIZE) + { + int w = (int)(short) LOWORD(lParam); /* width */ + int h = (int)(short) HIWORD(lParam); /* height */ + stderr_out(" SIZE: w=%d, h=%d\n", w, h); + } } else stderr_out ("\n"); diff --git a/src/event-stream.c b/src/event-stream.c index 3585a3b..35b0877 100644 --- a/src/event-stream.c +++ b/src/event-stream.c @@ -701,7 +701,8 @@ reset_key_echo (struct command_builder *command_builder, /* This function can GC */ struct frame *f = selected_frame (); - command_builder->echo_buf_index = -1; + if (command_builder) + command_builder->echo_buf_index = -1; if (remove_echo_area_echo) clear_echo_area (f, Qcommand, 0); @@ -2203,8 +2204,6 @@ The returned event will be one of the following types: switch (XEVENT_TYPE (event)) { - default: - goto RETURN; case button_release_event: case misc_user_event: /* don't echo menu accelerator keys */ @@ -2214,6 +2213,8 @@ The returned event will be one of the following types: goto STORE_AND_EXECUTE_KEY; case key_press_event: /* any key input can trigger autosave */ break; + default: + goto RETURN; } maybe_do_auto_save (); @@ -3504,16 +3505,24 @@ Set the maximum number of events to be stored internally. void reset_this_command_keys (Lisp_Object console, int clear_echo_area_p) { - struct command_builder *command_builder = - XCOMMAND_BUILDER (XCONSOLE (console)->command_builder); - - reset_key_echo (command_builder, clear_echo_area_p); + if (!NILP (console)) + { + /* console is nil if we just deleted the console as a result of C-x 5 + 0. Unfortunately things are currently in a messy situation where + some stuff is console-local and other stuff isn't, so we need to + do everything that's not console-local. */ + struct command_builder *command_builder = + XCOMMAND_BUILDER (XCONSOLE (console)->command_builder); + + reset_key_echo (command_builder, clear_echo_area_p); + reset_current_events (command_builder); + } + else + reset_key_echo (0, clear_echo_area_p); deallocate_event_chain (Vthis_command_keys); Vthis_command_keys = Qnil; Vthis_command_keys_tail = Qnil; - - reset_current_events (command_builder); } static void @@ -3917,7 +3926,8 @@ execute_command_event (struct command_builder *command_builder, post_command_hook (); - if (!NILP (con->prefix_arg)) + /* Console might have been deleted by command */ + if (CONSOLE_LIVE_P (con) && !NILP (con->prefix_arg)) { /* Commands that set the prefix arg don't update last-command, don't reset the echoing state, and don't go into keyboard macros unless @@ -3946,7 +3956,8 @@ execute_command_event (struct command_builder *command_builder, so we don't either */ if (!is_scrollbar_event (event)) - reset_this_command_keys (make_console (con), 0); + reset_this_command_keys (CONSOLE_LIVE_P (con) ? make_console (con) + : Qnil, 0); } } diff --git a/src/extents.c b/src/extents.c index 6791f85..5b00161 100644 --- a/src/extents.c +++ b/src/extents.c @@ -2753,9 +2753,10 @@ invisible_ellipsis_p (REGISTER Lisp_Object propval, Lisp_Object list) face_index extent_fragment_update (struct window *w, struct extent_fragment *ef, - Bytind pos) + Bytind pos, Lisp_Object last_glyph) { int i; + int seen_glyph = NILP (last_glyph) ? 1 : 0; Extent_List *sel = buffer_or_string_stack_of_extents_force (ef->object)->extents; EXTENT lhe = 0; @@ -2796,11 +2797,15 @@ extent_fragment_update (struct window *w, struct extent_fragment *ef, if (extent_start (e) == mempos && !NILP (extent_begin_glyph (e))) { Lisp_Object glyph = extent_begin_glyph (e); - struct glyph_block gb; - - gb.glyph = glyph; - XSETEXTENT (gb.extent, e); - Dynarr_add (ef->begin_glyphs, gb); + if (seen_glyph) { + struct glyph_block gb; + + gb.glyph = glyph; + XSETEXTENT (gb.extent, e); + Dynarr_add (ef->begin_glyphs, gb); + } + else if (EQ (glyph, last_glyph)) + seen_glyph = 1; } } @@ -2811,11 +2816,15 @@ extent_fragment_update (struct window *w, struct extent_fragment *ef, if (extent_end (e) == mempos && !NILP (extent_end_glyph (e))) { Lisp_Object glyph = extent_end_glyph (e); - struct glyph_block gb; + if (seen_glyph) { + struct glyph_block gb; - gb.glyph = glyph; - XSETEXTENT (gb.extent, e); - Dynarr_add (ef->end_glyphs, gb); + gb.glyph = glyph; + XSETEXTENT (gb.extent, e); + Dynarr_add (ef->end_glyphs, gb); + } + else if (EQ (glyph, last_glyph)) + seen_glyph = 1; } } @@ -2950,9 +2959,9 @@ print_extent_1 (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) if (extent_detached_p (ext)) strcpy (bp, "detached"); else - sprintf (bp, "%ld, %ld", - (long) XINT (Fextent_start_position (obj)), - (long) XINT (Fextent_end_position (obj))); + sprintf (bp, "%d, %d", + XINT (Fextent_start_position (obj)), + XINT (Fextent_end_position (obj))); bp += strlen (bp); *bp++ = (extent_end_open_p (anc) ? ')': ']'); if (!NILP (extent_end_glyph (anc))) *bp++ = '*'; diff --git a/src/extents.h b/src/extents.h index 4b40311..e8d6707 100644 --- a/src/extents.h +++ b/src/extents.h @@ -328,7 +328,7 @@ struct extent_fragment *extent_fragment_new (Lisp_Object buffer_or_string, face_index extent_fragment_update (struct window *w, struct extent_fragment *ef, /* Note this is in Bytinds */ - Bytind pos); + Bytind pos, Lisp_Object last_glyph); void extent_fragment_delete (struct extent_fragment *ef); diff --git a/src/fileio.c b/src/fileio.c index d9a6dec..ff19f3e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1335,7 +1335,23 @@ No component of the resulting pathname will be a symbolic link, as TO_EXTERNAL_FORMAT (LISP_STRING, expanded_name, ALLOCA, (path, elen), Qfile_name); + +#if defined(WIN32_FILENAMES) && defined(CYGWIN) + /* When using win32 filenames in cygwin we want file-truename to + detect that c:/windows == /windows for example. */ + if ((IS_DIRECTORY_SEP (path[0]) + && (elen == 1 || !IS_DIRECTORY_SEP (path[1]))) + || (isalpha (path[0]) + && (elen == 1 || !IS_DEVICE_SEP (path[1])))) { + int ltwff2 = + cygwin_posix_to_win32_path_list_buf_size (path); + p = (Bufbyte *) alloca (ltwff2); + cygwin_posix_to_win32_path_list (path, p); + path = p; + } +#endif p = path; + if (elen > MAXPATHLEN) goto toolong; diff --git a/src/filelock.c b/src/filelock.c index 531000e..3730af2 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -225,7 +225,7 @@ current_lock_owner (lock_info_type *owner, char *lfname) if (STRINGP (Fsystem_name ()) && strcmp (owner->host, (char *) XSTRING_DATA (Fsystem_name ())) == 0) { - if (owner->pid == getpid ()) + if (owner->pid == (unsigned long) getpid ()) ret = 2; /* We own it. */ else if (owner->pid > 0 && (kill (owner->pid, 0) >= 0 || errno == EPERM)) diff --git a/src/frame-msw.c b/src/frame-msw.c index d66f6b7..37c596e 100644 --- a/src/frame-msw.c +++ b/src/frame-msw.c @@ -827,36 +827,38 @@ msprinter_init_frame_3 (struct frame *f) { DOCINFO di; struct device *device = XDEVICE (FRAME_DEVICE (f)); - HDC hdc; int frame_left, frame_top, frame_width, frame_height; /* DC might be recreated in msprinter_apply_devmode, so do not initialize until now */ - hdc = DEVICE_MSPRINTER_HDC (device); - - /* Compute geometry properties */ - frame_left = (MulDiv (GetDeviceCaps (hdc, LOGPIXELSX), - FRAME_MSPRINTER_LEFT_MARGIN(f), 1440) - - GetDeviceCaps (hdc, PHYSICALOFFSETX)); + HDC hdc = DEVICE_MSPRINTER_HDC (device); + int logpixelsx = GetDeviceCaps (hdc, LOGPIXELSX); + int logpixelsy = GetDeviceCaps (hdc, LOGPIXELSY); + int physicaloffsetx = GetDeviceCaps (hdc, PHYSICALOFFSETX); + int physicaloffsety = GetDeviceCaps (hdc, PHYSICALOFFSETY); + int physicalheight = GetDeviceCaps (hdc, PHYSICALHEIGHT); + int physicalwidth = GetDeviceCaps (hdc, PHYSICALWIDTH); + + /* Compute geometry properties. + Conversion is from TWIPS -> inches -> pixels. */ + frame_left = MulDiv (logpixelsx, FRAME_MSPRINTER_LEFT_MARGIN(f), 1440) + - physicaloffsetx; if (FRAME_MSPRINTER_CHARWIDTH(f) > 0) { char_to_real_pixel_size (f, FRAME_MSPRINTER_CHARWIDTH(f), 0, &frame_width, NULL); FRAME_MSPRINTER_RIGHT_MARGIN(f) = - MulDiv (GetDeviceCaps (hdc, PHYSICALWIDTH) - - (frame_left + frame_width), 1440, - GetDeviceCaps (hdc, LOGPIXELSX)); + MulDiv (physicalwidth - (frame_left + frame_width), 1440, + logpixelsx); } else - frame_width = (GetDeviceCaps (hdc, PHYSICALWIDTH) - - frame_left - - MulDiv (GetDeviceCaps (hdc, LOGPIXELSX), - FRAME_MSPRINTER_RIGHT_MARGIN(f), 1440)); + frame_width = physicalwidth - frame_left + - MulDiv (logpixelsx, FRAME_MSPRINTER_RIGHT_MARGIN(f), 1440) + - physicaloffsetx; - frame_top = (MulDiv (GetDeviceCaps (hdc, LOGPIXELSY), - FRAME_MSPRINTER_TOP_MARGIN(f), 1440) - - GetDeviceCaps (hdc, PHYSICALOFFSETY)); + frame_top = MulDiv (logpixelsy, FRAME_MSPRINTER_TOP_MARGIN(f), 1440) + - physicaloffsety; if (FRAME_MSPRINTER_CHARHEIGHT(f) > 0) { @@ -864,15 +866,13 @@ msprinter_init_frame_3 (struct frame *f) NULL, &frame_height); FRAME_MSPRINTER_BOTTOM_MARGIN(f) = - MulDiv (GetDeviceCaps (hdc, PHYSICALHEIGHT) - - (frame_top + frame_height), 1440, - GetDeviceCaps (hdc, LOGPIXELSY)); + MulDiv (physicalheight - (frame_top + frame_height), 1440, + logpixelsy); } else - frame_height = (GetDeviceCaps (hdc, PHYSICALHEIGHT) - - frame_top - - MulDiv (GetDeviceCaps (hdc, LOGPIXELSY), - FRAME_MSPRINTER_BOTTOM_MARGIN(f), 1440)); + frame_height = physicalheight - frame_top + - MulDiv (logpixelsy, FRAME_MSPRINTER_BOTTOM_MARGIN(f), 1440) + - physicaloffsety; /* Geometry sanity checks */ if (!frame_pixsize_valid_p (f, frame_width, frame_height)) diff --git a/src/frame.h b/src/frame.h index 377965f..0a341c5 100644 --- a/src/frame.h +++ b/src/frame.h @@ -110,13 +110,13 @@ struct frame /* Size of toolbars as seen by redisplay. This is used to determine whether to re-layout windows by a call to change_frame_size early in redisplay_frame. */ - unsigned int current_toolbar_size[4]; + int current_toolbar_size[4]; #endif /* Size of gutters as seen by redisplay. This is used to determine whether to re-layout windows by a call to change_frame_size early in redisplay_frame. */ - unsigned int current_gutter_bounds[4]; + int current_gutter_bounds[4]; /* Dynamic arrays of display lines for gutters */ display_line_dynarr *current_display_lines[4]; @@ -188,6 +188,8 @@ Value : Emacs meaning :f-v-p : X meaning unsigned int extents_changed :1; unsigned int faces_changed :1; unsigned int frame_changed :1; + unsigned int frame_layout_changed :1; /* The layout of frame + elements has changed. */ unsigned int subwindows_changed :1; unsigned int subwindows_state_changed :1; unsigned int glyphs_changed :1; @@ -457,6 +459,19 @@ extern int frame_changed; frame_changed = 1; \ } while (0) +#define MARK_FRAME_LAYOUT_CHANGED(f) do { \ + struct frame *mfc_f = (f); \ + mfc_f->frame_layout_changed = 1; \ + mfc_f->modiff++; \ + if (!NILP (mfc_f->device)) \ + { \ + struct device *mfc_d = XDEVICE (mfc_f->device); \ + MARK_DEVICE_FRAME_LAYOUT_CHANGED (mfc_d); \ + } \ + else \ + frame_layout_changed = 1; \ +} while (0) + #define MARK_FRAME_WINDOWS_CHANGED(f) do { \ struct frame *mfwc_f = (f); \ mfwc_f->windows_changed = 1; \ diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 07a762e..883ab53 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -2276,6 +2276,16 @@ mswindows_map_subwindow (Lisp_Image_Instance *p, int x, int y, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOACTIVATE); + + /* Doing this once does not seem to be enough, for instance when + mapping the search dialog this gets called four times. If we + only set on the first time through then the subwindow never + gets focus as intended. However, doing this everytime doesn't + seem so bad, after all we only need to redo this after the + focus changes - and if that happens resetting the initial + focus doesn't seem so bad. */ + if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (p)) + SetFocus (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p)); #endif } } @@ -2588,11 +2598,6 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat SendMessage (wnd, WM_SETFONT, (WPARAM) mswindows_widget_hfont (ii, domain), MAKELPARAM (TRUE, 0)); -#if 0 - /* #### doesn't work. need to investigate more closely. */ - if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (ii)) - SetFocus (wnd); -#endif } /* Instantiate a native layout widget. */ diff --git a/src/glyphs-x.c b/src/glyphs-x.c index ae7d3be..5a71012 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -231,7 +231,8 @@ convert_EImage_to_XImage (Lisp_Object device, int width, int height, if (vis->class == PseudoColor) { unsigned long pixarray[256]; - int pixcount, n; + int pixcount; + unsigned int n; /* use our quantize table to allocate the colors */ pixcount = 32; *pixtbl = xnew_array (unsigned long, pixcount); @@ -432,7 +433,7 @@ x_finalize_image_instance (Lisp_Image_Instance *p) } else { - int i; + unsigned int i; if (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p)) disable_glyph_animated_timeout (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p)); diff --git a/src/imgproc.c b/src/imgproc.c index cbe5d5e..c8bec40 100644 --- a/src/imgproc.c +++ b/src/imgproc.c @@ -50,7 +50,7 @@ get_histogram(quant_table *qt, unsigned char *pic, { register unsigned char *inptr; register int red, green, blue; - register unsigned int j, i; + register int j, i; box->rmin = box->gmin = box->bmin = 999; box->rmax = box->gmax = box->bmax = -1; diff --git a/src/keymap.c b/src/keymap.c index cc18a84..2c91886 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1015,10 +1015,8 @@ get_keymap (Lisp_Object object, int errorp, int autoload) && EQ (XCAR (tem), Qautoload) && EQ (Fcar (Fcdr (Fcdr (Fcdr (Fcdr (tem))))), Qkeymap)) { - struct gcpro gcpro1, gcpro2; - GCPRO2 (tem, object); + /* do_autoload GCPROs both arguments */ do_autoload (tem, object); - UNGCPRO; } else if (errorp) object = wrong_type_argument (Qkeymapp, object); diff --git a/src/menubar-msw.c b/src/menubar-msw.c index 5e0625a..eca204b 100644 --- a/src/menubar-msw.c +++ b/src/menubar-msw.c @@ -821,8 +821,7 @@ mswindows_handle_wm_command (struct frame *f, WORD id) breaks customize because the misc_event gets eval'ed in some circumstances. Don't change it back unless you can fix the customize problem also.*/ - enqueue_misc_user_event (frame, fn, arg); - mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); + mswindows_enqueue_misc_user_event (frame, fn, arg); UNGCPRO; /* data */ return Qt; @@ -916,6 +915,8 @@ mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event) eev = NULL; } + popup_up_p++; + /* Default is to put the menu at the point (10, 10) in frame */ if (eev) { @@ -931,6 +932,8 @@ mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event) CHECK_CONS (menu_desc); CHECK_STRING (XCAR (menu_desc)); + menu_cleanup (f); + current_menudesc = menu_desc; current_hash_table = make_lisp_hash_table (10, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL); @@ -949,7 +952,15 @@ mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event) DestroyMenu (menu); - /* Signal a signal if caught by Track...() modal loop */ + /* A WM_COMMAND is not issued until TrackPopupMenu returns. This + makes setting popup_up_p fairly pointless since we cannot keep + the menu up and dispatch events. Furthermore, we seem to have + little control over what happens to the menu when we click. */ + popup_up_p--; + + /* Signal a signal if caught by Track...() modal loop. */ + /* I think this is pointless, the code hasn't actually put us in a + modal loop at this time -- andyp. */ mswindows_unmodalize_signal_maybe (); /* This is probably the only real reason for failure */ diff --git a/src/nas.c b/src/nas.c index bc473aa..7fe1295 100644 --- a/src/nas.c +++ b/src/nas.c @@ -884,7 +884,7 @@ WaveOpenDataForReading (const char *data, fileSize = PAD2(ck.ckSize) - sizeof(RIFF_FOURCC); - while (fileSize >= sizeof(RiffChunk)) + while (fileSize >= (AuInt32) sizeof(RiffChunk)) { if (!readChunk(&ck)) Err(); diff --git a/src/nt.c b/src/nt.c index 2615d67..af74f84 100644 --- a/src/nt.c +++ b/src/nt.c @@ -506,7 +506,7 @@ request_sigio (void) } #endif /* 0 */ -#define REG_ROOT "SOFTWARE\\GNU\\XEmacs" +#define REG_ROOT "SOFTWARE\\XEmacs\\XEmacs" LPBYTE nt_get_resource (char *key, LPDWORD lpdwtype) @@ -1474,6 +1474,7 @@ mswindows_stat (const char * path, struct stat * buf) int permission; int len; int rootdir = FALSE; + int errm; if (path == NULL || buf == NULL) { @@ -1496,13 +1497,16 @@ mswindows_stat (const char * path, struct stat * buf) rootdir = (path >= name + len - 1 && (IS_DIRECTORY_SEP (*path) || *path == 0)); name = strcpy ((char *)alloca (len + 2), name); - + errm = SetErrorMode (SEM_FAILCRITICALERRORS + | SEM_NOOPENFILEERRORBOX); if (rootdir) { if (!IS_DIRECTORY_SEP (name[len-1])) strcat (name, "\\"); + if (GetDriveType (name) < 2) { + SetErrorMode (errm); errno = ENOENT; return -1; } @@ -1532,14 +1536,15 @@ mswindows_stat (const char * path, struct stat * buf) } else { - fh = FindFirstFile (name, &wfd); - if (fh == INVALID_HANDLE_VALUE) - { - errno = ENOENT; - return -1; + fh = FindFirstFile (name, &wfd); + if (fh == INVALID_HANDLE_VALUE) + { + SetErrorMode (errm); + errno = ENOENT; + return -1; + } + FindClose (fh); } - FindClose (fh); - } } if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) @@ -1585,6 +1590,7 @@ mswindows_stat (const char * path, struct stat * buf) } else { + SetErrorMode (errm); errno = EACCES; return -1; } @@ -1597,6 +1603,8 @@ mswindows_stat (const char * path, struct stat * buf) fake_inode = 0; } + SetErrorMode (errm); + #if 0 /* Not sure if there is any point in this. */ if (!NILP (Vwin32_generate_fake_inodes)) diff --git a/src/process-nt.c b/src/process-nt.c index 2cf4b68..0ce9c25 100644 --- a/src/process-nt.c +++ b/src/process-nt.c @@ -642,6 +642,9 @@ static void nt_finalize_process_data (Lisp_Process *p, int for_disksave) { assert (!for_disksave); + /* If it's still in the list of processes we are waiting on delete + it. */ + mswindows_unwait_process (p); if (NT_DATA (p)->h_process) CloseHandle (NT_DATA (p)->h_process); } diff --git a/src/process-unix.c b/src/process-unix.c index c0d1989..00bb163 100644 --- a/src/process-unix.c +++ b/src/process-unix.c @@ -1331,12 +1331,15 @@ unix_send_process (Lisp_Object proc, struct lstream* lstream) /* #### There is controversy over whether this might cause fd leakage */ /* my tests say no. -slb */ XLSTREAM (p->pipe_outstream)->flags &= ~LSTREAM_FL_IS_OPEN; +#ifdef FILE_CODING + XLSTREAM (p->coding_outstream)->flags &= ~LSTREAM_FL_IS_OPEN; +#endif p->status_symbol = Qexit; p->exit_code = 256; /* #### SIGPIPE ??? */ p->core_dumped = 0; p->tick++; process_tick++; - deactivate_process (*((Lisp_Object *) (&vol_proc))); + deactivate_process (vol_proc); invalid_operation ("SIGPIPE raised on process; closed it", p->name); } diff --git a/src/process.c b/src/process.c index f555019..bd1270a 100644 --- a/src/process.c +++ b/src/process.c @@ -573,6 +573,7 @@ INCODE and OUTCODE specify the coding-system objects used in input/output /* !!#### This function has not been Mule-ized */ Lisp_Object buffer, name, program, process, current_dir; Lisp_Object tem; + int i; int speccount = specpdl_depth (); struct gcpro gcpro1, gcpro2, gcpro3; @@ -589,6 +590,8 @@ INCODE and OUTCODE specify the coding-system objects used in input/output CHECK_STRING (name); CHECK_STRING (program); + for (i = 3; i < nargs; ++i) + CHECK_STRING (args[i]); /* Make sure that the child will be able to chdir to the current buffer's current directory, or its unhandled equivalent. We diff --git a/src/ralloc.c b/src/ralloc.c index 2938971..623d6a4 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -103,7 +103,7 @@ static POINTER virtual_break_value; static POINTER break_value; /* This is the size of a page. We round memory requests to this boundary. */ -static int page_size; +static size_t page_size; /* Whenever we get memory from the system, get this many extra bytes. This must be a multiple of page_size. */ @@ -889,7 +889,7 @@ r_alloc_sbrk (ptrdiff_t size) } else /* size < 0 */ { - size_t excess = (char *)first_heap->bloc_start + EMACS_INT excess = (char *)first_heap->bloc_start - ((char *)virtual_break_value + size); address = virtual_break_value; @@ -2022,6 +2022,10 @@ init_ralloc (void) if (r_alloc_initialized > 1) return; /* used to return 1 */ +#ifdef PDUMP + /* Under pdump, we need to activate ralloc on the first go. */ + ++r_alloc_initialized; +#endif if (++r_alloc_initialized == 1) return; /* used to return 1 */ diff --git a/src/realpath.c b/src/realpath.c index c962aac..da05446 100644 --- a/src/realpath.c +++ b/src/realpath.c @@ -40,6 +40,10 @@ Boston, MA 02111-1307, USA. */ #include /* for S_IFLNK */ +#if defined(WIN32_NATIVE) || defined(CYGWIN) +#define WIN32_FILENAMES +#endif + /* First char after start of absolute filename. */ #define ABS_START(name) (name + ABS_LENGTH (name)) @@ -51,8 +55,13 @@ static int win32_abs_start (const char * name); # define system_readlink win32_readlink #else # ifdef CYGWIN -# define ABS_LENGTH(name) (IS_DIRECTORY_SEP (*name) ? \ - (IS_DIRECTORY_SEP (name[1]) ? 2 : 1) : 0) +# ifdef WIN32_FILENAMES +# define ABS_LENGTH(name) (win32_abs_start (name)) +static int win32_abs_start (const char * name); +# else +# define ABS_LENGTH(name) (IS_DIRECTORY_SEP (*name) ? \ + (IS_DIRECTORY_SEP (name[1]) ? 2 : 1) : 0) +# endif # define system_readlink cygwin_readlink # else # define ABS_LENGTH(name) (IS_DIRECTORY_SEP (*name) ? 1 : 0) @@ -149,7 +158,7 @@ cygwin_readlink (const char * name, char * buf, int size) } #endif /* CYGWIN */ -#ifdef WIN32_NATIVE +#ifdef WIN32_FILENAMES #ifndef ELOOP #define ELOOP 10062 /* = WSAELOOP in winsock.h */ #endif @@ -203,17 +212,30 @@ xrealpath (const char *path, char resolved_path []) path = copy_path; max_path = copy_path + PATH_MAX - 2; -#ifdef WIN32_NATIVE + if (0) + ; +#ifdef WIN32_FILENAMES /* Check for c:/... or //server/... */ - if (abslen == 2 || abslen == 3) + else if (abslen == 3 || abslen == 2) { - strncpy (new_path, path, abslen); /* Make sure drive letter is lowercased. */ - if (abslen == 3) - *new_path = tolower (*new_path); - new_path += abslen; - path += abslen; + if (abslen == 3) { + *new_path = tolower (*path); + new_path++; + path++; + abslen--; + } + /* Coerce directory chars. */ + while (abslen-- > 0) { + if (IS_DIRECTORY_SEP (*path)) + *new_path++ = DIRECTORY_SEP; + else + *new_path++ = *path; + path++; + } } +#endif +#ifdef WIN32_NATIVE /* No drive letter, but a beginning slash? Prepend drive letter. */ else if (abslen == 1) { @@ -222,7 +244,7 @@ xrealpath (const char *path, char resolved_path []) path++; } /* Just a path name, prepend the current directory */ - else + else if (1) { getcwd (new_path, PATH_MAX - 1); new_path += strlen (new_path); @@ -231,7 +253,7 @@ xrealpath (const char *path, char resolved_path []) } #else /* If it's a relative pathname use getcwd for starters. */ - if (abslen == 0) + else if (abslen == 0) { getcwd (new_path, PATH_MAX - 1); new_path += strlen (new_path); diff --git a/src/scrollbar-msw.c b/src/scrollbar-msw.c index b6ac215..d3c7c9f 100644 --- a/src/scrollbar-msw.c +++ b/src/scrollbar-msw.c @@ -333,43 +333,45 @@ mswindows_handle_mousewheel_event (Lisp_Object frame, int keys, int delta, { int hasVertBar, hasHorzBar; /* Indicates presence of scroll bars */ unsigned wheelScrollLines = 0; /* Number of lines per wheel notch */ - Lisp_Object win; + Lisp_Object win, corpore, sano; struct window_mirror *mirror; + int mene, _mene, tekel, upharsin; + Bufpos mens, sana; + Charcount in; + struct window *needle_in_haystack = 0; POINT donde_esta; donde_esta.x = where.x; donde_esta.y = where.y; - ScreenToClient (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), &donde_esta); - /* Find the window to scroll */ - { - int mene, _mene, tekel, upharsin; - Bufpos mens, sana; - Charcount in; - Lisp_Object corpore, sano; - struct window *needle_in_haystack; - - // stderr_out ("donde_esta: %d %d\n", donde_esta.x, donde_esta.y); - pixel_to_glyph_translation (XFRAME (frame), donde_esta.x, donde_esta.y, - &mene, &_mene, &tekel, &upharsin, - &needle_in_haystack, - &mens, &sana, &in, &corpore, &sano); - - if (needle_in_haystack) - { - XSETWINDOW (win, needle_in_haystack); - // stderr_out ("found needle\n"); - // debug_print (win); - } - else - { - win = FRAME_SELECTED_WINDOW (XFRAME (frame)); - needle_in_haystack = XWINDOW (win); - } - mirror = find_window_mirror (needle_in_haystack); - } + /* The mouse event could actually occur outside of the emacs + frame. */ + if (ScreenToClient (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), + &donde_esta) != 0) + { + /* stderr_out ("donde_esta: %d %d\n", donde_esta.x, donde_esta.y); */ + pixel_to_glyph_translation (XFRAME (frame), donde_esta.x, donde_esta.y, + &mene, &_mene, &tekel, &upharsin, + &needle_in_haystack, + &mens, &sana, &in, &corpore, &sano); + + if (needle_in_haystack) + { + XSETWINDOW (win, needle_in_haystack); + /* stderr_out ("found needle\n"); + debug_print (win); */ + } + } + + if (!needle_in_haystack) + { + win = FRAME_SELECTED_WINDOW (XFRAME (frame)); + needle_in_haystack = XWINDOW (win); + } + + mirror = find_window_mirror (needle_in_haystack); /* Check that there is something to scroll */ hasVertBar = can_scroll (mirror->scrollbar_vertical_instance); diff --git a/src/sysdep.c b/src/sysdep.c index b81efbb..c307469 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3158,9 +3158,11 @@ sys_rename (const char *old, const char *new) /* Windows rename fails if NEW exists */ if (rename (old, new) == 0) return 0; - if (errno != EEXIST) + /* In some cases errno is EACCES if NEW exists */ + if (errno != EEXIST && errno != EACCES) + return -1; + if (unlink (new) != 0) return -1; - unlink (new); #endif /* WIN32_NATIVE */ return rename (old, new); } diff --git a/src/sysdll.c b/src/sysdll.c index e95e68c..537f3d6 100644 --- a/src/sysdll.c +++ b/src/sysdll.c @@ -38,10 +38,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # define RTLD_LAZY 1 #endif /* RTLD_LAZY isn't defined under FreeBSD - ick */ -#ifndef RTLD_GLOBAL -# define RTLD_GLOBAL 0 -#endif - #ifndef RTLD_NOW # define RTLD_NOW 2 #endif @@ -55,7 +51,7 @@ dll_init (const char *arg) dll_handle dll_open (const char *fname) { - return (dll_handle) dlopen (fname, RTLD_NOW | RTLD_GLOBAL); + return (dll_handle) dlopen (fname, RTLD_NOW); } int diff --git a/src/toolbar-msw.c b/src/toolbar-msw.c index 07baead..4234441 100644 --- a/src/toolbar-msw.c +++ b/src/toolbar-msw.c @@ -22,7 +22,7 @@ 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. */ -/* This implementation by Andy Piper , with bits +/* This implementation by Andy Piper , with bits borrowed from toolbar-x.c */ /* Synched up with: Not in FSF. */ @@ -544,22 +544,30 @@ mswindows_output_frame_toolbars (struct frame *f) if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, TOP_TOOLBAR); - else if (f->top_toolbar_was_visible) - mswindows_clear_toolbar (f, TOP_TOOLBAR, 0); - if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, BOTTOM_TOOLBAR); - else if (f->bottom_toolbar_was_visible) - mswindows_clear_toolbar (f, BOTTOM_TOOLBAR, 0); - if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, LEFT_TOOLBAR); - else if (f->left_toolbar_was_visible) - mswindows_clear_toolbar (f, LEFT_TOOLBAR, 0); - if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, RIGHT_TOOLBAR); - else if (f->right_toolbar_was_visible) +} + +static void +mswindows_clear_frame_toolbars (struct frame *f) +{ + assert (FRAME_MSWINDOWS_P (f)); + + if (f->top_toolbar_was_visible + && !FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)) + mswindows_clear_toolbar (f, TOP_TOOLBAR, 0); + if (f->bottom_toolbar_was_visible + && !FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)) + mswindows_clear_toolbar (f, BOTTOM_TOOLBAR, 0); + if (f->left_toolbar_was_visible + && !FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f)) + mswindows_clear_toolbar (f, LEFT_TOOLBAR, 0); + if (f->right_toolbar_was_visible + && !FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) mswindows_clear_toolbar (f, RIGHT_TOOLBAR, 0); } @@ -641,6 +649,7 @@ void console_type_create_toolbar_mswindows (void) { CONSOLE_HAS_METHOD (mswindows, output_frame_toolbars); + CONSOLE_HAS_METHOD (mswindows, clear_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars); diff --git a/src/toolbar.c b/src/toolbar.c index 7711b6b..dd742ff 100644 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -712,13 +712,26 @@ compute_frame_toolbars_data (struct frame *f) set_frame_toolbar (f, RIGHT_TOOLBAR); } +/* Update the toolbar geometry separately from actually displaying the + toolbar. This is necessary because both the gutter and the toolbar + are competing for redisplay cycles and, unfortunately, gutter + updates happen late in the game. Firstly they are done inside of + redisplay proper and secondly subcontrols may not get moved until + the next screen refresh. Only after subcontrols have been moved to + their final destinations can we be certain of updating the + toolbar. Under X this probably is exacerbated by the toolbar button + dirty flags which prevent updates happening when they possibly + should. */ void -update_frame_toolbars (struct frame *f) +update_frame_toolbars_geometry (struct frame *f) { struct device *d = XDEVICE (f->device); if (DEVICE_SUPPORTS_TOOLBARS_P (d) - && (f->toolbar_changed || f->frame_changed || f->clear)) + && (f->toolbar_changed + || f->frame_layout_changed + || f->frame_changed + || f->clear)) { int pos; @@ -738,18 +751,39 @@ update_frame_toolbars (struct frame *f) pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), &width, &height); change_frame_size (f, height, width, 0); + MARK_FRAME_LAYOUT_CHANGED (f); break; } - for (pos = 0; pos < 4; pos++) + for (pos = 0; pos < 4; pos++) { f->current_toolbar_size[pos] = FRAME_REAL_TOOLBAR_SIZE (f, pos); + } /* Removed the check for the minibuffer here. We handle this more correctly now by consistently using FRAME_LAST_NONMINIBUF_WINDOW instead of FRAME_SELECTED_WINDOW throughout the toolbar code. */ compute_frame_toolbars_data (f); + + /* Clear the previous toolbar locations. If we do it later + (after redisplay) we end up clearing what we have just + displayed. */ + MAYBE_DEVMETH (d, clear_frame_toolbars, (f)); + } +} + +/* Actually redisplay the toolbar buttons. */ +void +update_frame_toolbars (struct frame *f) +{ + struct device *d = XDEVICE (f->device); + if (DEVICE_SUPPORTS_TOOLBARS_P (d) + && (f->toolbar_changed + || f->frame_layout_changed + || f->frame_changed + || f->clear)) + { DEVMETH (d, output_frame_toolbars, (f)); } diff --git a/src/toolbar.h b/src/toolbar.h index 0e65264..fc830f9 100644 --- a/src/toolbar.h +++ b/src/toolbar.h @@ -100,6 +100,7 @@ DECLARE_SPECIFIER_TYPE (toolbar); extern Lisp_Object Vtoolbar_size[4]; extern Lisp_Object Vtoolbar_border_width[4]; void update_frame_toolbars (struct frame *f); +void update_frame_toolbars_geometry (struct frame *f); void init_frame_toolbars (struct frame *f); void init_device_toolbars (struct device *d); void init_global_toolbars (struct device *d); diff --git a/src/unexelf.c b/src/unexelf.c index 66d889c..9a1a7d9 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -481,10 +481,20 @@ typedef struct { #ifndef ElfW # ifdef __STDC__ -# define ElfW(type) Elf32_##type +# define ElfBitsW(bits, type) Elf##bits##_##type # else -# define ElfW(type) Elf32_/**/type +# define ElfBitsW(bits, type) Elf/**/bits/**/_/**/type # endif +# ifndef ELFSIZE +# ifdef _LP64 +# define ELFSIZE 64 +# else +# define ELFSIZE 32 +# endif +# endif + /* This macro expands `bits' before invoking ElfBitsW. */ +# define ElfExpandBitsW(bits, type) ElfBitsW (bits, type) +# define ElfW(type) ElfExpandBitsW (ELFSIZE, type) #endif #ifndef ELF_BSS_SECTION_NAME diff --git a/src/window.c b/src/window.c index 7df253c..bdf7764 100644 --- a/src/window.c +++ b/src/window.c @@ -3654,8 +3654,9 @@ make_dummy_parent (Lisp_Object window) DEFUN ("split-window", Fsplit_window, 0, 3, "", /* Split WINDOW, putting SIZE lines in the first of the pair. WINDOW defaults to the selected one and SIZE to half its size. -If optional third arg HORFLAG is non-nil, split side by side -and put SIZE columns in the first of the pair. +If optional third arg HORFLAG is non-nil, split side by side and put +SIZE columns in the first of the pair. The newly created window is +returned. */ (window, size, horflag)) { @@ -3679,7 +3680,7 @@ and put SIZE columns in the first of the pair. /* In the new scheme, we are symmetric with respect to separators so there is no need to do weird things here. */ { - psize = WINDOW_WIDTH (o) >> 1; + psize = (WINDOW_WIDTH (o) + window_divider_width (o)) >> 1; csize = window_pixel_width_to_char_width (o, psize, 0); } else diff --git a/src/xgccache.c b/src/xgccache.c index 7a21c5c..5abca29 100644 --- a/src/xgccache.c +++ b/src/xgccache.c @@ -98,7 +98,7 @@ gc_cache_hash (const void *arg) const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg; unsigned long *longs = (unsigned long *) &gcvm->gcv; unsigned long hash = gcvm->mask; - int i; + size_t i; /* This could look at the mask and only use the used slots in the hash code. That would win in that we wouldn't have to initialize every slot of the gcv when calling gc_cache_lookup. But we need diff --git a/tests/ChangeLog b/tests/ChangeLog index e19c551..6561e4e 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2002-08-23 Stephen J. Turnbull + + * XEmacs 21.4.9 "Informed Management" is released. + +2002-07-20 Mike Sperber + + * automated/test-harness.el (test-harness-read-from-buffer): Fix + incorrect call of `princ'. + 2002-05-09 Stephen J. Turnbull * XEmacs 21.4.8 "Honest Recruiter" is released. diff --git a/tests/automated/test-harness.el b/tests/automated/test-harness.el index 8f9b5bd..e93046f 100644 --- a/tests/automated/test-harness.el +++ b/tests/automated/test-harness.el @@ -99,7 +99,7 @@ The output file's name is made by appending `c' to the end of FILENAME." (setq body (cons (read buffer) body))) (end-of-file nil) (error - (princ "Unexpected error %S reading forms from buffer\n" error-info))) + (princ (format "Unexpected error %S reading forms from buffer\n" error-info)))) `(lambda () (defvar passes) (defvar assertion-failures) diff --git a/version.sh b/version.sh index 80d9c65..1a75201 100644 --- a/version.sh +++ b/version.sh @@ -2,9 +2,9 @@ emacs_is_beta= emacs_major_version=21 emacs_minor_version=4 -emacs_beta_version=8 -xemacs_codename="Honest Recruiter" -emacs_kitname="" +emacs_beta_version=9 +xemacs_codename="Informed Management" +emacs_kit_version= infodock_major_version=4 infodock_minor_version=0 infodock_build_version=8