Commits

Anonymous committed d7a9135

Import from CVS: tag r21-2-42

  • Participants
  • Parent commits 270b05a
  • Tags r21-2-42

Comments (0)

Files changed (38)

File CHANGES-beta

+to 21.2.42 "Poseidon"
+-- 64-bit platforms (Alpha) broken in 21.2.41 now fixed -- Martin Buchholz
+-- Windows packaging changes -- Andy Piper
+-- Widget bug fixes -- Andy Piper
+-- Modeline scrolling documented -- Didier Verna
+-- C-level alignment hackery -- Martin Buchholz
+
 to 21.2.41 "Polyhymnia"
 -- A very important fix to the byte-compiler was made.
    RE-BYTE-COMPILE all your .el files that were compiled by any older
+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
+2001-01-18  Martin Buchholz  <martin@xemacs.org>
+
+	* PROBLEMS (Sun/Solaris): Yet another microimprovement.
+
+2001-01-17  Martin Buchholz  <martin@xemacs.org>
+
+	* PROBLEMS (Sun/Solaris): Replace --with-gnu-ld=no with
+	--with-ld=/usr/ccs/bin/ld
+
+2001-01-16  Robert Pluim  <rpluim@bigfoot.com>
+
+	* PROBLEMS (SunOS/Solaris): Document workaround for GNU ld bug on
+	Solaris. Half mine, half Raymond Toy, half Martin Buchholz.
+
+2001-01-16  Didier Verna  <didier@xemacs.org>
+
+	* NEWS: document the modeline horizontal scrolling feature.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.
 
 	* XEmacs 21.2.38 is released.
 
-2000-11-26  Bjrn Torkelsson  <torkel@hpc2n.umu.se>
+2000-11-26  Bjrn Torkelsson  <torkel@hpc2n.umu.se>
 
 	* configure.in: Only show message about DnD API if compiling with DnD
 
 
 2000-10-10  Martin Buchholz  <martin@xemacs.org>
 
-	* configure.in: 
+	* configure.in:
 	Use stropts.h, not sys/stropts.h.
 	Use strtio.h, not sys/strtio.h.
 
 
 2000-07-12  Martin Buchholz  <martin@xemacs.org>
 
-	* configure.in: 
+	* configure.in:
 	Make sure Unix98 socklen_t is defined.
 	Use ANSI C mode `-std1' with DEC C instead of `-std'.
 
 2000-07-09  Martin Buchholz  <martin@xemacs.org>
 
-	* configure.in: 
+	* configure.in:
 	Replace SMART_INCLUDE with a dumber, but more reliable method.
 2000-07-10  Martin Buchholz  <martin@xemacs.org>
 
-	* modules/zlib/Makefile: 
-	* modules/sample/Makefile: 
-	* modules/ldap/Makefile: 
-	* modules/base64/Makefile: 
-	* Makefile.in.in: 
+	* modules/zlib/Makefile:
+	* modules/sample/Makefile:
+	* modules/ldap/Makefile:
+	* modules/base64/Makefile:
+	* Makefile.in.in:
 	rm -f ==> $(RM)
 	define SHELL=/bin/sh
 
 2000-07-08  Ben Wing  <ben@xemacs.org>
 
 	* configure.in: add -lcomdlg32 for cygwin.
-	
+
 2000-07-05  Craig Lanning  <lanning@scra.org>
 
 	* aclocal.m4 (can_build_shared):
 	First pass at module support for cygwin and mingw.
-	
+
 	* configure:
 	* configure (xe_check_libs):
 	* configure (acfindx):
 
 2000-04-19  Martin Buchholz  <martin@xemacs.org>
 
-	* configure.in: 
+	* configure.in:
 	* src/config.h.in:
 	Rewrite SMART_INCLUDE implementation to actually work.
 	Be paranoid - Avoid use of spaces in these macro definitions.
-	Leave alloca() definition at start of compilation unit, 
+	Leave alloca() definition at start of compilation unit,
 	as AIX requests.
 	Rename SMART_INCLUDE_MACRO to SMART_INCLUDE_INDIRECTIONS.
 
 
 	* xemacs/configure.in: Do a normal link when compiling with
 	--pdump. Don't try compiling an unexec object file.
- 
+
 2000-03-27  Didier Verna  <didier@xemacs.org>
 
 	* configure.in: reorganize the output by topic.
 
 	* config.guess: Synched with latest FSF version.
 
-1998-07-12  Bjrn Torkelsson  <torkel@hpc2n.umu.se>
+1998-07-12  Bjrn Torkelsson  <torkel@hpc2n.umu.se>
 
 	* Makefile.in: added LDFLAGS.
 
 
 
 ** SunOS/Solaris
+*** Dumping error when using GNU binutils / GNU ld on a Sun.
+
+Errors similar to the following:
+
+   Dumping under the name xemacs unexec():
+   dldump(/space/rpluim/xemacs-obj/src/xemacs): ld.so.1: ./temacs:
+   fatal: /space/rpluim/xemacs-obj/src/xemacs: unknown dynamic entry:
+   1879048176
+
+are caused by using GNU ld.  There are several workarounds available:
+
+In XEmacs 21.2 or later, configure using the new portable dumper
+(--pdump).
+
+Alternatively, you can link using the Sun version of ld, which is
+normally held in /usr/ccs/bin.  This can be done by one of:
+
+- building gcc with these configure flags:
+  configure --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as
+
+- adding -B/usr/ccs/bin/ to CFLAGS used to configure XEmacs
+  (Note: The trailing '/' there is significant.)
+
+- uninstalling GNU ld.
+
+The Solaris2 FAQ claims:
+
+    When you install gcc, don't make the mistake of installing
+    GNU binutils or GNU libc, they are not as capable as their
+    counterparts you get with Solaris 2.x.
+
 *** Link failure when using acc on a Sun.
 
 To use acc, you need additional options just before the libraries, such as
 
 There have been reports of Sun sed truncating very lines in the
 Makefile during configuration.  The workaround is to use GNU sed or,
-even better, think of a better way to generate Makefile, and send us a 
+even better, think of a better way to generate Makefile, and send us a
 patch. :-)
 
 *** On Solaris 2 I get undefined symbols from libcurses.a.
 bash, as a workaround.
 
 *** On SunOS, you get linker errors
-    ld: Undefined symbol 
+    ld: Undefined symbol
        _get_wmShellWidgetClass
        _get_applicationShellWidgetClass
 
 
 *** On a Sun running SunOS 4.1.1, you get this error message from GNU ld:
 
-    /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment 
+    /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment
 
 The problem is in the Sun shared C library, not in GNU ld.
 
 *** SunOS 4.1.2: undefined symbol _get_wmShellWidgetClass
 
   Apparently the version of libXmu.so.a that Sun ships is hosed: it's missing
-  some stuff that is in libXmu.a (the static version).  Sun has a patch for 
+  some stuff that is in libXmu.a (the static version).  Sun has a patch for
   this, but a workaround is to use the static version of libXmu, by changing
   the link command from "-lXmu" to "-Bstatic -lXmu -Bdynamic".  If you have
   OpenWindows 3.0, ask Sun for these patches:
   1. The ld in IRIX 5.3 ignores all but the last -rpath
      spec, so the patched configure spits out a warning
      if --x-libraries or --site-runtime-libraries are
-     specified under irix 5.x, and it only adds -rpath 
+     specified under irix 5.x, and it only adds -rpath
      entries for the --site-runtime-libraries.  This bug was
      fixed sometime between 5.3 and 6.2.
 
   This might be a sed problem. For your own safety make sure to use
   GNU sed while dumping XEmacs.
 
-*** On HP-UX 11.0 XEmacs causes excessive X11 errors when running. 
+*** On HP-UX 11.0 XEmacs causes excessive X11 errors when running.
     (also appears on AIX as reported in comp.emacs.xemacs)
 
 Marcus Thiessel <marcus@xemacs.org>
   configure:
 
      --x-libraries="/usr/lib/Motif1.2_R6 -L/usr/lib/X11R6"
- 
+
   Make sure /usr/lib/Motif1.2_R6/libXm.sl is a link to
   /usr/lib/Motif1.2_R6/libXm.3.
 
 *** Native cc on SCO OpenServer 5 is now OK.  Icc may still throw you
 a curve.  Here is what Robert Lipe <robertl@arnet.com> says:
 
-Unlike XEmacs 19.13, building with the native cc on SCO OpenServer 5 
+Unlike XEmacs 19.13, building with the native cc on SCO OpenServer 5
 now produces a functional binary.   I will typically build this
 configuration for COFF with:
 
 	  --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
 	  --with-xpm --with-xface --with-sound=nas
 
-This version now supports ELF builds.  I highly recommend this to 
-reduce the in-core footprint of XEmacs.  This is now how I compile 
+This version now supports ELF builds.  I highly recommend this to
+reduce the in-core footprint of XEmacs.  This is now how I compile
 all my test releases.  Build it like this:
 
 	/path_to_XEmacs_source/configure --with-gcc=no \
 	  --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
 	  --with-xpm --with-xface --with-sound=nas --dynamic
 
