which included commits to RCS files with non-trunk default branches.
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
=================
`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'.
** Linux
+*** XEmacs crashes on startup, in make-frame.
+
+Typically the Lisp backtrace includes
+
+ make-frame(nil #<x-device on ":0.0" 0x2558>)
+
+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
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
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.
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.
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
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
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ä <ville.skytta@xemacs.org> is
+currently serving with Peter Brown <rendhalver@users.sourceforge.net>
+assisting; Steve Youngs <youngs@xemacs.org> and Stephen Turnbull
+<stephen@xemacs.org> 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.
+2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.9 "Informed Management" is released.
+
+2002-07-17 Stephen J. Turnbull <stephen@tleeps18>
+
+ * 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 <greg-xemacs-patches@nest.cx>
+
+ * 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 <stephen@xemacs.org>
+
+ * Makefile.in.in: Add winclient targets (Andy synch).
+
2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.8 "Honest Recruiter" is released.
#ifdef HAVE_SHLIB
ellcc\
#endif
+#ifdef HAVE_MS_WINDOWS
+ winclient\
+#endif
etags ctags b2m ootags
PUBLIC_INSTALLABLE_SCRIPTS=\
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 $@
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;
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 */
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)
{
}
/* 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 */
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;
}
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))
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 */
errno = saved_errno;
pfatal_with_name (outname);
}
- if (nread < sizeof buf)
+ if (nread < (int) sizeof buf)
break;
}
}
/* 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,
/* 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,
long offset;
int c, i = 0;
char *buf;
- unsigned int bufsize;
+ int bufsize;
offset = rand() % len + header_len;
if (fseek(fp, offset, 0) == -1) {
(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/")
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
"\
;;; 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
(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."
; (call-interactively _command _record-flag)))))
\f
(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.
(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.
`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
: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."
"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.
(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]]])
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))
(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))
((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
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.
;;; 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
(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))
(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
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
(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
(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)
;; #### 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
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.
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.
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.
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))
"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.
"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"))
"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"))
"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))
(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))
(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)))))
\f
;;; Regexp fontification functions.
;; 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)
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)
(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
;; 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
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)
(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")
(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)
(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)
(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.
["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)
: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) "")]))
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)
(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.")))))))
;;; 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 <kkm@kis.ru>
;; Maintainer: XEmacs Development Team
(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 "^")
(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)
"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))
)
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))
))
))
;; 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
(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."
(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)
(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."
(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()
(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)
(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))))
"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."
(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
(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
;; 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,
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
(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'.
(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
(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)))
+2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.9 "Informed Management" is released.
+
+2002-06-07 Andy Piper <andy@xemacs.org>
+
+ * 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 <stephen@xemacs.org>
+
+ * lwlib-Xm.c: revert Darryl's patch in favor of Andy's.
+
+2002-07-17 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * lwlib-utils.c (XtApplyUntilToWidgets):
+ * xlwmenu.c (close_to_reference_time):
+ Fix warnings.
+
+2002-05-14 Darryl Okahata <darrylo@xemacs.org>
+
+ * lwlib-Xm.c: prevent non-label widgets from being treated as
+ labels and having their "labels" updated.
+
2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.8 "Honest Recruiter" is released.
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) */
\f/* update of list */
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);
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)
/* 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)
{
#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 */
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);
{
return
reference_time &&
- (ev->xbutton.time - reference_time < XtGetMultiClickTime (XtDisplay (w)));
+ (ev->xbutton.time - reference_time
+ < (Time) XtGetMultiClickTime (XtDisplay (w)));
}
\f/* Size code */
+2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.9 "Informed Management" is released.
+
+2002-08-20 Simon Josefsson <simon@xemacs.org>
+
+ * lispref/building.texi (Pure Storage): Deprecate purecopy.
+
+2002-08-16 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * internals/internals.texi (Regression Testing XEmacs): Fix typo.
+
+2002-08-15 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * 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 <stephen@xemacs.org>
+
+ * xemacs/packages.texi (Installing Packages): Revert EFS patch.
+
+2002-07-13 Adrian Aichner <adrian@xemacs.org>
+
+ * xemacs/packages.texi (Installing Packages): Fix reference to
+ EFS.
+
+2002-08-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * 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ä <ville.skytta@xemacs.org>
+
+ * 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 <adrian@xemacs.org>
+
+ * new-users-guide/custom1.texi (Customizing key Bindings): Fix
+ improper use of indef. art. "a".
+
+2002-07-06 Adrian Aichner <adrian@xemacs.org>
+
+ * lispref/commands.texi (Peeking and Discarding): Ditto.
+ * lispref/customize.texi (Type Keywords): Ditto.
+ * lispref/dragndrop.texi (Drop Interface): Ditto.
+
+2002-07-06 Adrian Aichner <adrian@xemacs.org>
+
+ * termcap.texi (Clearing): Ditto.
+ * widget.texi (User Interface): Ditto.
+ * widget.texi (Basic Types): Ditto.
+ * widget.texi (group): Ditto.
+
+2002-07-05 Adrian Aichner <adrian@xemacs.org>
+
+ * xemacs/menus.texi (Edit Menu): Typo fixes for incorrect use of
+ indef. art. "an".
+
+2002-07-05 Adrian Aichner <adrian@xemacs.org>
+
+ * 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 <adrian@xemacs.org>
+
+ * 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 <stephen@xemacs.org>
+
+ * xemacs-faq.texi (Top, Customization, Q3.10.5, Q3.10.6):
+ New "killing is slow" FAQ and link updates..
+
+2002-06-17 Jerry James <james@xemacs.org>
+
+ * emodules.texi (Loading other Modules): Describe why we do not
+ use RTLD_GLOBAL.
+
+2002-06-11 Adrian Aichner <adrian@xemacs.org>
+
+ * xemacs-faq.texi (Q1.3.7): Update broken link to russian.el
+ (found by linklint) with Google's help.
+
+2002-05-25 Adrian Aichner <adrian@xemacs.org>
+
+ * xemacs/custom.texi (Syntax Entry): Deprecate ` ' in favor of `-'.
+
+2002-06-11 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * xemacs/mule.texi (Mule Intro): Better title, explanation.
+
+2002-05-23 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * lispref/packaging.texi (package-info.in Fields): Typo fix.
+
+2002-05-20 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * xemacs/files.texi (Reverting): Mention use of prefix argument
+ and mode recalculation.
+
+2002-05-11 Adrian Aichner <adrian@xemacs.org>
+
+ * 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 <stephen@xemacs.org>
* XEmacs 21.4.8 "Honest Recruiter" is released.
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}
* 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::
* 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::
* 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
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
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 <filename> 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
* 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
+@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
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
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
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.
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
@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
@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.
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
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
@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:
(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
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
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
\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.
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
@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
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.
@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.
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
@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
@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:
@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 <rossini@@biostat.washington.edu>
@author Ben Wing <ben@@xemacs.org>
* 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!
* 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
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:
* 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!
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
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!
* 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
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.
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
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 _
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
@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.
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
@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
@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.
subdirectory @file{packages}. Package file names follow
the naming convention @file{<package-name>-<version>-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:
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)
@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
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.
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.
@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.
@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.
@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.
@item eshell
Command shell implemented entirely in Emacs Lisp.
+@item ess
+ESS: Emacs Speaks Statistics.
+
@item eterm
Terminal emulator.
@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.
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.
@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.
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.
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.
@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.
@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.
@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.
@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.
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.
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.
@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.
+2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.9 "Informed Management" is released.
+
+2002-08-16 Jonathan Harris <jonathan@xemacs.org>
+
+ * 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 <jonathan@xemacs.org>
+
+ * README: Document Visual Studio .NET setup
+
+2002-05-06 Jonathan Harris <jonathan@xemacs.org>
+
+ * README:
+ * config.inc.samp:
+ Update PNG version to 1.0.9, zlib version to 1.1.14.
+
2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.8 "Honest Recruiter" is released.
+2002-03-26 Vin Shelton <acs@xemacs.org>
+
+ * xemacs.mak: Added special rule to build winclient.exe.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
-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
============================
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.
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
* 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'.
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
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
!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
!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)
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
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)
$(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
$(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 \
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
!endif
!if !defined(USE_CRTDLL)
-USE_CRTDLL=0
+USE_CRTDLL=1
!endif
!if $(DEBUG)
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
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)
{
Window root, parent, *children;
unsigned int nchildren;
- int i;
+ unsigned int i;
if (!XQueryTree (display, w, &root, &parent, &children, &nchildren))
return;
/* 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;
} 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)
typedef unsigned char Opbyte;
\f
+static void check_opcode (Opcode opcode);
static void invalid_byte_code_error (char *error_message, ...);
Lisp_Object * execute_rare_opcode (Lisp_Object *stack_ptr,
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
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;
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;
}
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));
}
{
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))
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;
#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))
return arg;
}
+/* Unwind protection decrements dialog count */
+static Lisp_Object
+dialog_popped_down (Lisp_Object arg)
+{
+ popup_up_p--;
+ return Qnil;
+}
+
#define ALIGN_TEMPLATE \
{ \
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,
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;
int findex, len;
char win32pattern[MAXNAMLEN+3];
HANDLE fh;
+ int errm;
/*
* Much of the following code and comments were taken from dired.c.
*/
findex = 0;
fh = INVALID_HANDLE_VALUE;
+ errm = SetErrorMode (SEM_FAILCRITICALERRORS
+ | SEM_NOOPENFILEERRORBOX);
while (1)
{
fh = FindFirstFile(win32pattern, &files[findex]);
if (fh == INVALID_HANDLE_VALUE)
{
+ SetErrorMode (errm);
report_file_error ("Opening directory",
list1(build_string(dirfile)));
}
break;
}
FindClose(fh);
+ SetErrorMode (errm);
report_file_error ("Reading directory",
list1(build_string(dirfile)));
}
*nfiles = findex;
break;
}
+
+ SetErrorMode (errm);
return (files);
}
{
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. */
*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. */
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);
/* 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, /*
if (EQ (tem, Qt) || EQ (tem, Qmacro))
{
/* Yes, load it and try again. */
+ /* do_autoload GCPROs both arguments */
do_autoload (def, sym);
continue;
}
{
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;
}
/* 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);
if (EQ (funcar, Qautoload))
{
+ /* do_autoload GCPROs both arguments */
do_autoload (fun, original_fun);
goto retry;
}
}
\f
+/* #### 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).
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)
{
}
else if (EQ (funcar, Qautoload))
{
+ /* do_autoload GCPROs both arguments */
do_autoload (fun, args[0]);
goto retry;
}
}
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;
}
#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)
{
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);
+ }
}
}
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. */
}
#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 */
+}
+
\f
/************************************************************************/
/* Event pump */
#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. */
/* 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 */
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
{
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
}
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
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)
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 ();
{
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
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");
/* 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);
switch (XEVENT_TYPE (event))
{
- default:
- goto RETURN;
case button_release_event:
case misc_user_event:
/* don't echo menu accelerator keys */
goto STORE_AND_EXECUTE_KEY;
case key_press_event: /* any key input can trigger autosave */
break;
+ default:
+ goto RETURN;
}
maybe_do_auto_save ();
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
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
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);
}
}
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;
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;
}
}
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;
}
}
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++ = '*';
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);
\f
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;
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))
{
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)
{
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))
/* 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];
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;
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; \
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
}
}
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. */
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);
}
else
{
- int i;
+ unsigned int i;
if (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p))
disable_glyph_animated_timeout (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p));
{
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;
&& 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);
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;
eev = NULL;
}
+ popup_up_p++;
+
/* Default is to put the menu at the point (10, 10) in frame */
if (eev)
{
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);
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 */
fileSize = PAD2(ck.ckSize) - sizeof(RIFF_FOURCC);
- while (fileSize >= sizeof(RiffChunk))
+ while (fileSize >= (AuInt32) sizeof(RiffChunk))
{
if (!readChunk(&ck))
Err();
}
#endif /* 0 */
-#define REG_ROOT "SOFTWARE\\GNU\\XEmacs"
+#define REG_ROOT "SOFTWARE\\XEmacs\\XEmacs"
LPBYTE
nt_get_resource (char *key, LPDWORD lpdwtype)
int permission;
int len;
int rootdir = FALSE;
+ int errm;
if (path == NULL || buf == NULL)
{
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;
}
}
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)
}
else
{
+ SetErrorMode (errm);
errno = EACCES;
return -1;
}
fake_inode = 0;
}
+ SetErrorMode (errm);
+
#if 0
/* Not sure if there is any point in this. */
if (!NILP (Vwin32_generate_fake_inodes))
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);
}
/* #### 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);
}
/* !!#### 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;
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
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. */
}
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;
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 */
#include <sys/stat.h> /* 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))
# 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)
}
#endif /* CYGWIN */
-#ifdef WIN32_NATIVE
+#ifdef WIN32_FILENAMES
#ifndef ELOOP
#define ELOOP 10062 /* = WSAELOOP in winsock.h */
#endif
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)
{
path++;
}
/* Just a path name, prepend the current directory */
- else
+ else if (1)
{
getcwd (new_path, PATH_MAX - 1);
new_path += strlen (new_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);
{
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);
/* 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);
}
# 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
dll_handle
dll_open (const char *fname)
{
- return (dll_handle) dlopen (fname, RTLD_NOW | RTLD_GLOBAL);
+ return (dll_handle) dlopen (fname, RTLD_NOW);
}
int
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* This implementation by Andy Piper <andyp@parallax.co.uk>, with bits
+/* This implementation by Andy Piper <andy@xemacs.org>, with bits
borrowed from toolbar-x.c */
/* Synched up with: Not in FSF. */
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);
}
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);
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;
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));
}
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);
#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
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))
{
/* 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
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
+2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.9 "Informed Management" is released.
+
+2002-07-20 Mike Sperber <mike@xemacs.org>
+
+ * automated/test-harness.el (test-harness-read-from-buffer): Fix
+ incorrect call of `princ'.
+
2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.8 "Honest Recruiter" is released.
(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)
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