From: tomo Date: Fri, 16 Jul 1999 07:36:05 +0000 (+0000) Subject: XEmacs 21.2.18 "Toshima". X-Git-Tag: r21-2-18~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da416a1945940b3f952144475eb1a1357430527d;p=chise%2Fxemacs-chise.git- XEmacs 21.2.18 "Toshima". --- diff --git a/CHANGES-beta b/CHANGES-beta index 65db0cf..7dcd968 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,5 +1,10 @@ -*- indented-text -*- to 21.2.18 "Toshima" +-- miscellaneous fixes from Steve Baur +-- miscellaneous fixes from Didier Verna +-- various bug fixes from Karl Hegbloom +-- miscellaneous fixes from Bob Weiner +-- fix for XIM server crashing and taking down XEmacs from Kazuyuki IENAGA -- valid-image-instantiator-format-p tightened up by Andy Piper. -- glyph widget support under X/Motif from Andy Piper -- Make docdir configurable, update package searching rules from Michael diff --git a/ChangeLog b/ChangeLog index 8337451..381ea32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-07-06 SL Baur + + * config.guess (main): Synch with newer config.guess for HP + support. + From Marcus Thiessel + 1999-06-25 Michael Sperber [Mr. Preprocessor] * configure.in (with_prefix): Added --with-prefix, defaults to diff --git a/config.guess b/config.guess index 6e82336..7f2ead9 100755 --- a/config.guess +++ b/config.guess @@ -368,7 +368,7 @@ EOF case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) + 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >dummy.c #include #include diff --git a/dynodump/_dynodump.h b/dynodump/_dynodump.h index 847c4eb..c09bd7f 100644 --- a/dynodump/_dynodump.h +++ b/dynodump/_dynodump.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _dynodump.h,v 1.3 1997/05/29 04:22:29 steve Exp $ - SMI" +#pragma ident "@(#) $Id: _dynodump.h,v 1.5 1996/05/23 18:39:07 georgn Exp $ - SMI" #ifndef _DYNODUMP_DOT_H #define _DYNODUMP_DOT_H diff --git a/dynodump/dynodump.c b/dynodump/dynodump.c index ff4477d..b684813 100644 --- a/dynodump/dynodump.c +++ b/dynodump/dynodump.c @@ -73,7 +73,7 @@ * N.B. The above commentary is not quite correct in the flags have been hardwired * to RTLD_SAVREL. */ -#pragma ident "@(#) $Id: dynodump.c,v 1.6 1998/03/31 20:10:55 steve Exp $ - SMI" +#pragma ident "@(#) $Id: dynodump.c,v 1.8 1996/05/23 18:39:21 georgn Exp $ - SMI" #define __EXTENSIONS__ 1 diff --git a/dynodump/i386/_relocate.c b/dynodump/i386/_relocate.c index f97dd1b..d3ec59c 100644 --- a/dynodump/i386/_relocate.c +++ b/dynodump/i386/_relocate.c @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _relocate.c,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:12:41 georgn Exp $ - SMI" /* LINTLIBRARY */ diff --git a/dynodump/i386/machdep.h b/dynodump/i386/machdep.h index 4dc66fe..c90e29c 100644 --- a/dynodump/i386/machdep.h +++ b/dynodump/i386/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:43 georgn Exp $ - SMI" /* * Global include file for all sgs Intel machine dependent macros, constants diff --git a/dynodump/ppc/_relocate.c b/dynodump/ppc/_relocate.c index 754b417..feb5ca9 100644 --- a/dynodump/ppc/_relocate.c +++ b/dynodump/ppc/_relocate.c @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.3 1995/06/26 20:16:39 georgn Exp $ - SMI" /* LINTLIBRARY */ diff --git a/dynodump/ppc/machdep.h b/dynodump/ppc/machdep.h index a649a9c..2a3d1e6 100644 --- a/dynodump/ppc/machdep.h +++ b/dynodump/ppc/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:20 steve Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:49 georgn Exp $ - SMI" /* * Global include file for all sgs PowerPC machine dependent macros, constants diff --git a/dynodump/sparc/_relocate.c b/dynodump/sparc/_relocate.c index 14466f0..10b0fda 100644 --- a/dynodump/sparc/_relocate.c +++ b/dynodump/sparc/_relocate.c @@ -35,7 +35,7 @@ /* * Update the value of the `_edata' and `_end' symbols. */ -#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:13:26 georgn Exp $ - SMI" #include #include diff --git a/dynodump/sparc/machdep.h b/dynodump/sparc/machdep.h index b4b76d8..972081e 100644 --- a/dynodump/sparc/machdep.h +++ b/dynodump/sparc/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:26 steve Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:55 georgn Exp $ - SMI" /* * Global include file for all sgs SPARC machine dependent macros, constants diff --git a/dynodump/syms.c b/dynodump/syms.c index 0ac5cb8..c060f33 100644 --- a/dynodump/syms.c +++ b/dynodump/syms.c @@ -35,7 +35,7 @@ /* * Update the value of the `_edata' and `_end' symbols. */ -#pragma ident "@(#) $Id: syms.c,v 1.3 1997/05/29 04:22:30 steve Exp $ - SMI" +#pragma ident "@(#) $Id: syms.c,v 1.2 1995/03/06 22:39:22 georgn Exp $ - SMI" #include #include diff --git a/etc/TUTORIAL.ru b/etc/TUTORIAL.ru index 49b17ff..c8c4cce 100644 --- a/etc/TUTORIAL.ru +++ b/etc/TUTORIAL.ru @@ -1079,4 +1079,4 @@ Copyright (c) 1985, 1996 Free Software Foundation writing, and sharing free software! // ÚÁÍÅÞÁÎÉÑ, ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂÏË Ó ÎÅÔÅÒÐÅÎÉÅÍ ÖÄÕ ÐÏ ÁÄÒÅÓÕ bor@vb.dn.ua -// Vladimir Bormotov. \ No newline at end of file +// Vladimir Bormotov. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 579b064..ea3e9a0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + 1999-06-22 XEmacs Build Bot * XEmacs 21.2.17 is released diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 8fa12d9..2a9e7d1 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -28,7 +28,7 @@ Options: Report bugs to .' -Id='$Id: rcs2log,v 1.2 1997/07/09 04:31:03 steve Exp $' +Id='$Id: rcs2log,v 1.37 1997/03/21 22:19:30 eggert Exp $' # Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8ad5eea..e3a7846 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,46 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-07-13 SL Baur + + * lib-complete.el (read-library-name): Revert previous change. + (read-library): Ditto. + +1999-06-24 Karl M. Hegbloom + + * packages.el (packages-package-list): Capitalize docstring. + + * packages.el (packages-find-package-library-path): Use #'nconc + rather than #'append to reduce consing -- #'mapcar uses Flist, + which returns a freshly consed list. #'append would create yet + another fresh list, using Fmake_list in concat. + + * packages.el (package-provide): Use setq with remassq like it + says in its docstring. + +1999-07-06 SL Baur + + * lib-complete.el (progn-with-message): Fix typo. + +1999-07-06 SL Baur + + * mule/mule-misc.el (char-octet): Make function match docstring. + From Katsumi Yamaoka + +1999-06-15 Karl M. Hegbloom + + * wid-edit.el (widget-documentation): corrected spelling error. + +1999-06-23 Jonathan Marten + + * x-win-sun.el (x-win-init-sun): Don't rebind Find and Sh-find + keys if already bound + +1999-07-06 SL Baur + + * lib-complete.el (progn-with-message): Revert previous changes. + 1999-06-24 Bob Weiner * lib-complete.el (find-library): diff --git a/lisp/ldap.el b/lisp/ldap.el index bb31a83..4006514 100644 --- a/lisp/ldap.el +++ b/lisp/ldap.el @@ -5,7 +5,7 @@ ;; Author: Oscar Figueiredo ;; Maintainer: Oscar Figueiredo ;; Created: Jan 1998 -;; Version: $Revision: 1.7.2.5 $ +;; Version: $Revision: 1.7.2.3 $ ;; Keywords: help comm ;; This file is part of XEmacs diff --git a/lisp/lib-complete.el b/lisp/lib-complete.el index 29175a8..69d5554 100644 --- a/lisp/lib-complete.el +++ b/lisp/lib-complete.el @@ -104,25 +104,24 @@ If optional fourth argument FAST is non-nil, don't sort the completions, ;;=== Utilities =========================================================== -(defmacro progn-with-message (MESSAGE &rest FORMS) +(defmacro progn-with-message (message &rest forms) "(progn-with-message MESSAGE FORMS ...) Display MESSAGE and evaluate FORMS, returning value of the last one." ;; based on Hallvard Furuseth's funcall-with-message - (` - (if (eq (selected-window) (minibuffer-window)) + `(if (eq (selected-window) (minibuffer-window)) (save-excursion (goto-char (point-max)) (let ((orig-pmax (point-max))) (unwind-protect (progn - (insert " " (, MESSAGE)) (goto-char orig-pmax) + (insert " " ,message) (goto-char orig-pmax) (sit-for 0) ; Redisplay - (,@ FORMS)) + ,@forms) (delete-region orig-pmax (point-max))))) (prog2 - (message "%s" (, MESSAGE)) - (progn (,@ FORMS)) - (message ""))))) + (message "%s" ,message) + (progn ,@forms) + (message "")))) (put 'progn-with-message 'lisp-indent-hook 1) @@ -255,10 +254,7 @@ Optional sixth argument FILTER can be used to provide a function to (cond ((equal library "") DEFAULT) (FULL (locate-file library read-library-internal-search-path - ;; decompression doesn't work with Mule -slb - (if (featurep 'mule) - ".el:.elc" - ".el:.el.gz:.el.Z:.elc"))) + '(".el" ".el.gz" ".elc"))) (t library)))) (defun read-library-name (prompt) @@ -269,10 +265,7 @@ Optional sixth argument FILTER can be used to provide a function to 'read-library-internal (lambda (fn) (cond - ;; decompression doesn't work with mule -slb - ((string-match (if (featurep 'mule) - "\\.el$" - "\\.el\\(\\.gz\\|\\.Z\\)?$") fn) + ((string-match "\\.el\\(\\.gz\\|\\.Z\\)?$" fn) (substring fn 0 (match-beginning 0))))) t nil))) diff --git a/lisp/mule/mule-misc.el b/lisp/mule/mule-misc.el index 8de1883..5311b24 100644 --- a/lisp/mule/mule-misc.el +++ b/lisp/mule/mule-misc.el @@ -212,6 +212,7 @@ because its `find-charset-string' ignores ASCII charset." "Return the octet numbered N (should be 0 or 1) of char CH. N defaults to 0 if omitted." (let ((split (split-char ch))) + (setq n (or n 0)) (cond ((eq n 0) (nth 1 split)) ((eq n 1) diff --git a/lisp/packages.el b/lisp/packages.el index 1e374bf..03d001b 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -55,7 +55,7 @@ ;;; Package versioning (defvar packages-package-list nil - "database of loaded packages and version numbers") + "Database of loaded packages and version numbers") (defvar packages-hierarchy-depth 1 "Depth of package hierarchies.") @@ -123,9 +123,8 @@ the directory to be ignored.") (let ((info (if (and attributes (floatp (car attributes))) (list :version (car attributes)) attributes))) - (remassq name packages-package-list) (setq packages-package-list - (cons (cons name info) packages-package-list)))) + (cons (cons name info) (remassq name packages-package-list))))) (defun package-require (name version) (let ((pkg (assq name packages-package-list))) @@ -453,7 +452,7 @@ PACKAGES is a list of package directories. SUFFIXES is a list of names of package subdirectories to look for." (let ((directories (apply - #'append + #'nconc (mapcar #'(lambda (package) (mapcar #'(lambda (suffix) (file-name-as-directory (concat package suffix))) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index c01d457..a21f19c 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -49,7 +49,7 @@ :group 'hypermedia) (defgroup widget-documentation nil - "Options controling the display of documentation strings." + "Options controlling the display of documentation strings." :group 'widgets) (defgroup widget-faces nil diff --git a/lisp/x-win-sun.el b/lisp/x-win-sun.el index b59dd82..273a862 100644 --- a/lisp/x-win-sun.el +++ b/lisp/x-win-sun.el @@ -246,8 +246,10 @@ to more mnemonic ones,like `kp-3'." ;;; themselves are in x-win.el in case someone wants to use them when ;;; not running on a Sun display.) - (define-key global-map 'find 'ow-find) - (define-key global-map '(shift find) 'ow-find-backward) + (or (lookup-key global-map 'find) + (define-key global-map 'find 'ow-find)) + (or (lookup-key global-map '(shift find)) + (define-key global-map '(shift find) 'ow-find-backward)) ) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 625071a..6788b03 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + 1999-07-05 Didier Verna * lwlib-Xm.c (xm_update_one_widget): add missing #ifdefs around diff --git a/man/ChangeLog b/man/ChangeLog index efe1646..fea4c9a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + 1999-06-22 XEmacs Build Bot * XEmacs 21.2.17 is released diff --git a/man/info.texi b/man/info.texi index 1b6c0da..d2fda6f 100644 --- a/man/info.texi +++ b/man/info.texi @@ -3,7 +3,7 @@ @setfilename ../info/info.info @settitle Info 1.0 @comment %**end of header -@comment $Id: info.texi,v 1.4 1998/06/30 06:35:28 steve Exp $ +@comment $Id: info.texi,v 1.4 1997/07/10 21:58:11 karl Exp $ @dircategory Texinfo documentation system @direntry diff --git a/man/texinfo.tex b/man/texinfo.tex index 6057ffa..3ce4715 100644 --- a/man/texinfo.tex +++ b/man/texinfo.tex @@ -1,5 +1,5 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% $Id: texinfo.tex,v 1.5 1998/06/13 04:28:12 steve Exp $ +% $Id: texinfo.tex,v 2.227 1998/02/25 22:54:34 karl Exp $ % % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98 % Free Software Foundation, Inc. @@ -44,7 +44,7 @@ % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 1.5 $ +\deftexinfoversion$Revision: 2.227 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number diff --git a/man/texinfo.texi b/man/texinfo.texi index e5cd94d..0bc09a7 100644 --- a/man/texinfo.texi +++ b/man/texinfo.texi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: texinfo.texi,v 1.8.2.1 1999/03/04 15:48:24 steveb Exp $ +@c $Id: texinfo.txi,v 1.50 1998/02/27 21:21:34 karl Exp $ @c %**start of header @c All text is ignored before the setfilename. diff --git a/man/xemacs-faq.texi b/man/xemacs-faq.texi index 666e99b..76641d8 100644 --- a/man/xemacs-faq.texi +++ b/man/xemacs-faq.texi @@ -7,7 +7,7 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/05/13 12:26:40 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/03/04 15:48:25 $ @sp 1 @author Tony Rossini @author Ben Wing diff --git a/nt/ChangeLog b/nt/ChangeLog index b735b7f..23a19a8 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + 1999-06-22 XEmacs Build Bot * XEmacs 21.2.17 is released diff --git a/src/ChangeLog b/src/ChangeLog index 5880e02..787e141 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,33 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-07-08 SL Baur + + * event-Xt.c (handle_focus_event_1): Guard FRAME_X_XIC with + XIM_XLIB. + (emacs_Xt_handle_magic_event): Ditto. + * redisplay-x.c (x_output_string): Ditto. + (x_output_eol_cursor): Ditto. + +1999-06-30 Kazuyuki IENAGA + + * event-Xt.c, input-method-xlib.c, redisplay-x.c: Avoid the + problem that when XIM is destroyed or missed with some reason, + xemacs will die. Now xim=xlib waits the XIM will be ready and + endures the case of XIM end up. + +1999-07-03 Gunnar Evermann + + * tooltalk.c (init_tooltalk): save signal actions for SIGQUIT, + SIGINT and SIGCHLD before calling tt_open and restore the + afterwards. This fixes e.g. the zombie subprocesses on Solaris + +1999-07-06 SL Baur + + * s/linux.h: gcc-2.8 changes for powerpc + From Justin Vallon + 1999-07-05 Didier Verna * indent.c: new symbol Qcoerce. diff --git a/src/event-Xt.c b/src/event-Xt.c index 40c0752..fcc8a92 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -808,7 +808,8 @@ x_to_emacs_keysym (XKeyPressedEvent *event, int simple_p) len = XmImMbLookupString (XtWindowToWidget (event->display, event->window), event, bufptr, bufsiz, &keysym, &status); #else /* XIM_XLIB */ - len = XmbLookupString (xic, event, bufptr, bufsiz, &keysym, &status); + if (xic) + len = XmbLookupString (xic, event, bufptr, bufsiz, &keysym, &status); #endif /* HAVE_XIM */ #ifdef DEBUG_XEMACS @@ -1313,8 +1314,9 @@ handle_focus_event_1 (struct frame *f, int in_p) #if XtSpecificationRelease > 5 Widget focus_widget = XtGetKeyboardFocusWidget (FRAME_X_TEXT_WIDGET (f)); #endif -#ifdef HAVE_XIM - XIM_focus_event (f, in_p); +#if defined(HAVE_XIM) && defined(XIM_XLIB) + if (FRAME_X_XIC(f)) + XIM_focus_event (f, in_p); #endif /* HAVE_XIM */ /* On focus change, clear all memory of sticky modifiers @@ -1642,8 +1644,9 @@ emacs_Xt_handle_magic_event (struct Lisp_Event *emacs_event) break; case ConfigureNotify: -#ifdef HAVE_XIM - XIM_SetGeometry (f); +#if defined(HAVE_XIM) && defined(XIM_XLIB) + if (FRAME_X_XIC(f)) + XIM_SetGeometry (f); #endif break; diff --git a/src/input-method-xlib.c b/src/input-method-xlib.c index cb8a9b0..08e0135 100644 --- a/src/input-method-xlib.c +++ b/src/input-method-xlib.c @@ -38,6 +38,9 @@ Boston, MA 02111-1307, USA. */ #include "EmacsFrame.h" #include "events.h" +#include +#include + #ifndef XIM_XLIB #error XIM_XLIB is not defined?? #endif @@ -72,6 +75,8 @@ static char DefaultXIMStyles[] = "XIMPreeditNone|XIMStatusNothing\n" "XIMPreeditNone|XIMStatusNone"; +static Boolean xim_initted = False; + static XIMStyle best_style (XIMStyles *user, XIMStyles *xim); void @@ -125,60 +130,73 @@ Initialize_Locale (void) } } -/* Create X input method for device */ -void -XIM_init_device (struct device *d) -{ - Display *dpy = DEVICE_X_DISPLAY (d); - char *name, *class; - XIM xim; +/******************************************************************/ +/* Input method using xlib */ +/******************************************************************/ - XtGetApplicationNameAndClass (dpy, &name, &class); - - DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class); +/* + * called from when XIM is destroying + */ +static void +IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data) +{ + struct frame *f = (struct frame *)client_data; + struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); + Lisp_Object frame_list = DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f))); + Lisp_Object tail; + struct frame *target_frame = NULL; - if (xim == NULL) + LIST_LOOP (tail, frame_list) { - stderr_out ("Warning: XOpenIM() failed...no input server available\n"); - return; + if (target_frame = XFRAME (XCAR (tail))) + { + if ( FRAME_X_XIC(target_frame) ) + { + XDestroyIC (FRAME_X_XIC(target_frame)); + FRAME_X_XIC (target_frame) = NULL; + } + } } - else + +#if 0 + if ( DEVICE_X_XIM (d) ) { - /* Get supported styles */ - XGetIMValues (xim, XNQueryInputStyle, &DEVICE_X_XIM_STYLES (d), NULL); -#ifdef DEBUG_XIM - describe_XIM (xim); -#endif + stderr_out ("NULLing d->xim...\n"); + /* DEVICE_X_XIM (d) = NULL; */ } +#endif + + xim_initted = False; + return; } -/* Create an X input context for this frame. */ -void -XIM_init_frame (struct frame *f) +/* + * called from when FRAME is initializing + */ +static void +IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) { - struct device *d = XDEVICE (FRAME_DEVICE (f)); - XIM xim = DEVICE_X_XIM (d); - XIC xic; - Widget w = FRAME_X_TEXT_WIDGET (f); + struct frame *f = (struct frame *)client_data; + struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); + XIM xim; + Widget w = FRAME_X_TEXT_WIDGET ((struct frame *)client_data); Window win = XtWindow (w); - XRectangle p_area = {0,0,1,1}, s_area={0,0,1,1}; + XRectangle p_area = {0,0,1,1}, s_area = {0,0,1,1}; XPoint spot = {0,0}; XIMStyle style; XVaNestedList p_list, s_list; - + char *name, *class; typedef struct { XIMStyles styles; XFontSet fontset; Pixel fg; Pixel bg; + char *inputmethod; } xic_vars_t; - xic_vars_t xic_vars; - - /* mrb: #### Fix so that background and foreground is set from - default face, rather than foreground and background resources, or - that the user can use set-frame-parameters to set xic attributes */ + XIMCallback ximcallback; + XIC xic; #define res(name, class, representation, field, default_value) \ { name, class, representation, sizeof(xic_vars.field), \ @@ -190,21 +208,40 @@ XIM_init_frame (struct frame *f) res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, (XtPointer) DefaultXIMStyles), res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, (XtPointer) XtDefaultFontSet), res(XtNximForeground, XtCForeground, XtRPixel, fg, (XtPointer) XtDefaultForeground), - res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground) + res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground), + res(XtNinputMethod, XtCInputMethod, XtRString, inputmethod, (XtPointer) NULL) }; - assert (win != 0 && w != NULL && d != NULL); + /* ---------- beginning of the action ---------- */ - if (!xim) - { /* No input method? */ - FRAME_X_XIC (f) = NULL; - return; + /* + * if no xim is presented, initialize xim ... + */ + if ( xim_initted == False ) + { + xim_initted = True; + XtGetApplicationNameAndClass (dpy, &name, &class); + DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class); + + /* destroy callback for im */ + ximcallback.callback = IMDestroyCallback; + ximcallback.client_data = (XPointer)f; + XSetIMValues (xim, XNDestroyCallback, &ximcallback, NULL); + } + else + { + xim = DEVICE_X_XIM (d); } + w = FRAME_X_TEXT_WIDGET (f); + + /* + * initialize XIC + */ + if ( FRAME_X_XIC (f) ) return; XtGetApplicationResources (w, &xic_vars, resources, XtNumber (resources), NULL, 0); - if (!xic_vars.fontset) { stderr_out ("Can't get fontset resource for Input Method\n"); @@ -212,45 +249,46 @@ XIM_init_frame (struct frame *f) return; } + /* construct xic */ + XGetIMValues (xim, XNQueryInputStyle, &DEVICE_X_XIM_STYLES(d), NULL); FRAME_X_XIC_STYLE (f) = style = - best_style (&xic_vars.styles, DEVICE_X_XIM_STYLES (d)); + best_style (&xic_vars.styles, (XIMStyles *)DEVICE_X_XIM_STYLES(d)); - /* Hopefully we don't have to conditionalize the following based on - style; the IM should ignore values it doesn't use */ p_list = XVaCreateNestedList (0, - XNArea, &p_area, - XNSpotLocation, &spot, - XNForeground, xic_vars.fg, - XNBackground, xic_vars.bg, - XNFontSet, xic_vars.fontset, - NULL); + XNArea, &p_area, + XNSpotLocation, &spot, + XNForeground, xic_vars.fg, + XNBackground, xic_vars.bg, + XNFontSet, xic_vars.fontset, + NULL); s_list = XVaCreateNestedList (0, - XNArea, &s_area, - XNForeground, xic_vars.fg, - XNBackground, xic_vars.bg, - XNFontSet, xic_vars.fontset, - NULL); + XNArea, &s_area, + XNForeground, xic_vars.fg, + XNBackground, xic_vars.bg, + XNFontSet, xic_vars.fontset, + NULL); + FRAME_X_XIC (f) = xic = XCreateIC (xim, - XNInputStyle, style, - XNClientWindow, win, - XNFocusWindow, win, - XNPreeditAttributes, p_list, - XNStatusAttributes, s_list, - NULL); + XNInputStyle, style, + XNClientWindow, win, + XNFocusWindow, win, + XNPreeditAttributes, p_list, + XNStatusAttributes, s_list, + NULL); XFree (p_list); XFree (s_list); if (!xic) { - stderr_out ("Warning: XCreateIC failed\n"); + stderr_out ("Warning: XCreateIC failed.\n"); return; } if (style & XIMPreeditPosition) - { /* Init spot to invalid values */ - XPoint *frame_spot = &(FRAME_X_XIC_SPOT (f)); + { + XPoint *frame_spot = &(FRAME_X_XIC_SPOT(f)); frame_spot->x = frame_spot->y = -1; } @@ -258,11 +296,63 @@ XIM_init_frame (struct frame *f) XSetICFocus (xic); -#ifdef DEBUG_XIM - describe_XIC (xic); + return; +} + +/* Create X input method for device */ +void +XIM_init_device (struct device *d) +{ + /* do nothing here */ + return; +} + +/* Callback for when the frame was deleted (closed) */ +static void +XIM_delete_frame (Widget w, XtPointer client_data, XtPointer call_data) +{ + struct frame *f = (struct frame *)client_data; + struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); + Display *dpy = DEVICE_X_DISPLAY (d); + + XUnregisterIMInstantiateCallback (dpy, NULL, NULL, NULL, + IMInstantiateCallback, (XtPointer)f); + + if ( FRAME_X_XIC (f) ) + { + XDestroyIC (FRAME_X_XIC(f)); + FRAME_X_XIC (f) = NULL; + } + return; +} + +/* Create an X input context for this frame. + - Register the IM to be initiated later using XRegisterIMInstantiateCallback + */ +void +XIM_init_frame (struct frame *f) +{ + struct device *d = XDEVICE (FRAME_DEVICE (f)); + + XRegisterIMInstantiateCallback (DEVICE_X_DISPLAY (d), NULL, NULL, NULL, + IMInstantiateCallback, (XtPointer)f); + +#if 0 + if ( FRAME_X_XIC (f) ) + return; #endif + if ( ! DEVICE_X_XIM (d) ) + { + stderr_out ("X Input Method open failed. Waiting IM to be enabled.\n"); + } + + /* when frame is going to be destroyed (closed) */ + XtAddCallback (FRAME_X_TEXT_WIDGET(f), XNDestroyCallback, + XIM_delete_frame, (XtPointer)f); + return; } + void XIM_SetGeometry (struct frame *f) { @@ -346,7 +436,7 @@ XIM_SetSpotLocation (struct frame *f, int x, int y) void XIM_focus_event (struct frame *f, int in_p) { - if (FRAME_X_XIC (f)) + if (FRAME_X_XIC (f) /* && FRAME_X_XIM_REGISTERED(f) */) (in_p ? XSetICFocus : XUnsetICFocus) (FRAME_X_XIC (f)); } diff --git a/src/redisplay-x.c b/src/redisplay-x.c index 6555163..8a0ba60 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -840,10 +840,11 @@ x_output_string (struct window *w, struct display_line *dl, cachel = WINDOW_FACE_CACHEL (w, findex); } -#ifdef HAVE_XIM +#if defined(HAVE_XIM) && defined(XIM_XLIB) if (cursor && focus && (cursor_start == clip_start) && cursor_height) - XIM_SetSpotLocation (f, xpos - 2, dl->ypos + dl->descent - 2); -#endif /* HAVE_XIM */ + if (FRAME_X_XIC(f)) + XIM_SetSpotLocation (f, xpos - 2, dl->ypos + dl->descent - 2); +#endif /* HAVE_XIM && XIM_XLIB */ bg_pmap = cachel->background_pixmap; if (!IMAGE_INSTANCEP (bg_pmap) @@ -2068,8 +2069,9 @@ x_output_eol_cursor (struct window *w, struct display_line *dl, int xpos, if (focus) { -#ifdef HAVE_XIM - XIM_SetSpotLocation (f, x - 2 , cursor_y + cursor_height - 2); +#if defined(HAVE_XIM) && defined(XIM_XLIB) + if (FRAME_X_XIC(f)) + XIM_SetSpotLocation (f, x - 2 , cursor_y + cursor_height - 2); #endif /* HAVE_XIM */ if (NILP (bar_cursor_value)) diff --git a/src/s/linux.h b/src/s/linux.h index 906bab4..8d8d138 100644 --- a/src/s/linux.h +++ b/src/s/linux.h @@ -26,6 +26,12 @@ Boston, MA 02111-1307, USA. */ #define USG #define LINUX +/* powerpc gcc 2.8.0 doesn't define __ELF__, but it is */ + +#if defined(__ELF__) || defined(powerpc) +#define LINUX_ELF +#endif + /* SYSTEM_TYPE should indicate the kind of system you are using. It sets the Lisp variable system-type. */ @@ -81,7 +87,7 @@ Boston, MA 02111-1307, USA. */ /* Ask GCC where to find libgcc.a. */ #define LIB_GCC "`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`" -#ifndef __ELF__ +#ifndef LINUX_ELF /* Linux has crt0.o in a non-standard place */ #define START_FILES "pre-crt0.o /usr/lib/crt0.o" #else @@ -106,7 +112,7 @@ Boston, MA 02111-1307, USA. */ /* Best not to include -lg, unless it is last on the command line */ #define LIBS_DEBUG #define LIBS_TERMCAP "-ltermcap -lcurses" /* save some space with shared libs*/ -#ifndef __ELF__ +#ifndef LINUX_ELF #define LIB_STANDARD "-lc" /* avoid -lPW */ #else /*#undef LIB_GCC @@ -124,7 +130,7 @@ Boston, MA 02111-1307, USA. */ #define LIBS_SYSTEM #endif -#ifdef __ELF__ +#ifdef LINUX_ELF #define UNEXEC "unexelf.o" #define UNEXEC_USE_MAP_PRIVATE #if 0 @@ -142,7 +148,7 @@ Boston, MA 02111-1307, USA. */ #undef START_FILES #undef LIB_GCC #endif -#endif /* __ELF__ */ +#endif /* LINUX_ELF */ #ifdef LINUX_QMAGIC diff --git a/src/tooltalk.c b/src/tooltalk.c index 36edcf5..3f24b2e 100644 --- a/src/tooltalk.c +++ b/src/tooltalk.c @@ -1256,7 +1256,28 @@ init_tooltalk (void) Lisp_Object lp; Lisp_Object fil; + + /* tt_open() messes with our signal handler flags (at least when no + ttsessions is running on the machine), therefore we save the + actions and restore them after the call */ +#ifdef HAVE_SIGPROCMASK + { + struct sigaction ActSIGQUIT; + struct sigaction ActSIGINT; + struct sigaction ActSIGCHLD; + sigaction (SIGQUIT, NULL, &ActSIGQUIT); + sigaction (SIGINT, NULL, &ActSIGINT); + sigaction (SIGCHLD, NULL, &ActSIGCHLD); +#endif retval = tt_open (); +#ifdef HAVE_SIGPROCMASK + sigaction (SIGQUIT, &ActSIGQUIT, NULL); + sigaction (SIGINT, &ActSIGINT, NULL); + sigaction (SIGCHLD, &ActSIGCHLD, NULL); + } +#endif + + if (tt_ptr_error (retval) != TT_OK) return; diff --git a/src/unexsol2.c b/src/unexsol2.c index 06e71e7..d9de182 100644 --- a/src/unexsol2.c +++ b/src/unexsol2.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* #pragma ident "@(#) $Id: unexsol2.c,v 1.3 1997/10/13 03:35:33 steve Exp $" */ +/* #pragma ident "@(#) $Id: unexsol2.c,v 1.2 1995/01/25 20:39:16 georgn Exp $" */ #include #include diff --git a/tests/ChangeLog b/tests/ChangeLog index 14c70cd..f8b707d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + 1999-06-22 XEmacs Build Bot * XEmacs 21.2.17 is released diff --git a/version.sh b/version.sh index f70baf5..dafc8d4 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=17 -xemacs_codename="Chiyoda" +emacs_beta_version=18 +xemacs_codename="Toshima" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=7