-The compiler known as icc [ supplied with the OpenServer 5 Development 
+The compiler known as icc [ supplied with the OpenServer 5 Development
 System ] generates a working binary, but it takes forever to generate
 XEmacs.  ICC also whines more about the code than /bin/cc does.  I do
 believe all its whining is legitimate, however.    Note that you do
 	  --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
 	  --with-xpm --with-xface --with-sound=nas --dynamic --compiler="icc"
 
-NOTE I have the xpm, xface, and audio libraries and includes in 
+NOTE I have the xpm, xface, and audio libraries and includes in
 	/usr/local/lib, /usr/local/include.  If you don't have these,
 	don't include the "--with-*" arguments in any of my examples.
 
-In previous versions of XEmacs, you had to override the defaults while 
+In previous versions of XEmacs, you had to override the defaults while
 compiling font-lock.o and extents.o when building with icc.  This seems
 to no longer be true, but I'm including this old information in case it
 resurfaces.  The process I used was:
 
-	make -k    
-	[ procure pizza, beer, repeat ] 
+	make -k
+	[ procure pizza, beer, repeat ]
 	cd src
 	make CC="icc -W0,-mP1COPT_max_tree_size=3000" font-lock.o extents.o
 	make LD=icc
 
-If you want sound support, get the tls566 supplement from 
-ftp.sco.com:/TLS or any of its mirrors.  It works just groovy 
+If you want sound support, get the tls566 supplement from
+ftp.sco.com:/TLS or any of its mirrors.  It works just groovy
 with XEmacs.
 
 The M-x manual-entry is known not to work.  If you know Lisp and would
 like help in making it work, e-mail me at <robertl@dgii.com>.
 (UNCHECKED for 19.15 -- it might work).
 
-In earlier releases, gnuserv/gnuclient/gnudoit would open a frame 
+In earlier releases, gnuserv/gnuclient/gnudoit would open a frame
 just fine, but the client would lock up and the server would
-terminate when you used C-x # to close the frame.   This is now 
+terminate when you used C-x # to close the frame.   This is now
 fixed in XEmacs.
 
 In etc/ there are two files of note. emacskeys.sco and emacsstrs.sco.
 
 *** The XEmacs executable crashes at startup.
 
-This can be caused by many things.  
+This can be caused by many things.
 
 If you are running with X11 you need to have cygwin b19 or cygwin
 b20.1 or greater, cygwin b20 will not work.
 
 Try evaluating the form (setq lock-directory nil) and see if that helps.
 There is a problem with file-locking on some systems (possibly related
-to NFS) that I don't understand.  Please send mail to the address 
+to NFS) that I don't understand.  Please send mail to the address
 xemacs@xemacs.org if you figure this one out.
 
 *** When emacs starts up, I get lots of warnings about unknown keysyms.
 If you are running the prebuilt binaries, the Motif library expects to find
 certain thing in the XKeysymDB file.  This file is normally in /usr/lib/X11/
 or in /usr/openwin/lib/.  If you keep yours in a different place, set the
-environment variable $XKEYSYMDB to point to it before starting emacs.  If 
-you still have the problem after doing that, perhaps your version of X is 
+environment variable $XKEYSYMDB to point to it before starting emacs.  If
+you still have the problem after doing that, perhaps your version of X is
 too old.  There is a copy of the MIT X11R5 XKeysymDB file in the emacs `etc'
 directory.  Try using that one.
 
 *** My X resources used to work, and now some of them are being ignored.
 
 Check the resources in .../etc/Emacs.ad (which is the same as the file
-sample.Xdefaults).  Perhaps some of the default resources built in to 
+sample.Xdefaults).  Perhaps some of the default resources built in to
 emacs are now overriding your existing resources.  Copy and edit the
 resources in Emacs.ad as necessary.
 
 XEmacs has fairly new TTY redisplay support (beginning from 19.12),
 which doesn't include some basic TTY optimizations -- like using
 scrolling regions to move around blocks of text.  This is why
-redisplay on the traditional terminals, or over slow lines can be very 
+redisplay on the traditional terminals, or over slow lines can be very
 slow.
 
 If you are interested in fixing this, please let us know at
 
     if ($?EMACS) then
         if ($EMACS == "t") then
-            unset edit 
+            unset edit
             stty  -icrnl -onlcr -echo susp ^Z
         endif
     endif
 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 
+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.
 Also make sure that the `/etc/host.conf' files contains the following
 lines:
 
-    order hosts, bind 
+    order hosts, bind
     multi on
 
 Any changes, permanent and temporary, to the host name should be
 The solution is to add a pair of quotes around `tty` to make it a
 single word:
 
-if (`tty` == "/dev/console") 
+if (`tty` == "/dev/console")
 
 should be changed to:
 
-if ("`tty`" == "/dev/console") 
+if ("`tty`" == "/dev/console")
 
 Even better, move things that set up terminal sections out of .cshrc
 and into .login.
 and testers.  It probably doesn't work.
 
 ** There are no `native XEmacs' TUTORIALs for any Asian languages,
-including Japanese.  FSF Emacs and XEmacs tutorials are quite similar, 
+including Japanese.  FSF Emacs and XEmacs tutorials are quite similar,
 so it should be sufficient to skim through the differences and apply
 them to the Japanese version.
 
 * Changes in XEmacs 21.2
 ========================
 
+** The modeline's text is now scrollable. Please refer to the variable
+`modeline-scrolling-method' for more information.
+
 ** The delete key now deletes forward by default.
 
 This is regulated by the variable `delete-key-deletes-forward', which

File lib-src/ChangeLog

+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.

File lisp/ChangeLog

+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
+2001-01-12  Andy Piper  <andy@xemacs.org>
+
+	* package-get.el (package-get-custom): call
+	package-net-update-installed-db.
+
+	* package-ui.el (pui-install-selected-packages): call
+	package-net-update-installed-db.
+
+	* package-net.el (package-net-update-installed-db): use
+	packages-package-list so that we reflect reality.
+
+	* packages.el (packages-package-list): Make docstring reflect
+	reality.
+
+	* package-net.el (package-net-convert-index-to-ini): exclude mule entries.
+
+	* postinstall.cc (do_postinstall): don't pick up shells if cygwin
+	isn't installed.
+
+2001-01-17  Andy Piper  <andy@xemacs.org>
+
+	* wid-edit.el (widget-activation-glyph-mapper): activate or
+	deactivate native widgets.
+	(widget-glyph-insert-glyph): record instantiator.
+	(widget-push-button-value-create): use it.
+
+	* gui.el (gui-button-action): new function. Make button's domain
+	buffer current when calling.
+	(make-gui-button): update to use gui-button-action.
+
+2001-01-16  Didier Verna  <didier@xemacs.org>
+
+	* menubar-items.el (default-menubar): add an entry for modeline
+	horizontal scrolling in Options -> Display.
+
+2001-01-17  Steve Youngs  <youngs@xemacs.org>
+
+	* package-get.el (package-get-require-signed-base): Set to nil
+	by default.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.
       (set-face-foreground 'gui-button-face '(((x color) . "black")
 					      ((mswindows color) . "black")))))
 
+
+(defun gui-button-action (instance action user-data)
+  (let ((domain (image-instance-domain instance)))
+    (with-current-buffer (if (windowp domain)
+			     (window-buffer domain) nil)
+      (funcall action user-data))))
+
 (defun make-gui-button (string &optional action user-data)
   "Make a GUI button whose label is STRING and whose action is ACTION.
 If the button is inserted in a buffer and then clicked on, and ACTION
-is non-nil, ACTION will be called with one argument, USER-DATA."
+is non-nil, ACTION will be called with one argument, USER-DATA.
+When ACTION is called, the buffer containing the button is made current."
   (vector 'button
 	  :descriptor string
 	  :face 'gui-button-face
-	  :callback `(funcall (quote ,action) (quote ,user-data))))
+	  :callback-ex `(lambda (image-instance event)
+			  (gui-button-action image-instance
+					     (quote ,action)
+					     (quote ,user-data)))))
 
 (defun insert-gui-button (button &optional pos buffer)
   "Insert GUI button BUTTON at POS in BUFFER."

File lisp/menubar-items.el

        ;; hack-o-matic, we can't force a load of package-base here
        ;; since it triggers dialog box interactions which we can't
        ;; deal with while using a menu
-       ("Using %_Custom" 
+       ("Using %_Custom"
 	:filter (lambda (&rest junk)
 		  (if package-get-base
 		      (submenu-generate-accelerator-spec
 		       (cdr (custom-menu-create 'packages)))
 		    '("Please load Package Index"))))
-       
+
        ["%_Help" (Info-goto-node "(xemacs)Packages")])
       ("%_Internet"
        ["Read Mail %_1 (VM)..." vm
 			(eq browse-url-browser-function 'browse-url-grail))
 	 :active (and (boundp 'browse-url-browser-function)
 		      (fboundp 'browse-url-grail))]
-	["%_Kfm" 
+	["%_Kfm"
 	 (customize-set-variable 'browse-url-browser-function
 				 'browse-url-kfm)
 	 :style radio
 			(eq browse-url-browser-function 'browse-url-kfm))
 	 :active (and (boundp 'browse-url-browser-function)
 		      (fboundp 'browse-url-kfm))]
-	))      
+	))
       ("%_Troubleshooting"
        ["%_Debug on Error"
 	(customize-set-variable 'debug-on-error (not debug-on-error))
 					(not scrollbars-visible-p))
 		:style toggle
 		:selected scrollbars-visible-p]))
-       ["%_3D Modeline"
-	(customize-set-variable 'modeline-3d-p
-				(not modeline-3d-p))
-	:style toggle
-	:selected modeline-3d-p]
        ["%_Wrap Long Lines"
 	(progn;; becomes buffer-local
 	  (setq truncate-lines (not truncate-lines))
 	  (customize-set-variable 'truncate-lines truncate-lines))
 	:style toggle
 	:selected (not truncate-lines)]
+       "----"
+       ["%_3D Modeline"
+	(customize-set-variable 'modeline-3d-p
+				(not modeline-3d-p))
+	:style toggle
+	:selected modeline-3d-p]
+       ("Modeline %_Horizontal Scrolling"
+	["%_None"
+	 (customize-set-variable 'modeline-scrolling-method nil)
+	 :style radio
+	 :selected (not modeline-scrolling-method)]
+	["As %_Text"
+	 (customize-set-variable 'modeline-scrolling-method t)
+	 :style radio
+	 :selected (eq modeline-scrolling-method t)]
+	["As %_Scrollbar"
+	 (customize-set-variable 'modeline-scrolling-method 'scrollbar)
+	 :style radio
+	 :selected (eq modeline-scrolling-method 'scrollbar)]
+	)
        ,@(if (featurep 'toolbar)
 	     '("---"
 	       ["%_Toolbars Visible"
 				  (not column-number-mode))
 	  (redraw-modeline))
 	:style toggle :selected column-number-mode]
-       
+
        ("\"Other %_Window\" Location"
 	["%_Always in Same Frame"
 	 (customize-set-variable
 	 :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
 	 :active (boundp 'gnuserv-frame)]
 	)
-       )      
+       )
       ("%_Menubars"
        ["%_Frame-Local Font Menu"
 	(customize-set-variable 'font-menu-this-frame-only-p

File lisp/package-get.el

   :type 'boolean
   :group 'package-get)
 
-(defcustom package-get-require-signed-base-updates t
+(defcustom package-get-require-signed-base-updates nil
   "*If set to a non-nil value, require explicit user confirmation for updates
 to the package-get database which cannot have their signature verified via PGP.
 When nil, updates which are not PGP signed are allowed without confirmation."
 	    (if (eval (intern (concat (symbol-name (car pkg)) "-package")))
 		(package-get (car pkg) nil))
 	    t)
-	  package-get-base))
+	  package-get-base)
+  (package-net-update-installed-db))
 
 (defun package-get-ever-installed-p (pkg &optional notused)
   (string-match "-package$" (symbol-name pkg))

File lisp/package-net.el

   "Write out the installed package index in a net install suitable format.
 If DESTDIR is non-nil then use that as the destination directory. 
 DESTDIR defaults to the value of `package-net-setup-directory'."
-  ;; Need the local version
-  (package-get-require-base)
 
-  (setq destdir (file-name-as-directory 
-		 (or destdir (package-net-setup-directory))))
-  (let ((buf (get-buffer-create "*installed.db*")))
-    (unwind-protect
-        (save-excursion
-          (set-buffer buf)
-          (erase-buffer buf)
-          (goto-char (point-min))
-          (let ((entries package-get-base) entry plist)
-	    (while entries
-	      (setq entry (car entries))
-	      (setq plist (car (cdr entry)))
-	      (insert (format "%s %s %s\n" (symbol-name (car entry))
-			      (plist-get plist 'filename)
-			      (plist-get plist 'size)))
-	      (setq entries (cdr entries))))
-	  (make-directory-path destdir)
-	  (write-region (point-min) (point-max) (concat destdir "installed.db")))
-      (kill-buffer buf))))
+  (when (or (eq system-type 'cygwin32)
+	    (eq system-type 'window-nt))
+    (setq destdir (file-name-as-directory 
+		   (or destdir (package-net-setup-directory))))
+    (let ((buf (get-buffer-create "*installed.db*")))
+      (unwind-protect
+	  (save-excursion
+	    (set-buffer buf)
+	    (erase-buffer buf)
+	    (goto-char (point-min))
+	    ;; we use packages-package-list here as we actually want to
+	    ;; update relative to the installed reality
+	    (let ((entries packages-package-list) entry version)
+	      (while entries
+		(setq entry (car entries))
+		(setq version (plist-get (cdr entry) :version))
+		;; Unfortunately we can't read the size from this
+		(insert (format "%s %s-%3.2f-pkg.tar.gz 0\n" (symbol-name (car entry))
+				(symbol-name (car entry))
+				version))
+		(setq entries (cdr entries))))
+	    (make-directory-path destdir)
+	    (write-region (point-min) (point-max) (concat destdir "installed.db")))
+	(kill-buffer buf)))))
 
 (defun package-net-convert-download-sites-to-mirrors (&optional destdir)
   "Write out the download site list in a net install suitable format.

File lisp/package-ui.el

       (if pui-deleted-packages
 	  (pui-list-packages)
 	(error "No packages have been selected!")))
+    ;; sync with windows type systems
+    (package-net-update-installed-db)
     ))
 
 (defun pui-add-required-packages ()

File lisp/packages.el

 ;;; Package versioning
 
 (defvar packages-package-list nil
-  "Database of loaded packages and version numbers")
+  "Database of installed packages and version numbers")
 
 (defvar packages-hierarchy-depth 1
   "Depth of package hierarchies.")

File lisp/wid-edit.el

       (let* ((glyph-widget (extent-property extent 'glyph-widget))
 	     (up-glyph (widget-get glyph-widget :glyph-up))
 	     (inactive-glyph (widget-get glyph-widget :glyph-inactive))
+	     (instantiator (widget-get glyph-widget :glyph-instantiator))
 	     (new-glyph (if activate-p up-glyph inactive-glyph)))
+	(cond
+	 ;; Assume that an instantiator means a native widget.
+	 (instantiator
+	  (setq instantiator
+		(set-instantiator-property instantiator :active activate-p))
+	  (widget-put glyph-widget :glyph-instantiator instantiator)
+	  (set-glyph-image up-glyph instantiator))
 	 ;; Check that the new glyph exists, and differs from the
 	 ;; default one.
-	(and up-glyph inactive-glyph (not (eq up-glyph inactive-glyph))
-	     ;; Check if the glyph is already installed.
-	     (not (eq (extent-end-glyph extent) new-glyph))
-	     ;; Change it.
-	     (set-extent-end-glyph extent new-glyph)))))
+	 ((and up-glyph inactive-glyph (not (eq up-glyph inactive-glyph))
+	       ;; Check if the glyph is already installed.
+	       (not (eq (extent-end-glyph extent) new-glyph)))
+	  ;; Change it.
+	  (set-extent-end-glyph extent new-glyph))))))
   nil)
 
 (defun widget-specify-inactive (widget from to)
       (insert tag))
     glyph))
 
-(defun widget-glyph-insert-glyph (widget glyph &optional down inactive)
+(defun widget-glyph-insert-glyph (widget glyph &optional down inactive
+					 instantiator)
   "In WIDGET, insert GLYPH.
 If optional arguments DOWN and INACTIVE are given, they should be
-glyphs used when the widget is pushed and inactive, respectively."
+glyphs used when the widget is pushed and inactive, respectively.
+INSTANTIATOR is the vector used to create the glyph."
   (insert "*")
   (let ((extent (make-extent (point) (1- (point))))
 	(help-echo (and widget (widget-get widget :help-echo)))
   (when widget
     (widget-put widget :glyph-up glyph)
     (when down (widget-put widget :glyph-down down))
+    (when instantiator (widget-put widget :glyph-instantiator instantiator))
     (when inactive (widget-put widget :glyph-inactive inactive))))
 
 
 	 (tag-glyph (widget-get widget :tag-glyph))
 	 (text (concat widget-push-button-prefix
 		       tag widget-push-button-suffix))
-	 gui)
+	 gui inst)
     (cond (tag-glyph
 	   (widget-glyph-insert widget text tag-glyph))
 	  ;; We must check for console-on-window-system-p here,
 	  ((and widget-push-button-gui
 		(console-on-window-system-p))
 	   (let* ((gui-button-shadow-thickness 1))
-	     (setq gui (make-glyph 
-			(make-gui-button tag 'widget-gui-action widget))))
-	   (widget-glyph-insert-glyph widget gui))
+	     (setq inst (make-gui-button tag 'widget-gui-action widget))
+	     (setq gui (make-glyph inst)))
+	   (widget-glyph-insert-glyph widget gui nil nil inst))
 	  (t
 	   (insert text)))))
 

File lwlib/ChangeLog

+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.

File man/ChangeLog

+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
+2001-01-18  Martin Buchholz  <martin@xemacs.org>
+
+	* xemacs-faq.texi (Q1.0.11): Change XEmacs for MacOS URL.
+
+2001-01-17  Andy Piper  <andy@xemacs.org>
+
+	* internals.texi: some glyph documentation.
+
+2001-01-16  Didier Verna  <didier@xemacs.org>
+
+	* frame.texi (Mode Line Basics): new node ...
+	* frame.texi (GUI Components): ... under this one ...
+	* frame.texi (Scrollbar Basics): ... after this one ...
+	* frame.texi (Toolbar Basics): ... before this one.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.
 
 2000-07-09  Martin Buchholz  <martin@xemacs.org>
 
-	* lispref/postgresql.texi: 
+	* lispref/postgresql.texi:
 	- Don't mention ".so" extension.
 	- Make installation instructions more generic.
 	- Mention M-x describe-installation.

File man/internals/internals.texi

 Glyphs are lazily instantiated by calling one of the glyph
 functions. This usually occurs within redisplay when
 @code{Fglyph_height} is called. Instantiation causes an image-instance
-to be created and cached. This cache is on a device basis for all glyphs
-except glyph-widgets, and on a window basis for glyph widgets.  The
+to be created and cached. This cache is on a per-device basis for all glyphs
+except widget-glyphs, and on a per-window basis for widgets-glyphs.  The
 caching is done by @code{image_instantiate} and is necessary because it
 is generally possible to display an image-instance in multiple
 domains. For instance if we create a Pixmap, we can actually display
 Any action on a glyph first consults the cache before actually
 instantiating a widget.
 
+@section Glyph Instantiation
+
+Glyph instantiation is a hairy topic and requires some explanation. The
+guts of glyph instantiation is contained within
+@code{image_instantiate}. A glyph contains an image which is a
+specifier. When a glyph function - for instance @code{Fglyph_height} -
+asks for a property of the glyph that can only be determined from its
+instantiated state, then the glyph image is instantiated and an image
+instance created. The instantiation process is governed by the specifier
+code and goes through a series of steps:
+
+@itemize @bullet
+@item
+Validation. Instantiation of image instances happens dynamically - often
+within the guts of redisplay. Thus it is often not feasible to catch
+instantiator errors at instantiation time. Instead the instantiator is
+validated at the time it is added to the image specifier. This function
+is defined by @code{image_validate} and at a simple level validates
+keyword value pairs.
+@item
+Duplication. The specifier code by default takes a copy of the
+instantiator. This is reasonable for most specifiers but in the case of
+widget-glyphs can be problematic, since some of the properties in the
+instantiator - for instance callbacks - could cause infinite recursion
+in the copying process. Thus the image code defines a function -
+@code{image_copy_instantiator} - which will selectively copy values.
+This is controlled by the way that a keyword is defined either using
+@code{IIFORMAT_VALID_KEYWORD} or
+@code{IIFORMAT_VALID_NONCOPY_KEYWORD}. Note that the image caching and
+redisplay code relies on instantiator copying to ensure that current and
+new instantiators are actually different rather than referring to the
+same thing.
+@item
+Normalization. Once the instantiator has been copied it must be
+converted into a form that is viable at instantiation time. This can
+involve no changes at all, but typically involves things like converting
+file names to the actual data. This function is defined by
+@code{image_going_to_add} and @code{normalize_image_instantiator}.
+@item
+Instantiation. When an image instance is actually required for display
+it is instantiated using @code{image_instantiate}. This involves calling
+instantiate methods that are specific to the type of image being
+instantiated.
+@end itemize
+
+The final instantiation phase also involves a number of steps. In order
+to understand these we need to describe a number of concepts.
+
+An image is instantiated in a @dfn{domain}, where a domain can be any
+one of a device, frame, window or image-instance. The domain gives the
+image-instance context and identity and properties that affect the
+appearance of the image-instance may be different for the same glyph
+instantiated in different domains. An example is the face used to
+display the image-instance.
+
+Although an image is instantiated in a particular domain the
+instantiation domain is not necessarily the domain in which the
+image-instance is cached. For example a pixmap can be instantiated in a
+window be actually be cached on a per-device basis. The domain in which
+the image-instance is actually cached is called the
+@dfn{governing-domain}. A governing-domain is currently either a device
+or a window. Widget-glyphs and text-glyphs have a window as a
+governing-domain, all other image-instances have a device as the
+governing-domain. The governing domain for an image-instance is
+determined using the governing_domain image-instance method.
+
+@section Widget-Glyphs
+
 @section Widget-Glyphs in the MS-Windows Environment
 
 To Do
 so that different toolkits can be supported for widget-glyphs, just as
 they are supported for features such as menubars etc.
 
+Lwlib is extremely poorly documented and quite hairy so here is my
+understanding of what goes on.
+
+Lwlib maintains a set of widget_instances which mirror the hierarchical
+state of Xt widgets. I think this is so that widgets can be updated and
+manipulated generically by the lwlib library. For instance
+update_one_widget_instance can cope with multiple types of widget and
+multiple types of toolkit. Each element in the widget hierarchy is updated
+from its corresponding widget_instance by walking the widget_instance
+tree recursively.
+
+This has desirable properties such as lw_modify_all_widgets which is
+called from @file{glyphs-x.c} and updates all the properties of a widget
+without having to know what the widget is or what toolkit it is from.
+Unfortunately this also has hairy properties such as making the lwlib
+code quite complex. And of course lwlib has to know at some level what
+the widget is and how to set its properties.
+
 @node Specifiers, Menus, Glyphs, Top
 @chapter Specifiers
 

File man/xemacs-faq.texi

 @finalout
 @titlepage
 @title XEmacs FAQ
-@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/11/14 23:29:27 $
+@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2001/01/18 13:35:02 $
 @sp 1
 @author Tony Rossini <rossini@@biostat.washington.edu>
 @author Ben Wing <ben@@xemacs.org>
 
 Yes, there is a port of XEmacs 19.14, tested on MacOS 7.6.1 and MacOS
 8.5.1 by @email{pjarvis@@ispchannel.com, Pitts Jarvis}.  It's available
-at @uref{http://my.ispchannel.com/~pjarvis/xemacs.html}.
+at @uref{http://homepage.mac.com/pjarvis/xemacs.html}.
 
 @node Q1.0.12, Q1.0.13, Q1.0.11, Introduction
 @unnumberedsubsec Q1.0.12: Is there a port of XEmacs to NextStep?

File man/xemacs/frame.texi

 running XEmacs under the X window system, that means you can have several
 @dfn{XEmacs windows} inside the X window that contains the XEmacs frame.
 You can even have multiple frames in different X windows, each with
-their own set of subwindows. 
+their own set of subwindows.
 @refill
 @end table
 
-Each XEmacs frame displays a variety of information: 
+Each XEmacs frame displays a variety of information:
 @itemize @bullet
 @item
 The biggest area usually displays the text you are editing.  It may
 consist of one window or of two or more windows if you need to look at two
-buffers a the same time. 
+buffers a the same time.
 @item
 Below each text window's last line is a @dfn{mode line} (@pxref{Mode
 Line}), which describes what is going on in that window.  The mode line
 
 
 @menu
-* Point::	        The place in the text where editing commands operate.  
-* Echo Area::           Short messages appear at the bottom of the frame.  
+* Point::	        The place in the text where editing commands operate.
+* Echo Area::           Short messages appear at the bottom of the frame.
 * Mode Line::	        Interpreting the mode line.
 * GUI Components::      Menubar, toolbars, gutters.
-* XEmacs under X::      Some information on using XEmacs under the X 
-                        Window System. 
+* XEmacs under X::      Some information on using XEmacs under the X
+                        Window System.
 * XEmacs under MS Windows:: Some information on using XEmacs under
                         Microsoft Windows.
 @end menu
 
   @var{ch} contains two stars (@samp{**}) if the text in the buffer has been
 edited (the buffer is ``modified''), or two dashes (@samp{--}) if the
-buffer has not been edited.  Exception: for a read-only buffer, it is 
+buffer has not been edited.  Exception: for a read-only buffer, it is
 @samp{%%}.
 
   @var{buf} is the name of the window's chosen @dfn{buffer}.  The chosen
 
   @var{pos} tells you whether there is additional text above the top of
 the screen or below the bottom.  If your file is small and it is
-completely visible on the screen, @var{pos} is @samp{All}.  Otherwise, 
+completely visible on the screen, @var{pos} is @samp{All}.  Otherwise,
 @var{pos} is @samp{Top} if you are looking at the beginning of the file,
 @samp{Bot} if you are looking at the end of the file, or
 @samp{@var{nn}%}, where @var{nn} is the percentage of the file above the
 the terminal supports it); @code{nil} means no inverse video.  The
 default is @code{t}.  For X frames, simply set the foreground and
 background colors appropriately.
-  
+
 @node GUI Components, XEmacs under X, Mode Line, Frame
 @comment  node-name,  next,  previous,  up
 @section GUI Components
 @menu
 * Menubar Basics::      How XEmacs uses the menubar.
 * Scrollbar Basics::    How XEmacs uses scrollbars.
+* Mode Line Basics::    How XEmacs uses modelines.
 * Toolbar Basics::      How XEmacs uses toolbars.
 * Gutter Basics::       How XEmacs uses gutters.
 * Inhibiting::          What if you don't like GUI?
 detailed descriptions of these menus, @ref{Pull-down Menus}.  (In 21.2
 XEmacsen, the @samp{Mule} menu will be moved under @samp{Options}.)
 
-@node Scrollbar Basics, Toolbar Basics, Menubar Basics, GUI Components
+@node Scrollbar Basics, Mode Line Basics, Menubar Basics, GUI Components
 @comment  node-name,  next,  previous,  up
 @section XEmacs Scrollbars
 
 present in all windows (except the minibuffer), and there is no
 horizontal scrollbar.
 
-@node Toolbar Basics, Gutter Basics, Scrollbar Basics, GUI Components
+@node Mode Line Basics, Toolbar Basics, Scrollbar Basics, GUI Components
+@comment  node-name,  next,  previous,  up
+@section XEmacs Mode Lines
+
+When used in a windowing system, the XEmacs modelines can be dragged
+vertically. The effect is to resize the windows above and below the
+modeline (this includes the minibuffer window).
+
+Additionally, a modeline can be dragged horizontally, in which case it
+scrolls its own text. This behavior is not enabled by default because it
+could be considered as disturbing when dragging vertically. When this
+behavior is enabled, the modeline's text can be dragged either in the
+same direction as the mouse, or in the opposite sense, making the
+modeline act as a scrollbar for its own text.
+
+You can select the behavior you want from the @samp{Display} submenu of
+the @samp{Options} menu.
+
+@node Toolbar Basics, Gutter Basics, Mode Line Basics, GUI Components
 @comment  node-name,  next,  previous,  up
 @section XEmacs Toolbars
 
 You can specify a different default frame size other than the one provided.
 Use the variable @code{default-frame-alist}, which is an alist of default
 values for frame creation other than the first one.  These may be set in
-your init file, like this:  
+your init file, like this:
 
 @example
   (setq default-frame-alist '((width . 80) (height . 55)))
 is called with one argument, the frame just created.
 
 If you want to close one or more of the X windows you created using
-@b{New Frame}, use the @b{Delete Frame} menu item from the @b{File} menu.  
+@b{New Frame}, use the @b{Delete Frame} menu item from the @b{File} menu.
 
 @vindex frame-title-format
 @vindex frame-icon-title-format
 
 Where possible, native MS Windows GUI components and capabilities are
 used in XEmacs.
-

File netinstall/ChangeLog

+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
+2001-01-17  Andy Piper  <andy@xemacs.org>
+
+	* ini.h: move extern "C" to aid win32 compilation. From Fabrice
+	Popineau.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.
 
 	* all: port from cygwin setup.
 
-%%% $Id: ChangeLog,v 1.1.2.10 2001/01/17 05:22:58 martinb Exp $
-$Revision: 1.1.2.10 $
+%%% $Id: ChangeLog,v 1.1.2.12 2001/01/20 07:42:55 martinb Exp $
+$Revision: 1.1.2.12 $

File netinstall/ini.h

   } info[NTRUST+1];	/* +1 for TRUST_UNKNOWN */
 } Package;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern Package *package;
 extern Package *xemacs_package;
 
 extern int npackages;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 Package *new_package (char *name);
 void	ini_init (char *string);
 

File nt/ChangeLog

+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.
   run -nd -batch -l ../lisp/update-elc.el
 }
 
-document dump-temacs << 'end'
-Usage: dump-temacs
+document dmp << 'end'
+Usage: dmp
 Run the dumping part of the build procedure.
 Use when debugging temacs, not xemacs!
 Use this when temacs builds successfully, but xemacs does not.
 end
 
-function dump-temacs {
+function dmp {
   environment-to-run-temacs
   run -nd -batch -l ../lisp/loadup.el dump
 }

File src/.gdbinit

 Use this when temacs builds successfully, but xemacs does not.
 end
 
-define dump-temacs
+define dmp
   environment-to-run-temacs
   run -nd -batch -l ../lisp/loadup.el dump
 end
 
-document dump-temacs
-Usage: dump-temacs
+document dmp
+Usage: dmp
 Run the dumping part of the build procedure.
 Use when debugging temacs, not xemacs!
 Use this when temacs builds successfully, but xemacs does not.

File src/ChangeLog

+2001-01-20  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.42 "Poseidon" is released.
+
+2001-01-20  Martin Buchholz  <martin@xemacs.org>
+
+	* console-x.h: typo fix du jour.  Remove #if 0'ed code.
+
+2001-01-19  Martin Buchholz  <martin@xemacs.org>
+
+	De-kludgify FIXED_TYPE free list frobbing.
+	Fix crashes on 64-bit platforms introduced by my patch of 2001-01-13.
+	* alloc.c (DECLARE_FIXED_TYPE_ALLOC): Use Lisp_Free.
+	* alloc.c (ALLOCATE_FIXED_TYPE_1): Use new definitions.
+	* alloc.c (Lisp_Free): New pseudo lisp object definition.
+	* alloc.c (LRECORD_FREE_P): New.
+	* alloc.c (MARK_LRECORD_AS_FREE): New.
+	* alloc.c (MARK_LRECORD_AS_NOT_FREE): New.
+	* alloc.c (STRUCT_FREE_P): Deleted.
+	* alloc.c (MARK_STRUCT_AS_FREE): Deleted.
+	* alloc.c (MARK_STRUCT_AS_NOT_FREE): Deleted.
+	* alloc.c (STRING_CHARS_FREE_P): New.
+	* alloc.c (MARK_STRING_CHARS_AS_FREE): New.
+	* alloc.c (PUT_FIXED_TYPE_ON_FREE_LIST): Use new definitions.
+	* alloc.c (FREE_FIXED_TYPE): Use new definitions.
+	* alloc.c (STRING_CHARS_FREE_P): Use new definitions.
+	* alloc.c (resize_string): Use new definitions.
+	* alloc.c (SWEEP_FIXED_TYPE_BLOCK): Use new definitions.
+	* alloc.c (verify_string_chars_integrity): Use new definitions.
+	* alloc.c (compact_string_chars): Use new definitions.
+	* alloc.c: Update monster comments.
+	* lrecord.h (lrecord_type): Add some new lrecord types for
+	alloc.c's use.
+
+2001-01-18  Martin Buchholz  <martin@xemacs.org>
+
+	Improve alignment hackery.
+	* lisp.h (ALIGNOF): Better definition for the non-gcc case.
+	(max_align_t): Moved from opaque.h - general purpose.
+	(ALIGN_PTR): Use size_t, not long.
+	* opaque.h (max_align_t): Move to lisp.h.
+
+2001-01-18  Norbert Koch  <nk@LF.net>
+
+	* gui.h: Fix and add prototypes to fix build problems.
+
+2001-01-18  Martin Buchholz  <martin@xemacs.org>
+
+	temacs is going away, so `dump-temacs' is now a bad name.
+	* .dbxrc (dump-temacs): Rename to `dmp'.
+	* .gdbinit (dump-temacs): Rename to `dmp'.
+
+2001-01-17  Andy Piper  <andy@xemacs.org>
+
+	* glyphs.c (print_image_instance): comment to make martin happy.
+
+	* glyphs-x.c (x_redisplay_widget): update faces after a frame
+	change.
+
+	* glyphs-msw.c (mswindows_redisplay_widget): add code to cope with
+	activation.
+	(mswindows_tab_control_redisplay): warning suppression.
+
+	* glyphs-widget.c (widget_update): re-write to cope with updated
+	items.
+	(widget_instantiate): use new gui_item functions.
+	(tab_control_update): deleted.
+	(progress_gauge_update): deleted.
+	(image_instantiator_progress_guage): take out update reference.
+	(image_instantiator_tree_view): ditto.
+	(image_instantiator_tab_control): ditto.
+
+	* gui.c (widget_gui_parse_item_keywords): new function. Do things
+	Right the new way.
+	(gui_item_add_keyval_pair): re-write to cope with descriptors and
+	return whether anything was changed.
+	(update_gui_item_keywords): as it sounds.
+
+	* gui.h: declare widget_gui_parse_item_keywords.
+
+	* fns.c (safe_copy_tree): new function taken from Fcopy_tree.
+	(Fcopy_tree): use it. Stops infloop death in bogus instantiators.
+
 2001-01-17  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.41 "Polyhymnia" is released.
    currently executing functions; the gcpro list; etc.) and
    recursively marking all objects that are accessible.
 
-   At the beginning of the sweep stage, the conses in the cons
-   blocks are in one of three states: in use and marked, in use
-   but not marked, and not in use (already freed).  Any conses
-   that are marked have been marked in the mark stage just
-   executed, because as part of the sweep stage we unmark any
-   marked objects.  The way we tell whether or not a cons cell
-   is in use is through the FREE_STRUCT_P macro.  This basically
-   looks at the first 4 bytes (or however many bytes a pointer
-   fits in) to see if all the bits in those bytes are 1.  The
-   resulting value (0xFFFFFFFF) is not a valid pointer and is
-   not a valid Lisp_Object.  All current fixed-size types have
-   a pointer or Lisp_Object as their first element with the
-   exception of strings; they have a size value, which can
-   never be less than zero, and so 0xFFFFFFFF is invalid for
-   strings as well.  Now assuming that a cons cell is in use,
-   the way we tell whether or not it is marked is to look at
-   the mark bit of its car (each Lisp_Object has one bit
-   reserved as a mark bit, in case it's needed).  Note that
-   different types of objects use different fields to indicate
-   whether the object is marked, but the principle is the same.
-
-   Conses on the free_cons_list are threaded through a pointer
-   stored in the bytes directly after the bytes that are set
-   to 0xFFFFFFFF (we cannot overwrite these because the cons
-   is still in a cons_block and needs to remain marked as
-   not in use for the next time that GC happens).  This
-   implies that all fixed-size types must be at least big
-   enough to store two pointers, which is indeed the case
-   for all current fixed-size types.
+   At the beginning of the sweep stage, the conses in the cons blocks
+   are in one of three states: in use and marked, in use but not
+   marked, and not in use (already freed).  Any conses that are marked
+   have been marked in the mark stage just executed, because as part
+   of the sweep stage we unmark any marked objects.  The way we tell
+   whether or not a cons cell is in use is through the LRECORD_FREE_P
+   macro.  This uses a special lrecord type `lrecord_type_free',
+   which is never associated with any valid object.
+
+   Conses on the free_cons_list are threaded through a pointer stored
+   in the conses themselves.  Because the cons is still in a
+   cons_block and needs to remain marked as not in use for the next
+   time that GC happens, we need room to store both the "free"
+   indicator and the chaining pointer.  So this pointer is stored
+   after the lrecord header (actually where C places a pointer after
+   the lrecord header; they are not necessarily contiguous).  This
+   implies that all fixed-size types must be big enough to contain at
+   least one pointer.  This is true for all current fixed-size types,
+   with the possible exception of Lisp_Floats, for which we define the
+   meat of the struct using a union of a pointer and a double to
+   ensure adequate space for the free list chain pointer.
 
    Some types of objects need additional "finalization" done
    when an object is converted from in use to not in use;
    WARNING: Things are in an extremely bizarre state when
    the ADDITIONAL_FREE_type macros are called, so beware!
 
-   When ERROR_CHECK_GC is defined, we do things differently
-   so as to maximize our chances of catching places where
-   there is insufficient GCPROing.  The thing we want to
-   avoid is having an object that we're using but didn't
-   GCPRO get freed by GC and then reallocated while we're
-   in the process of using it -- this will result in something
-   seemingly unrelated getting trashed, and is extremely
-   difficult to track down.  If the object gets freed but
-   not reallocated, we can usually catch this because we
-   set all bytes of a freed object to 0xDEADBEEF. (The
-   first four bytes, however, are 0xFFFFFFFF, and the next
-   four are a pointer used to chain freed objects together;
-   we play some tricks with this pointer to make it more
+   When ERROR_CHECK_GC is defined, we do things differently so as to
+   maximize our chances of catching places where there is insufficient
+   GCPROing.  The thing we want to avoid is having an object that
+   we're using but didn't GCPRO get freed by GC and then reallocated
+   while we're in the process of using it -- this will result in
+   something seemingly unrelated getting trashed, and is extremely
+   difficult to track down.  If the object gets freed but not
+   reallocated, we can usually catch this because we set most of the
+   bytes of a freed object to 0xDEADBEEF. (The lisp object type is set
+   to the invalid type `lrecord_type_free', however, and a pointer
+   used to chain freed objects together is stored after the lrecord
+   header; we play some tricks with this pointer to make it more
    bogus, so crashes are more likely to occur right away.)
 
    We want freed objects to stay free as long as possible,
 static struct type##_block *current_##type##_block;	\
 static int current_##type##_block_index;		\
 							\
-static structtype *type##_free_list;			\
-static structtype *type##_free_list_tail;		\
+static Lisp_Free *type##_free_list;			\
+static Lisp_Free *type##_free_list_tail;		\
 							\
 static void						\
 init_##type##_alloc (void)				\
    cell was not GC-protected and was getting collected before
    free_cons() was called. */
 
-#define ALLOCATE_FIXED_TYPE_1(type, structtype, result)			 \
-do									 \
-{									 \
-  if (gc_count_num_##type##_freelist >					 \
-      MINIMUM_ALLOWED_FIXED_TYPE_CELLS_##type) 				 \
-    {									 \
-      result = type##_free_list;					 \
-      /* Before actually using the chain pointer, we complement all its	 \
-         bits; see FREE_FIXED_TYPE(). */				 \
-      type##_free_list =						 \
-        (structtype *) ~(unsigned long)					 \
-          (* (structtype **) ((char *) result + sizeof (void *)));	 \
-      gc_count_num_##type##_freelist--;					 \
-    }									 \
-  else									 \
-    ALLOCATE_FIXED_TYPE_FROM_BLOCK (type, result);			 \
-  MARK_STRUCT_AS_NOT_FREE (result);					 \
-} while (0)
-
-#else /* !ERROR_CHECK_GC */
-
-#define ALLOCATE_FIXED_TYPE_1(type, structtype, result)		\
-do								\
-{								\
-  if (type##_free_list)						\
+#define ALLOCATE_FIXED_TYPE_1(type, structtype, result) do {	\
+  if (gc_count_num_##type##_freelist >				\
+      MINIMUM_ALLOWED_FIXED_TYPE_CELLS_##type)			\
     {								\
-      result = type##_free_list;				\
-      type##_free_list =					\
-        * (structtype **) ((char *) result + sizeof (void *));	\
+      result = (structtype *) type##_free_list;			\
+      /* Before actually using the chain pointer,		\
+	 we complement all its bits; see FREE_FIXED_TYPE(). */	\
+      type##_free_list = (Lisp_Free *)				\
+	(~ (EMACS_UINT) (type##_free_list->chain));		\
+      gc_count_num_##type##_freelist--;				\
     }								\
   else								\
     ALLOCATE_FIXED_TYPE_FROM_BLOCK (type, result);		\
-  MARK_STRUCT_AS_NOT_FREE (result);				\
+  MARK_LRECORD_AS_NOT_FREE (result);				\
 } while (0)
 
+#else /* !ERROR_CHECK_GC */
+
+#define ALLOCATE_FIXED_TYPE_1(type, structtype, result) do {	\
+  if (type##_free_list)						\
+    {								\
+      result = (structtype *) type##_free_list;			\
+      type##_free_list = type##_free_list->chain;		\
+    }								\
+  else								\
+    ALLOCATE_FIXED_TYPE_FROM_BLOCK (type, result);		\
+  MARK_LRECORD_AS_NOT_FREE (result);				\
+} while (0)
+
 #endif /* !ERROR_CHECK_GC */
 
+
 #define ALLOCATE_FIXED_TYPE(type, structtype, result)	\
 do							\
 {							\
   NOSEEUM_INCREMENT_CONS_COUNTER (sizeof (structtype), #type);	\
 } while (0)
 
-/* INVALID_POINTER_VALUE should be a value that is invalid as a pointer
-   to a Lisp object and invalid as an actual Lisp_Object value.  We have
-   to make sure that this value cannot be an integer in Lisp_Object form.
-   0xFFFFFFFF could be so on a 64-bit system, so we extend it to 64 bits.
-   On a 32-bit system, the type bits will be non-zero, making the value
-   be a pointer, and the pointer will be misaligned.
-
-   Even if Emacs is run on some weirdo system that allows and allocates
-   byte-aligned pointers, this pointer is at the very top of the address
-   space and so it's almost inconceivable that it could ever be valid. */
-
-#if INTBITS == 32
-# define INVALID_POINTER_VALUE 0xFFFFFFFF
-#elif INTBITS == 48
-# define INVALID_POINTER_VALUE 0xFFFFFFFFFFFF
-#elif INTBITS == 64
-# define INVALID_POINTER_VALUE 0xFFFFFFFFFFFFFFFF
+
+/* Lisp_Free is the type to represent a free list member inside a frob
+   block of any lisp object type.  */
+typedef struct Lisp_Free
+{
+  struct lrecord_header lheader;
+  struct Lisp_Free *chain;
+} Lisp_Free;
+
+#define LRECORD_FREE_P(ptr) \
+((ptr)->lheader.type == lrecord_type_free)
+
+#define MARK_LRECORD_AS_FREE(ptr) \
+((void) ((ptr)->lheader.type = lrecord_type_free))
+
+#ifdef ERROR_CHECK_GC
+#define MARK_LRECORD_AS_NOT_FREE(ptr) \
+((void) ((ptr)->lheader.type = lrecord_type_undefined))
 #else
-You have some weird system and need to supply a reasonable value here.
+#define MARK_LRECORD_AS_NOT_FREE(ptr) DO_NOTHING
 #endif
 
-/* The construct (* (void **) (ptr)) would cause aliasing problems
-   with modern optimizing compilers like `gcc -O3 -fstrict-aliasing'.
-   But `char *' can legally alias any pointer.  Hence this union trick...
-
-   It turned out that the union trick was not good enough for xlC -O3;
-   and it is questionable whether it really complies with the C standard.
-   so we use memset instead, which should be safe from optimizations. */
-typedef union { char c; void *p; } *aliasing_voidpp;
-#define ALIASING_VOIDPP_DEREFERENCE(ptr) \
-  (((aliasing_voidpp) (ptr))->p)
-#define FREE_STRUCT_P(ptr) \
-  (ALIASING_VOIDPP_DEREFERENCE (ptr) == (void *) INVALID_POINTER_VALUE)
-#define MARK_STRUCT_AS_FREE(ptr) memset (ptr, 0xff, sizeof (void *))
-#define MARK_STRUCT_AS_NOT_FREE(ptr) memset (ptr, 0x00, sizeof (void *))
-
 #ifdef ERROR_CHECK_GC
 
-#define PUT_FIXED_TYPE_ON_FREE_LIST(type, structtype, ptr)		\
-do { if (type##_free_list_tail)						\
-       {								\
-	 /* When we store the chain pointer, we complement all		\
-	    its bits; this should significantly increase its		\
-	    bogosity in case someone tries to use the value, and	\
-	    should make us dump faster if someone stores something	\
-	    over the pointer because when it gets un-complemented in	\
-	    ALLOCATED_FIXED_TYPE(), the resulting pointer will be	\
-	    extremely bogus. */						\
-	 * (structtype **)						\
-	   ((char *) type##_free_list_tail + sizeof (void *)) =		\
-	     (structtype *) ~(unsigned long) ptr;			\
-       }								\
-     else								\
-       type##_free_list = ptr;						\
-     type##_free_list_tail = ptr;					\
-   } while (0)
+#define PUT_FIXED_TYPE_ON_FREE_LIST(type, structtype, ptr) do {	\
+  if (type##_free_list_tail)					\
+    {								\
+      /* When we store the chain pointer, we complement all	\
+	 its bits; this should significantly increase its	\
+	 bogosity in case someone tries to use the value, and	\
+	 should make us crash faster if someone overwrites the	\
+	 pointer because when it gets un-complemented in	\
+	 ALLOCATED_FIXED_TYPE(), the resulting pointer will be	\
+	 extremely bogus. */					\
+      type##_free_list_tail->chain =				\
+	(Lisp_Free *) ~ (EMACS_UINT) (ptr);			\
+    }								\
+  else								\
+    type##_free_list = (Lisp_Free *) (ptr);			\
+  type##_free_list_tail = (Lisp_Free *) (ptr);			\
+} while (0)
 
 #else /* !ERROR_CHECK_GC */
 
-#define PUT_FIXED_TYPE_ON_FREE_LIST(type, structtype, ptr)	\
-do { * (structtype **) ((char *) (ptr) + sizeof (void *)) =	\
-       type##_free_list;					\
-     type##_free_list = (ptr);					\
-   } while (0)
+#define PUT_FIXED_TYPE_ON_FREE_LIST(type, structtype, ptr) do {	\
+  ((Lisp_Free *) (ptr))->chain = type##_free_list;		\
+  type##_free_list = (Lisp_Free *) (ptr);			\
+} while (0)							\
 
 #endif /* !ERROR_CHECK_GC */
 
   ADDITIONAL_FREE_##type (FFT_ptr);				\
   deadbeef_memory (FFT_ptr, sizeof (structtype));		\
   PUT_FIXED_TYPE_ON_FREE_LIST (type, structtype, FFT_ptr);	\
-  MARK_STRUCT_AS_FREE (FFT_ptr);				\
+  MARK_LRECORD_AS_FREE (FFT_ptr);				\
 } while (0)
 
 /* Like FREE_FIXED_TYPE() but used when we are explicitly
 #define BIG_STRING_FULLSIZE_P(fullsize) ((fullsize) >= STRING_CHARS_BLOCK_SIZE)
 #define BIG_STRING_SIZE_P(size) (BIG_STRING_FULLSIZE_P (STRING_FULLSIZE(size)))
 
+#define STRING_CHARS_FREE_P(ptr) ((ptr)->string == NULL)
+#define MARK_STRING_CHARS_AS_FREE(ptr) ((void) ((ptr)->string = NULL))
+
 struct string_chars
 {
   Lisp_String *string;
 	    /* Sanity check to make sure we aren't hosed by strange
 	       alignment/padding. */
 	    assert (old_s_chars->string == s);
-	    MARK_STRUCT_AS_FREE (old_s_chars);
+	    MARK_STRING_CHARS_AS_FREE (old_s_chars);
 	    ((struct unused_string_chars *) old_s_chars)->fullsize =
 	      oldfullsize;
 	  }
 	{								\
 	  obj_type *SFTB_victim = &(SFTB_current->block[SFTB_iii]);	\
 									\
-	  if (FREE_STRUCT_P (SFTB_victim))				\
+	  if (LRECORD_FREE_P (SFTB_victim))				\
 	    {								\
 	      num_free++;						\
 	    }								\
     {										\
       int SFTB_iii;								\
       int SFTB_empty = 1;							\
-      obj_type *SFTB_old_free_list = typename##_free_list;			\
+      Lisp_Free *SFTB_old_free_list = typename##_free_list;			\
 										\
       for (SFTB_iii = 0; SFTB_iii < SFTB_limit; SFTB_iii++)			\
 	{									\
 	  obj_type *SFTB_victim = &(SFTB_current->block[SFTB_iii]);		\
 										\
-	  if (FREE_STRUCT_P (SFTB_victim))					\
+	  if (LRECORD_FREE_P (SFTB_victim))					\
 	    {									\
 	      num_free++;							\
 	      PUT_FIXED_TYPE_ON_FREE_LIST (typename, obj_type, SFTB_victim);	\
 	  int size;
 	  int fullsize;
 
-	  /* If the string_chars struct is marked as free (i.e. the STRING
-	     pointer is 0xFFFFFFFF) then this is an unused chunk of string
-             storage. (See below.) */
-
-	  if (FREE_STRUCT_P (s_chars))
+	  /* If the string_chars struct is marked as free (i.e. the
+	     STRING pointer is NULL) then this is an unused chunk of
+	     string storage. (See below.) */
+
+	  if (STRING_CHARS_FREE_P (s_chars))
 	    {
 	      fullsize = ((struct unused_string_chars *) s_chars)->fullsize;
 	      pos += fullsize;
 	  int size;
 	  int fullsize;
 
-	  /* If the string_chars struct is marked as free (i.e. the STRING
-	     pointer is 0xFFFFFFFF) then this is an unused chunk of string
-             storage.  This happens under Mule when a string's size changes
-	     in such a way that its fullsize changes. (Strings can change
-	     size because a different-length character can be substituted
-	     for another character.) In this case, after the bogus string
-	     pointer is the "fullsize" of this entry, i.e. how many bytes
-	     to skip. */
-
-	  if (FREE_STRUCT_P (from_s_chars))
+	  /* If the string_chars struct is marked as free (i.e. the
+	     STRING pointer is NULL) then this is an unused chunk of
+	     string storage.  This happens under Mule when a string's
+	     size changes in such a way that its fullsize changes.
+	     (Strings can change size because a different-length
+	     character can be substituted for another character.)
+	     In this case, after the bogus string pointer is the
+	     "fullsize" of this entry, i.e. how many bytes to skip. */
+
+	  if (STRING_CHARS_FREE_P (from_s_chars))
 	    {
 	      fullsize = ((struct unused_string_chars *) from_s_chars)->fullsize;
 	      from_pos += fullsize;
             }
 
           string = from_s_chars->string;
-	  assert (!(FREE_STRUCT_P (string)));
+	  assert (!(LRECORD_FREE_P (string)));
 
           size = string_length (string);
           fullsize = STRING_FULLSIZE (size);

File src/console-x.h

 #include <X11/cursorfont.h>
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
-
-#if 0 /* mrb - Xos sux. */
-#ifdef USG
-#undef USG	/* ####KLUDGE for Solaris 2.2 and up */
-#include <X11/Xos.h>
-#define USG
-#else
-#include <X11/Xos.h>
-#endif
-#endif /* 0 */
-
 #include <X11/StringDefs.h>
 
 #ifdef HAVE_XPM
   /* Xt application info. */
   Widget Xt_app_shell;
 
-  /* Cache of GC's for frame's on this device. */
+  /* Cache of GC's for frames on this device. */
   struct gc_cache *gc_cache;
 
   /* Selected visual, depth and colormap for this device */
 Lisp_Object Qidentity;
 
 static int internal_old_equal (Lisp_Object, Lisp_Object, int);
+Lisp_Object safe_copy_tree (Lisp_Object arg, Lisp_Object vecp, int depth);
 
 static Lisp_Object
 mark_bit_vector (Lisp_Object obj)
 */
        (arg, vecp))
 {
+  return safe_copy_tree (arg, vecp, 0);
+}
+
+Lisp_Object
+safe_copy_tree (Lisp_Object arg, Lisp_Object vecp, int depth)
+{
+  if (depth > 200)
+    signal_simple_error ("Stack overflow in copy-tree", arg);
+    
   if (CONSP (arg))
     {
       Lisp_Object rest;
 	  Lisp_Object elt = XCAR (rest);
 	  QUIT;
 	  if (CONSP (elt) || VECTORP (elt))
-	    XCAR (rest) = Fcopy_tree (elt, vecp);
+	    XCAR (rest) = safe_copy_tree (elt, vecp, depth + 1);
 	  if (VECTORP (XCDR (rest))) /* hack for (a b . [c d]) */
-	    XCDR (rest) = Fcopy_tree (XCDR (rest), vecp);
+	    XCDR (rest) = safe_copy_tree (XCDR (rest), vecp, depth +1);
 	  rest = XCDR (rest);
 	}
     }
 	  Lisp_Object elt = XVECTOR_DATA (arg) [j];
 	  QUIT;
 	  if (CONSP (elt) || VECTORP (elt))
-	    XVECTOR_DATA (arg) [j] = Fcopy_tree (elt, vecp);
+	    XVECTOR_DATA (arg) [j] = safe_copy_tree (elt, vecp, depth + 1);
 	}
     }
   return arg;

File src/glyphs-msw.c

       SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p),
 		   WM_SETTEXT, 0, (LPARAM)lparam);
     }
+  /* Set active state. */
+  if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p))
+    {
+      Lisp_Object item = IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p);
+      LONG style = GetWindowLong 
+	(WIDGET_INSTANCE_MSWINDOWS_HANDLE (p),
+	 GWL_STYLE);
+
+      if (CONSP (item))
+	item = XCAR (item);
+
+      if (gui_item_active_p (item))
+	SetWindowLong (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p),
+		       GWL_STYLE, style & ~WS_DISABLED);
+      else
+	SetWindowLong (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p),
+		       GWL_STYLE, style | WS_DISABLED);
+    }
 }
 
 /* register widgets into our hashtable so that we can cope with the
       IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (ii))
     {
       HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
-      int i = 0, selected = 0;
+      int i = 0, selected_idx = 0;
       Lisp_Object rest;
 
       assert (!NILP (IMAGE_INSTANCE_WIDGET_ITEMS (ii)));
 	      add_tab_item (image_instance, wnd, XCAR (rest),
 			    IMAGE_INSTANCE_FRAME (ii), i);
 	      if (gui_item_selected_p (XCAR (rest)))
-		selected = i;
+		selected_idx = i;
 	      i++;
 	    }
-	  SendMessage (wnd, TCM_SETCURSEL, selected, 0);
+	  SendMessage (wnd, TCM_SETCURSEL, selected_idx, 0);
 	}
     }
 }

File src/glyphs-widget.c

 {
   Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
   struct image_instantiator_methods* meths;
+  struct gcpro gcpro1;
 
   Lisp_Object text = find_keyword_in_vector (instantiator, Q_text);
+  Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
+  Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
+  Lisp_Object descriptor_item = Qnil;
+
+  GCPRO1 (descriptor_item);
+
   /* Pick up any generic properties that we might need to keep hold
-     of. */
+     of. 
+     #### This is potentially bogus because it is changing the items
+     in place rather than in the pending items. */
   if (!NILP (text))
     {
       IMAGE_INSTANCE_WIDGET_TEXT (ii) = text;
       IMAGE_INSTANCE_TEXT_CHANGED (ii) = 1;
     }
 
+  /* Retrieve the gui item information. This is easy if we have been
+     provided with a vector, more difficult if we have just been given
+     keywords.
+
+     #### This is inconsistent with instantiation in that you have to
+     have the :descriptor keyword for updates in order to recognise 
+     changes. */
+  if (VECTORP (desc))
+    {
+      descriptor_item = gui_parse_item_keywords_no_errors (desc);
+    }
+  else
+    {
+      /* Since we are updating the instantiator could be incomplete
+	 and hence the gui item descriptor not well formed. We
+	 therefore try updating and discard the results if nothing
+	 changed. */
+      descriptor_item = copy_gui_item (IMAGE_INSTANCE_WIDGET_ITEM (ii));
+      if (!update_gui_item_keywords (descriptor_item, instantiator))
+	descriptor_item = Qnil;
+    }
+
+  /* Record new items for update. *_redisplay will do the
+     rest. */
+  if (!EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout)
+      && 
+      !EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qnative_layout))
+    {
+      if (!NILP (items))
+	{
+	  if (NILP (descriptor_item))
+	    descriptor_item = IMAGE_INSTANCE_WIDGET_ITEM (ii);
+	  
+	  check_valid_item_list (items);
+#ifdef DEBUG_WIDGET_OUTPUT
+	  stderr_out ("items for widget %p updated\n", 
+		      IMAGE_INSTANCE_SUBWINDOW_ID (ii));
+#endif
+	  /* Don't set the actual items since we might decide not to use
+	     the new ones (because nothing has really changed). If we did
+	     set them and didn't use them then we would get into whole
+	     heaps of trouble when the old items get GC'd. */
+	  descriptor_item = Fcons (descriptor_item, parse_gui_item_tree_children (items));
+	}
+      /* If the descriptor was updated but not the items we need to fill
+	 in the `new' items. */
+      else if (!NILP (descriptor_item) 
+	       && 
+	       CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+	{
+	  descriptor_item = Fcons 
+	    (descriptor_item,
+	     copy_gui_item_tree (XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))));
+	}
+    }
+
+  if (!NILP (descriptor_item))
+    {
+      IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = descriptor_item;
+      IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
+    }
+
+  UNGCPRO;
+      
   /* Now try device specific methods first ... */
   meths = decode_device_ii_format (image_instance_device (image_instance),
 				   IMAGE_INSTANCE_WIDGET_TYPE (ii),
   if (!NILP (face))
     SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Fget_face (face));
 
-  /* retrieve the gui item information. This is easy if we have been
+  /* Retrieve the gui item information. This is easy if we have been
      provided with a vector, more difficult if we have just been given
-     keywords */
-  if (STRINGP (desc) || NILP (desc))
+     keywords. Note that standard gui descriptor shortcuts will not work
+     because of keyword parsing.
+
+     #### This is bogus in that descriptor and items share the same slot, 
+     we should rationalize. */
+  if (VECTORP (desc))
+    {
+      IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
+	gui_parse_item_keywords_no_errors (desc);
+    }
+  else
     {
       /* big cheat - we rely on the fact that a gui item looks like an instantiator */
       IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
-	gui_parse_item_keywords_no_errors (instantiator);
-      IMAGE_INSTANCE_WIDGET_TEXT (ii) = desc;
+	widget_gui_parse_item_keywords (instantiator);
     }
-  else
-    IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
-      gui_parse_item_keywords_no_errors (desc);
 
   /* Pick up the orientation before we do our first layout. */
   if (EQ (orient, Qleft) || EQ (orient, Qright) || EQ (orient, Qvertical))
     }
 }
 
-/* Update the contents of a tab control. */
-static void
-tab_control_update (Lisp_Object image_instance,
-		    Lisp_Object instantiator)
-{
-  Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
-  /* Record new items for update. *_tab_control_redisplay will do the
-     rest. */
-  if (!NILP (items))
-    {
-      Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
-      check_valid_item_list (items);
-#ifdef DEBUG_WIDGET_OUTPUT
-      stderr_out ("tab control %p updated\n", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
-#endif
-      /* Don't set the actual items since we might decide not to use
-         the new ones (because nothing has really changed). If we did
-         set them and didn't use them then we would get into whole
-         heaps of trouble when the old items get GC'd. */
-      IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
-	Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)),
-	       parse_gui_item_tree_children (items));
-      IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
-    }
-}
-
 /* Determine whether only the order has changed for a tab. */
 int tab_control_order_only_changed (Lisp_Object image_instance)
 {
   return found;
 }
 
-/* Set the properties of a progress gauge */
-static void
-progress_gauge_update (Lisp_Object image_instance,
-		       Lisp_Object instantiator)
-{
-  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-  Lisp_Object value = find_keyword_in_vector (instantiator, Q_value);
-
-  if (!NILP (value))
-    {
-      CHECK_INT (value);
-#ifdef DEBUG_WIDGET_OUTPUT
-      stderr_out ("progress gauge value set to %ld\n", XINT (value));
-#endif
-      IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
-	copy_gui_item_tree (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
-#ifdef ERROR_CHECK_GLYPHS
-      assert (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
-#endif
-      if (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
-	XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value = value;
-
-      IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
-    }
-}
-
 
 /*****************************************************************************
  *                              widget layout                               *
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, post_instantiate, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, governing_domain, subwindow);
-  IIFORMAT_HAS_METHOD (progress_gauge, update);
   VALID_WIDGET_KEYWORDS (progress_gauge);
   VALID_GUI_KEYWORDS (progress_gauge);
 
   IIFORMAT_HAS_SHARED_METHOD (tree_view, instantiate, widget);
   IIFORMAT_HAS_SHARED_METHOD (tree_view, post_instantiate, widget);
   IIFORMAT_HAS_SHARED_METHOD (tree_view, governing_domain, subwindow);
-  IIFORMAT_HAS_SHARED_METHOD (tree_view, update, tab_control);
   IIFORMAT_HAS_METHOD (tree_view, query_geometry);
   VALID_WIDGET_KEYWORDS (tree_view);
   VALID_GUI_KEYWORDS (tree_view);
   IIFORMAT_HAS_SHARED_METHOD (tab_control, post_instantiate, widget);
   IIFORMAT_HAS_SHARED_METHOD (tab_control, governing_domain, subwindow);
   IIFORMAT_HAS_METHOD (tab_control, query_geometry);
-  IIFORMAT_HAS_METHOD (tab_control, update);
   VALID_WIDGET_KEYWORDS (tab_control);
   VALID_GUI_KEYWORDS (tab_control);
   IIFORMAT_VALID_KEYWORD (tab_control, Q_orientation,

File src/glyphs-x.c

   /* Possibly update the colors and font */
   if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p)
       ||
+      /* #### This is not sufficient because it will not cope with widgets
+	 that are not currently visible. Once redisplay has done the
+	 visible ones it will clear this flag so that when new ones
+	 become visible they will not be updated. */
       XFRAME (IMAGE_INSTANCE_FRAME (p))->faces_changed
       ||
+      XFRAME (IMAGE_INSTANCE_FRAME (p))->frame_changed
+      ||
       IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p))
     {
       update_widget_face (wv, p, IMAGE_INSTANCE_FRAME (p));

File src/glyphs.c

 	  print_internal
 	    (IMAGE_INSTANCE_WIDGET_FACE (ii), printcharfun, 0);
 	}
-
+      /* fallthrough */
 
     case IMAGE_SUBWINDOW:
       sprintf (buf, " %dx%d", IMAGE_INSTANCE_WIDTH (ii),
 Lisp_Object Vmenu_no_selection_hook;
 
 static Lisp_Object parse_gui_item_tree_list (Lisp_Object list);
+Lisp_Object find_keyword_in_vector (Lisp_Object vector, Lisp_Object keyword);
 
 #ifdef HAVE_POPUPS
 
  * structure. If KEY is not a keyword, or is an unknown keyword, then
  * error is signaled.
  */
-void
+int
 gui_item_add_keyval_pair (Lisp_Object gui_item,
 			  Lisp_Object key, Lisp_Object val,
 			  Error_behavior errb)
 {
   Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
+  int retval = 0;
 
   if (!KEYWORDP (key))
     syntax_error_2 ("Non-keyword in gui item", key, pgui_item->name);
 
-  if	  (EQ (key, Q_suffix))	 pgui_item->suffix   = val;
-  else if (EQ (key, Q_active))	 pgui_item->active   = val;
-  else if (EQ (key, Q_included)) pgui_item->included = val;
-  else if (EQ (key, Q_config))	 pgui_item->config   = val;
-  else if (EQ (key, Q_filter))	 pgui_item->filter   = val;
-  else if (EQ (key, Q_style))	 pgui_item->style    = val;
-  else if (EQ (key, Q_selected)) pgui_item->selected = val;
-  else if (EQ (key, Q_keys))	 pgui_item->keys     = val;
-  else if (EQ (key, Q_callback)) pgui_item->callback = val;
-  else if (EQ (key, Q_callback_ex)) pgui_item->callback_ex = val;
-  else if (EQ (key, Q_value))	 pgui_item->value     = val;
+  if (EQ (key, Q_descriptor))
+    {
+      if (!EQ (pgui_item->name, val))
+	{
+	  retval = 1;
+	  pgui_item->name   = val;
+	}
+    }
+#define FROB(slot) \
+  else if (EQ (key, Q_##slot))			\
+  {						\
+    if (!EQ (pgui_item->slot, val))			\
+      {						\
+	retval = 1;				\
+	pgui_item->slot   = val;			\
+      }						\
+  }
+  FROB (suffix)
+  FROB (active)
+  FROB (included)
+  FROB (config)
+  FROB (filter)
+  FROB (style)
+  FROB (selected)
+  FROB (keys)
+  FROB (callback)
+  FROB (callback_ex)
+  FROB (value)
+#undef FROB
   else if (EQ (key, Q_key_sequence)) ;   /* ignored for FSF compatibility */
   else if (EQ