Commits

cvs  committed 2af401a

Import from CVS: tag r20-2p1

  • Participants
  • Parent commits e13feca
  • Tags r20-2p1

Comments (0)

Files changed (22)

File CHANGES-beta

 							-*- indented-text -*-
+to 20.2
+-- tm-vm-8.12 + manual
+-- VM-6.31
+-- b2m.c/rcs-checking synch with Emacs/Mule zeta.
+
 to 20.2 beta6
 -- ediff-2.65 Courtesy of Michael Kifer
 -- Gnus-5.4.52
+Tue May 13 20:35:52 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+	* XEmacs-20.2 is released.
+
 Sat May 10 16:14:30 1997  Steven L Baur  <steve@altair.xemacs.org>
 
 	* XEmacs 20.2-b6 is released.
 * Changes in XEmacs 20.2
 ========================
 
-** configure no longer defaults to using --with-xim=motif if Motif libraries
-are linked.
-
-There are many bugs in the Xlib XIM support in X11R6.3.
-
 ** Why XEmacs 20.1 is called 20.2
 
 Testing of XEmacs 20.1 revealed a number of showstopping bugs at the
 
 ** Default modeline colors are now less of a color-salad.
 
+** The `C-z' key now iconifies only the current X frame.  You can use
+`C-x C-z' to get the old behavior.
+
+On the tty frames `C-z' behaves as before.
+
 ** The command `display-time' now draws a pretty image in the modeline
 when new mail arrives.  It also supports balloon-help messages.
 
 eval-expression (`M-:') and upcase-region (`C-x C-u')/downcase-region
 (`C-x C-l').
 
-** Numerous causes of crashes have been fixed.  XEmacs should now be
-even more stable than before.
-
-** The XEmacs build process has been changed to make site
-administration easier.  See lisp/site-load.el for details.
-
 ** It is now possible to customize the functions called by XEmacs toolbar.
 
 Type `M-x customize RET toolbar RET' to customize it.  Customizations
 
 ** The blinking cursor is always "on" during movement.
 
+** The XEmacs build process has been changed to make site
+administration easier.  See lisp/site-load.el for details.
+
+** Numerous causes of crashes have been fixed.  XEmacs should now be
+even more stable than before.
+
+** configure no longer defaults to using --with-xim=motif if Motif libraries
+are linked.
+
+There are many bugs in the Xlib XIM support in X11R6.3.
+
 ** A number of new packages are added, and many packages were
 updated.
 
 ** AUCTeX-9.7k, courtesy of Per Abrahamsen
 
 AUC TeX is a comprehensive customizable integrated environment for
-writing input files for LaTeX using GNU Emacs.
+writing input files for LaTeX using Emacs.
 
 AUC TeX lets you run TeX/LaTeX and other LaTeX-related tools, such as
 a output filters or post processor from inside Emacs.  Especially
 * Lisp and internal changes in XEmacs 20.2
 ==========================================
 
-** lib-complete.el was MULE-ized.
-
-The commands `find-library', `find-library-other-window' and
-`find-library-other-frame' now take an optional coding system
-argument.
-
-** Experimental support for Lisp reader macros #-, #+.
-
-The Common Lisp reader macros for feature test are now supported.  This
-feature is present for evaluation purposes and is subject to change.
-
-** `values' now has a setf method
-
-** The `C-z' key now iconifies only the current X frame.  You can use
-`C-x C-z' to get the old behavior.
-
-On the tty frames `C-z' behaves as before.
-
 ** `defcustom' and `defgroup' can now be used to specify types and
 placement of the user-settable variables.
 
 Set this to variable to nil to avoid XEmacs usual lossage of zmacs
 region when moving up against a buffer boundary.
 
+** lib-complete.el was MULE-ized.
+
+The commands `find-library', `find-library-other-window' and
+`find-library-other-frame' now take an optional coding system
+argument.
+
+** Experimental support for Lisp reader macros #-, #+.
+
+The Common Lisp reader macros for feature test are now supported.  This
+feature is present for evaluation purposes and is subject to change.
+
+** `values' now has a setf method
+
 ** The `eval-after-load' and `eval-next-after-load' functions are
 now available.
 

File lib-src/b2m.c

  *   Ed Wilkinson
  *   E.Wilkinson@massey.ac.nz
  *   Mon Nov 7 15:54:06 PDT 1988
- *
  */
 
-/* Synched up with: FSF 19.28. */
+/* Made conformant to the GNU coding standards January, 1995
+   by Francesco Potorti` <pot@cnuce.cnr.it>. */
 
-/* Serious bug: This program uses `gets', which is intrinsically
-   unreliable--long lines will cause crashes.
-   Someone should fix this program not to use `gets'.  */
 #include <stdio.h>
 #include <time.h>
 #include <sys/types.h>
 #include <fcntl.h>
 #endif
 
-#include <../src/config.h>
-
-#if __STDC__ || defined(STDC_HEADERS)
-# include <stdlib.h>
-# include <string.h>
-#else /* ! (__STDC__ || defined(STDC_HEADERS)) */
-# ifdef USG
-#  include <string.h>
-# else
-#  include <strings.h>
-#  endif
-
-/* BSD's strings.h does not declare the type of strtok.  */
-extern char *strtok ();
-#endif /* ! (__STDC__ || defined(STDC_HEADERS)) */
-
-
-#ifndef TRUE
-#define TRUE  (1)
-#endif
-#ifndef FALSE
-#define FALSE (0)
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+/* On some systems, Emacs defines static as nothing for the sake
+   of unexec.  We don't want that here since we don't use unexec. */
+#undef static
 #endif
 
-int header = FALSE, printing;
-time_t ltoday;
-char from[256], labels[256], data[256], *p, *today;
+#undef TRUE
+#define TRUE	1
+#undef FALSE
+#define FALSE	0
 
-void
-main (int argc, char **argv)
+/* Exit codes for success and failure.  */
+#ifdef VMS
+#define	GOOD	1
+#define BAD	0
+#else
+#define	GOOD	0
+#define	BAD	1
+#endif
+
+#define streq(s,t)	(strcmp (s, t) == 0)
+#define strneq(s,t,n)	(strncmp (s, t, n) == 0)
+
+typedef int logical;
+
+/*
+ * A `struct linebuffer' is a structure which holds a line of text.
+ * `readline' reads a line from a stream into a linebuffer and works
+ * regardless of the length of the line.
+ */
+struct linebuffer
 {
+  long size;
+  char *buffer;
+};
+
+extern char *strtok();
+
+long *xmalloc (), *xrealloc ();
+char *concat ();
+long readline ();
+void fatal ();
+
+/*
+ * xnew -- allocate storage.  SYNOPSIS: Type *xnew (int n, Type);
+ */
+#define xnew(n, Type)	((Type *) xmalloc ((n) * sizeof (Type)))
+
+
+
+char *progname;
+
+main (argc, argv)
+     int argc;
+     char **argv;
+{
+  logical labels_saved, printing, header;
+  time_t ltoday;
+  char *labels, *p, *today;
+  struct linebuffer data;
+
 #ifdef MSDOS
   _fmode = O_BINARY;		/* all of files are treated as binary files */
+#if __DJGPP__ > 1
+  if (!isatty (fileno (stdout)))
+    setmode (fileno (stdout), O_BINARY);
+  if (!isatty (fileno (stdin)))
+    setmode (fileno (stdin), O_BINARY);
+#else /* not __DJGPP__ > 1 */
   (stdout)->_flag &= ~_IOTEXT;
   (stdin)->_flag &= ~_IOTEXT;
+#endif /* not __DJGPP__ > 1 */
 #endif
-  if ((argc >= 2) && strcmp (argv[1], "--help") == 0)
+  progname = argv[0];
+
+  if (argc != 1)
     {
-      fprintf (stderr, "%s - a filter for Babyl -> Unix mail files\n", argv[0]);
-      fprintf (stderr, "Usage: %s < babylmailbox > unixmailbox\n", argv[0]);
-      exit (0);
+      fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname);
+      exit (GOOD);
     }
-
+  labels_saved = printing = header = FALSE;
   ltoday = time (0);
   today = ctime (&ltoday);
+  data.size = 200;
+  data.buffer = xnew (200, char);
 
-  /* BUG!  Must not use gets in a reliable program!  */
-  if (gets (data))
+  if (readline (&data, stdin) == 0
+      || !strneq (data.buffer, "BABYL OPTIONS:", 14))
+    fatal ("standard input is not a Babyl mailfile.");
+
+  while (readline (&data, stdin) > 0)
     {
-      if (strncmp (data, "BABYL OPTIONS:", 14))
-	{
-	  fprintf (stderr, "%s: not a Babyl mailfile!\n", argv[0]);
-	  exit (-1);
-	}
-      else
-	printing = FALSE;
-    }
-  else
-    exit (-1);
-  if (printing)
-    puts (data);
-
-  while (gets (data))
-    {
-
-#if 0
-      /* What was this for?  Does somebody have something against blank
-	 lines?  */
-      if (!strcmp (data, ""))
-	exit (0);
-#endif
-
-      if (!strcmp (data, "*** EOOH ***") && !printing)
+      if (streq (data.buffer, "*** EOOH ***") && !printing)
 	{
 	  printing = header = TRUE;
-	  printf ("From %s %s", argv[0], today);
+	  printf ("From \"Babyl to mail by %s\" %s", progname, today);
 	  continue;
 	}
 
-      if (!strcmp (data, "\037\f"))
+      if (data.buffer[0] == '\037')
 	{
-	  /* save labels */
-	  gets (data);
-	  p = strtok (data, " ,\r\n\t");
-	  strcpy (labels, "X-Babyl-Labels: ");
+	  if (data.buffer[1] == '\0')
+	    continue;
+	  else if (data.buffer[1] == '\f')
+	    {
+	      /* Save labels. */
+	      readline (&data, stdin);
+	      p = strtok (data.buffer, " ,\r\n\t");
+	      labels = "X-Babyl-Labels: ";
 
-	  while ((p = strtok (NULL, " ,\r\n\t")))
-	    {
-	      strcat (labels, p);
-	      strcat (labels, ", ");
+	      while (p = strtok (NULL, " ,\r\n\t"))
+		labels = concat (labels, p, ", ");
+
+	      p = &labels[strlen (labels) - 2];
+	      if (*p == ',')
+		*p = '\0';
+	      printing = header = FALSE;
+	      labels_saved = TRUE;
+	      continue;
 	    }
-
-	  labels[strlen (labels) - 2] = '\0';
-	  printing = header = FALSE;
-	  continue;
 	}
 
-      if (!strlen (data) && header)
+      if ((data.buffer[0] == '\0') && header)
 	{
 	  header = FALSE;
-	  if (strcmp (labels, "X-Babyl-Labels"))
+	  if (labels_saved)
 	    puts (labels);
 	}
-    
+
       if (printing)
-	puts (data);
+	puts (data.buffer);
     }
 }
+
+
+
+/*
+ * Return a newly-allocated string whose contents
+ * concatenate those of s1, s2, s3.
+ */
+char *
+concat (s1, s2, s3)
+     char *s1, *s2, *s3;
+{
+  int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+  char *result = xnew (len1 + len2 + len3 + 1, char);
+
+  strcpy (result, s1);
+  strcpy (result + len1, s2);
+  strcpy (result + len1 + len2, s3);
+  result[len1 + len2 + len3] = '\0';
+
+  return result;
+}
+
+/*
+ * Read a line of text from `stream' into `linebuffer'.
+ * Return the number of characters read from `stream',
+ * which is the length of the line including the newline, if any.
+ */
+long
+readline (linebuffer, stream)
+     struct linebuffer *linebuffer;
+     register FILE *stream;
+{
+  char *buffer = linebuffer->buffer;
+  register char *p = linebuffer->buffer;
+  register char *pend;
+  int chars_deleted;
+
+  pend = p + linebuffer->size;	/* Separate to avoid 386/IX compiler bug.  */
+
+  while (1)
+    {
+      register int c = getc (stream);
+      if (p == pend)
+	{
+	  linebuffer->size *= 2;
+	  buffer = (char *) xrealloc (buffer, linebuffer->size);
+	  p += buffer - linebuffer->buffer;
+	  pend = buffer + linebuffer->size;
+	  linebuffer->buffer = buffer;
+	}
+      if (c == EOF)
+	{
+	  chars_deleted = 0;
+	  break;
+	}
+      if (c == '\n')
+	{
+	  if (p[-1] == '\r' && p > buffer)
+	    {
+	      *--p = '\0';
+	      chars_deleted = 2;
+	    }
+	  else
+	    {
+	      *p = '\0';
+	      chars_deleted = 1;
+	    }
+	  break;
+	}
+      *p++ = c;
+    }
+
+  return (p - buffer + chars_deleted);
+}
+
+/*
+ * Like malloc but get fatal error if memory is exhausted.
+ */
+long *
+xmalloc (size)
+     unsigned int size;
+{
+  long *result = (long *) malloc (size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted");
+  return result;
+}
+
+long *
+xrealloc (ptr, size)
+     char *ptr;
+     unsigned int size;
+{
+  long *result = (long *) realloc (ptr, size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted");
+  return result;
+}
+
+void
+fatal (message)
+{
+  fprintf (stderr, "%s: %s\n", progname, message);
+  exit (BAD);
+}
+

File lib-src/rcs-checkin

-#!/bin/sh
+#! /bin/sh
 
 # This script accepts any number of file arguments and checks them into RCS.
 #
 	test -f "$file" || continue
 
 	# Check that file is readable.
-	<$file || exit
+	test -r "$file" || exit
 
 	# If the RCS file does not already exist,
 	# initialize it with a description from $file's first line.

File lisp/ChangeLog

+Mon May 12 13:47:37 1997  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+	* tm/tm-vm.el: Provide for vm-unsaved-message having been removed
+	in recent versions of VM.
+	
 Fri May  9 10:41:44 1997  Steven L Baur  <steve@altair.xemacs.org>
 
 	* iso/iso-acc.el (iso-accents-compose): Fix XEmacs 19.14

File lisp/efs/Makefile

 #
 # File:         Makefile
 # Release:      $efs release: 1.15 $
-# Version:      $Revision: 1.6 $
+# Version:      $Revision: 1.7 $
 # RCS:
 # Description:  Makefile for byte-compiling efs and dired.
 # Author:       Andy Norman, HPLabs, Bristol, UK.
 
 COREOBJS = efs-defun.elc efs-ovwrt.elc efs-fnh.elc efs-cu.elc efs-netrc.elc \
            efs.elc efs-dired.elc efs-report.elc \
-           efs-cp-p.elc
+           efs-cp-p.elc \
+	   efs-dump.elc
 CORESRC = efs-defun.el efs-ovwrt.el efs-fnh.el efs-cu.el efs-netrc.el \
           efs.el efs-dired.el efs-report.el \
           efs-cp-p.el \

File lisp/prim/auto-autoloads.el

 
 (autoload 'run-ediff-from-cvs-buffer "ediff" "\
 Run Ediff-merge on appropriate revisions of the selected file.
-First run after `M-x cvs-update'. Then place the cursor on a lide describing a
+First run after `M-x cvs-update'. Then place the cursor on a line describing a
 file and then run `run-ediff-from-cvs-buffer'." t nil)
 
 (autoload 'ediff-patch-file "ediff" "\
 ;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el")
 
 (autoload 'ksh-mode "ksh-mode" "\
-ksh-mode $Revision: 1.26 $ - Major mode for editing (Bourne, Korn or Bourne again)
+ksh-mode $Revision: 1.27 $ - Major mode for editing (Bourne, Korn or Bourne again)
 shell scripts.
 Special key bindings and commands:
 \\{ksh-mode-map}
 
 (autoload 'vhdl-mode "vhdl-mode" "\
 Major mode for editing VHDL code.
-vhdl-mode $Revision: 1.26 $
+vhdl-mode $Revision: 1.27 $
 To submit a problem report, enter `\\[vhdl-submit-bug-report]' from a
 vhdl-mode buffer.  This automatically sets up a mail buffer with version
 information already added.  You just need to add a description of the

File lisp/tm/tm-vm.el

 ;;         Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Created: 1994/10/29
-;; Version: $Revision: 1.5 $
+;; Version: $Revision: 1.6 $
 ;; Keywords: mail, MIME, multimedia, multilingual, encoded-word
 
 ;; This file is part of tm (Tools for MIME).
 ;;; @@ System/Information variables
 
 (defconst tm-vm/RCS-ID
-  "$Id: tm-vm.el,v 1.5 1997/05/09 03:28:15 steve Exp $")
+  "$Id: tm-vm.el,v 1.6 1997/05/14 02:01:47 steve Exp $")
 (defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
 
 ; Ensure vm-menu-mail-menu gets properly defined *before* tm-vm/vm-emulation-map
 
 ;;; @@@ multipart/digest
 
-(fset 'vm-unsaved-message 'message)
+(if (not (fboundp 'vm-unsaved-message))
+    (fset 'vm-unsaved-message 'message))
 
 (defun tm-vm/enclose-messages (mlist &optional preamble)
   "Enclose the messages in MLIST as multipart/digest.

File lisp/version.el

 (defconst emacs-version "20.2"
   "Version numbers of this version of Emacs.")
 
-(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid (beta6)")))
+(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid")))
 
 (defconst emacs-major-version
   (progn (or (string-match "^[0-9]+" emacs-version)

File lisp/vm/vm-autoload.el

 
 (autoload (quote vm-mime-burst-message) "vm-digest" "Burst messages from the digest message M.
 M should be a message struct for a real message.
-MIME encoding is expected.  The message content type
-must be either message/* or multipart/digest." nil nil)
+MIME encoding is expected.  Somewhere within the MIME layout
+there must be at least one part of type message/news, message/rfc822 or
+multipart/digest.  If there are multiple parts matching those types,
+all of them will be burst." nil nil)
 
 (autoload (quote vm-mime-burst-layout) "vm-digest" nil nil nil)
 
 
 (autoload (quote vm-mm-layout-cache) "vm-mime" nil nil nil)
 
+(autoload (quote vm-mm-layout-display-error) "vm-mime" nil nil nil)
+
 (autoload (quote vm-set-mm-layout-type) "vm-mime" nil nil nil)
 
 (autoload (quote vm-set-mm-layout-cache) "vm-mime" nil nil nil)
 
+(autoload (quote vm-set-mm-layout-display-error) "vm-mime" nil nil nil)
+
 (autoload (quote vm-mm-layout) "vm-mime" nil nil nil)
 
 (autoload (quote vm-mm-encoded-header) "vm-mime" nil nil nil)
 
 (autoload (quote vm-mime-layout-contains-type) "vm-mime" nil nil nil)
 
+(autoload (quote vm-mime-find-digests-in-layout) "vm-mime" nil nil nil)
+
 (autoload (quote vm-mime-plain-message-p) "vm-mime" nil nil nil)
 
 (autoload (quote vm-mime-text-type-p) "vm-mime" nil nil nil)
 
 (autoload (quote vm-mode) "vm-startup" "Major mode for reading mail.
 
-This is VM 6.30.
+This is VM 6.31.
 
 Commands:
    h - summarize folder contents

File lisp/vm/vm-digest.el

 (defun vm-mime-burst-message (m)
   "Burst messages from the digest message M.
 M should be a message struct for a real message.
-MIME encoding is expected.  The message content type
-must be either message/* or multipart/digest."
+MIME encoding is expected.  Somewhere within the MIME layout
+there must be at least one part of type message/news, message/rfc822 or
+multipart/digest.  If there are multiple parts matching those types,
+all of them will be burst."
   (let ((ident-header nil)
-	(layout (vm-mm-layout m)))
+	(did-burst nil)
+	(list (vm-mime-find-digests-in-layout (vm-mm-layout m))))
     (if vm-digest-identifier-header-format
 	(setq ident-header (vm-sprintf 'vm-digest-identifier-header-format m)))
-    (vm-mime-burst-layout layout ident-header)))
+    (while list
+      (setq did-burst (or did-burst
+			  (vm-mime-burst-layout (car list) ident-header)))
+      (setq list (cdr list)))
+    did-burst))
 
 (defun vm-mime-burst-layout (layout ident-header)
   (let ((work-buffer nil)
       (set-buffer (vm-buffer-of m))
       (let ((layout (vm-mm-layout m)))
 	(if (and (vectorp layout)
-		 (or (vm-mime-types-match "multipart/digest"
-					  (car (vm-mm-layout-type layout)))
-		     (vm-mime-types-match "message/rfc822"
-					  (car (vm-mm-layout-type layout)))
-		     (vm-mime-types-match "message/news"
-					  (car (vm-mm-layout-type layout)))))
+		 (or (vm-mime-layout-contains-type
+		      layout
+		      "multipart/digest")
+		     (vm-mime-layout-contains-type
+		      layout
+		      "message/rfc822")
+		     (vm-mime-layout-contains-type
+		      layout
+		      "message/news")))
 	    (throw 'return-value "mime"))))
     (save-excursion
       (save-restriction

File lisp/vm/vm-mime.el

 (defun vm-mm-layout-body-start (e) (aref e 8))
 (defun vm-mm-layout-body-end (e) (aref e 9))
 (defun vm-mm-layout-parts (e) (aref e 10))
+(defun vm-mm-layout-cache (e) (aref e 11))
 ;; if display of MIME part fails, error string will be here.
-(defun vm-mm-layout-cache (e) (aref e 11))
+(defun vm-mm-layout-display-error (e) (aref e 12))
 
 (defun vm-set-mm-layout-type (e type) (aset e 0 type))
 (defun vm-set-mm-layout-cache (e c) (aset e 11 c))
+(defun vm-set-mm-layout-display-error (e c) (aset e 12 c))
 
 (defun vm-mm-layout (m)
   (or (vm-mime-layout-of m)
 				  (vm-headers-of m)
 				  (vm-text-of m)
 				  (vm-text-end-of m)
-				  nil nil )))
+				  nil nil nil )))
 		  ((null type)
 		   (goto-char (point-min))
 		   (or (re-search-forward "^\n\\|\n\\'" nil t)
 			   (vm-marker (point-min))
 			   (vm-marker (point))
 			   (vm-marker (point-max))
-			   nil nil ))
+			   nil nil nil ))
 		  ((null (string-match "[^/ ]+/[^/ ]+" (car type)))
 		   (vm-mime-error "Malformed MIME content type: %s" (car type)))
 		  ((and (string-match "^multipart/\\|^message/" (car type))
 				     (narrow-to-region (point) (point-max))
 				     (vm-mime-parse-entity-safe nil c-t
 								c-t-e)))
-				  nil )))
+				  nil nil )))
 		  (t
 		   (goto-char (point-min))
 		   (or (re-search-forward "^\n\\|\n\\'" nil t)
 				  (vm-marker (point-min))
 				  (vm-marker (point))
 				  (vm-marker (point-max))
-				  nil nil ))))
+				  nil nil nil ))))
 	    (setq p (cdr type)
 		  boundary nil)
 	    (while p
 		    (vm-marker (point))
 		    (vm-marker (point-max))
 		    (nreverse multipart-list)
-		    nil )))))))
+		    nil nil )))))))
 
 (defun vm-mime-parse-entity-safe (&optional m c-t c-t-e)
   (or c-t (setq c-t '("text/plain" "charset=us-ascii")))
 	     header
 	     text
 	     text-end
-	     nil nil)))))
+	     nil nil nil)))))
 
 (defun vm-mime-get-xxx-parameter (layout name param-list)
   (let ((match-end (1+ (length name)))
 	      (vm-marker (point))
 	      (vm-marker (point-max))
 	      nil
-	      nil ))))
+	      nil
+	      nil))))
 
 (defun vm-mime-should-display-button (layout dont-honor-content-disposition)
   (if (and vm-honor-mime-content-disposition
 		      (vm-mime-display-internal-text/plain layout)))
 		(t (and extent (vm-mime-rewrite-failed-button
 				extent
-				(or (vm-mm-layout-cache layout)
+				(or (vm-mm-layout-display-error layout)
 				    "no external viewer defined for type")))
 		   (vm-mime-display-internal-application/octet-stream
 		    (or extent layout))))
 	  (and work-buffer (kill-buffer work-buffer)))
 	(message "Inlining text/html... done")
 	t )
-    (vm-set-mm-layout-cache layout "Need W3 to inline HTML")
+    (vm-set-mm-layout-display-error layout "Need W3 to inline HTML")
     nil ))
 
 (defun vm-mime-display-internal-text/plain (layout &optional no-highlighting)
 	(charset (or (vm-mime-get-parameter layout "charset") "us-ascii")))
     (if (not (vm-mime-charset-internally-displayable-p charset))
 	(progn
-	  (vm-set-mm-layout-cache
+	  (vm-set-mm-layout-display-error
 	   layout (concat "Undisplayable charset: " charset))
 	  nil)
       (vm-mime-insert-mime-body layout)
 		   (if (vm-mime-text-type-p layout)
 		       (set-buffer-file-coding-system 'no-conversion nil)
 		     (set-buffer-file-coding-system 'binary t)))
+               ;; Write an empty tempfile out to disk and set its
+               ;; permissions to 0600, then write the actual buffer
+               ;; contents to tempfile.
+               (write-region start start tempfile nil 0)
+               (set-file-modes tempfile 384)
 	       (write-region start end tempfile nil 0))
 	     (delete-region start end)
 	     (save-excursion
 
 (defun vm-mime-display-internal-message/rfc822 (layout)
   (if (vectorp layout)
-      (let ((start (point)))
-	(vm-mime-insert-mime-headers layout)
+      (let ((start (point))
+	    (buffer-read-only nil))
+	(vm-mime-insert-mime-headers (car (vm-mm-layout-parts layout)))
 	(insert ?\n)
+	(save-excursion
+	  (goto-char start)
+	  (vm-reorder-message-headers nil vm-visible-headers
+				      vm-invisible-header-regexp))
 	(save-restriction
 	  (narrow-to-region start (point))
 	  (vm-decode-mime-encoded-words))
 	  (setq end (point-marker))
 	  (vm-mime-transfer-decode-region layout start end)
 	  (setq tempfile (vm-make-tempfile-name))
-	  ;; coding system for presentation buffer is binary
+	  ;; Write an empty tempfile out to disk and set its
+	  ;; permissions to 0600, then write the actual buffer
+	  ;; contents to tempfile.
+	  (write-region start start tempfile nil 0)
+	  (set-file-modes tempfile 384)
+	  ;; coding system for presentation buffer is binary so
+	  ;; we don't need to set it here.
 	  (write-region start end tempfile nil 0)
 	  (message "Creating %s glyph..." name)
 	  (setq g (make-glyph
 	  (setq end (point-marker))
 	  (vm-mime-transfer-decode-region layout start end)
 	  (setq tempfile (vm-make-tempfile-name))
-	  ;; coding system for presentation buffer is binary
+	  ;; Write an empty tempfile out to disk and set its
+	  ;; permissions to 0600, then write the actual buffer
+	  ;; contents to tempfile.
+	  (write-region start start tempfile nil 0)
+	  (set-file-modes tempfile 384)
+	  ;; coding system for presentation buffer is binary, so
+	  ;; we don't need to set it here.
 	  (write-region start end tempfile nil 0)
 	  (vm-set-mm-layout-cache layout tempfile)
 	  (save-excursion
 	    (setq done t)
 	  (setq p (cdr p))))
       result )))
+
+;; breadth first traversal
+(defun vm-mime-find-digests-in-layout (layout)
+  (let ((layout-list (list layout))
+	layout-type
+	(result nil))
+    (while layout-list
+      (setq layout-type (car (vm-mm-layout-type (car layout-list))))
+      (cond ((string-match "^multipart/digest\\|message/\\(rfc822\\|news\\)"
+			   layout-type)
+	     (setq result (nconc result (list (car layout-list)))))
+	    ((vm-mime-composite-type-p layout-type)
+	     (setq layout-list (nconc layout-list
+				      (copy-sequence
+				       (vm-mm-layout-parts
+					(car layout-list)))))))
+      (setq layout-list (cdr layout-list)))
+    result ))
   
 (defun vm-mime-plain-message-p (m)
   (save-match-data
 		    ;; insert/delete trick needed to avoid
 		    ;; enriched-mode tags from seeping into the
 		    ;; attachment overlays.  I really wish
-		    ;; front-advance / rear-aadvance overlay
+		    ;; front-advance / rear-advance overlay
 		    ;; endpoint properties actually worked.
 		    (goto-char (point-max))
 		    (insert-before-markers "\n")
       (error "Command must be used in a VM Mail mode buffer."))
   (let ((temp-buffer nil)
 	(mail-buffer (current-buffer))
+	(enriched (and (boundp 'enriched-mode) enriched-mode))
 	e-list)
     (unwind-protect
 	(progn
 	  (set-buffer temp-buffer)
 	  ;; so vm-mime-xxxx-encode-composition won't complain
 	  (setq major-mode 'mail-mode)
+	  (set (make-local-variable 'enriched-mode) enriched)
 	  (vm-insert-region-from-buffer mail-buffer)
 	  (goto-char (point-min))
 	  (or (vm-mail-mode-get-header-contents "From")

File lisp/vm/vm-misc.el

 ;; test for it without just running make-frame.  I'll just
 ;; let it not work for now... someone will complain eventually
 ;; and I'll think of something.
-(defun vm-multiple-frames-possible-p ()
-  (or (and (boundp 'window-system) (not (eq window-system nil)))
-      (and (fboundp 'device-type) (eq (device-type) 'x))))
 
-(defun vm-mouse-support-possible-p ()
-  (vm-multiple-frames-possible-p))
-
+(defun vm-multiple-frames-possible-p () 
+  (cond (vm-xemacs-p 
+         (eq (device-type) 'x)) 
+        (vm-fsfemacs-19-p 
+         (not (eq window-system nil))))) 
+ 
+(defun vm-mouse-support-possible-p () 
+  (vm-multiple-frames-possible-p)) 
+ 
 (defun vm-menu-support-possible-p ()
   (cond (vm-xemacs-p
 	 (featurep 'menubar))
 	(vm-fsfemacs-19-p
 	 (fboundp 'menu-bar-mode))
 	(t nil)))
-
+ 
 (defun vm-toolbar-support-possible-p ()
-  (and vm-xemacs-p
-       (vm-multiple-frames-possible-p)
-       (featurep 'toolbar)))
+  (and vm-xemacs-p (featurep 'toolbar)))
 
 (defun vm-multiple-fonts-possible-p ()
-  (or (eq window-system 'x)
-      (and (fboundp 'device-type)
-	   (eq (device-type) 'x))))
+  (cond (vm-xemacs-p
+	 (eq (device-type) 'x))
+	(vm-fsfemacs-19-p
+	 (eq window-system 'x))))
 
 (defun vm-run-message-hook (message &optional hook-variable)
   (save-excursion

File lisp/vm/vm-startup.el

 (defun vm-mode (&optional read-only)
   "Major mode for reading mail.
 
-This is VM 6.30.
+This is VM 6.31.
 
 Commands:
    h - summarize folder contents

File lisp/vm/vm-summary.el

 	truncate-lines t)
   ;; horizontal scrollbar off by default
   ;; user can turn it on in summary hook if desired.
-  (and (fboundp 'set-specifier)
-       scrollbar-height
+  (and vm-xemacs-p (featurep 'scrollbar)
        (set-specifier scrollbar-height (cons (current-buffer) 0)))
   (use-local-map vm-summary-mode-map)
   (and (vm-menu-support-possible-p)

File lisp/vm/vm-toolbar.el

   (vm-toolbar-initialize)
   (let ((height (+ 4 (glyph-height (car vm-toolbar-help-icon))))
 	(width (+ 4 (glyph-width (car vm-toolbar-help-icon))))
+	(frame (selected-frame))
+	(buffer (current-buffer))
+	(tag-set '(win))
 	(myframe (vm-created-this-frame-p))
 	toolbar )
     ;; glyph-width and glyph-height return 0 at startup sometimes
     (cond ((eq vm-toolbar-orientation 'right)
 	   (setq vm-toolbar-specifier right-toolbar)
 	   (if myframe
-	       (set-specifier right-toolbar (cons (selected-frame) toolbar)))
-	   (set-specifier right-toolbar (cons (current-buffer) toolbar))
-	   (set-specifier right-toolbar-width
-			  (cons (selected-frame) width)))
+	       (set-specifier right-toolbar toolbar frame tag-set))
+	   (set-specifier right-toolbar toolbar buffer)
+	   (set-specifier right-toolbar-width width frame tag-set))
 	  ((eq vm-toolbar-orientation 'left)
 	   (setq vm-toolbar-specifier left-toolbar)
 	   (if myframe
-	       (set-specifier left-toolbar (cons (selected-frame) toolbar)))
-	   (set-specifier left-toolbar (cons (current-buffer) toolbar))
-	   (set-specifier left-toolbar-width
-			  (cons (selected-frame) width)))
+	       (set-specifier left-toolbar toolbar frame tag-set))
+	   (set-specifier left-toolbar toolbar buffer)
+	   (set-specifier left-toolbar-width width frame tag-set))
 	  ((eq vm-toolbar-orientation 'bottom)
 	   (setq vm-toolbar-specifier bottom-toolbar)
 	   (if myframe
-	       (set-specifier bottom-toolbar (cons (selected-frame) toolbar)))
-	   (set-specifier bottom-toolbar (cons (current-buffer) toolbar))
-	   (set-specifier bottom-toolbar-height
-			  (cons (selected-frame) height)))
+	       (set-specifier bottom-toolbar toolbar frame tag-set))
+	   (set-specifier bottom-toolbar toolbar buffer)
+	   (set-specifier bottom-toolbar-height height frame tag-set))
 	  (t
 	   (setq vm-toolbar-specifier top-toolbar)
 	   (if myframe
-	       (set-specifier top-toolbar (cons (selected-frame) toolbar)))
-	   (set-specifier top-toolbar (cons (current-buffer) toolbar))
-	   (set-specifier top-toolbar-height
-			  (cons (selected-frame) height))))))
+	       (set-specifier top-toolbar toolbar frame tag-set))
+	   (set-specifier top-toolbar toolbar buffer)
+	   (set-specifier top-toolbar-height height frame tag-set)))))
 
 (defun vm-toolbar-make-toolbar-spec ()
   (let ((button-alist '(
     (let ((tuples
 	   (if (featurep 'xpm)
 	       (list
-		(if (>= (device-bitplanes) 16)
+		(if (and (device-on-window-system-p)
+			 (>= (device-bitplanes) 16))
       '(vm-toolbar-decode-mime-icon "mime-colorful-up.xpm"
 				    "mime-colorful-dn.xpm"
 				    "mime-colorful-xx.xpm")

File lisp/vm/vm-version.el

 
 (provide 'vm-version)
 
-(defconst vm-version "6.30"
+(defconst vm-version "6.31"
   "Version number of VM.")
 
 (defun vm-version ()

File man/tm/tm-vm-en.texi

 @c %**end of header
 
 @ifinfo
-This file documents tm-vm.el v8.11
+This file documents tm-vm.el v8.12
 
 tm-vm is part of the TM Package.
 
 @titlepage
 @title tm-vm Manual (English Version)
 @author by Oscar Figueiredo
-@code{$Id: tm-vm-en.texi,v 1.4 1997/04/13 03:14:26 steve Exp $}
+@code{$Id: tm-vm-en.texi,v 1.5 1997/05/14 02:01:53 steve Exp $}
 @page
 
 tm-vm is part of the TM Package.
 you read and write multimedia mail on the Internet using the MIME
 standard.
 
-This document applies to release 8.11 of tm-vm.el
+This document applies to release 8.12 of tm-vm.el
 @end ifinfo
 
 @menu
 This section documents the user-visible changes in the latest releases
 of tm-vm. For more technical details see the ChangeLog.
 
-@section 8.5 to 8.11
+@section 8.5 to 8.12
 
 @itemize @bullet
 @item
 @ifinfo
 @chapter Copyright
 
-This file documents tm-vm 8.11, an interface between tm and the VM mail
+This file documents tm-vm 8.12, an interface between tm and the VM mail
 user agent.
 
 Copyright 1996 Tomohiko Morioka, Oscar Figueiredo

File src/ChangeLog

+Sun May 11 23:36:08 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+	* buffer.c: Rename Vdelete_auto_save_files to coding standards.
+
+	* frame.c: Rename Vallow_deletion_of_last_visible_frame to coding
+	standards.
+
 Thu May  8 19:10:03 1997  Steven L Baur  <steve@altair.xemacs.org>
 
 	* frame.c: Change internal type of

File src/buffer.c

 Lisp_Object Vkill_buffer_query_functions;
 
 /* Non-nil means delete a buffer's auto-save file when the buffer is saved. */
-int Vdelete_auto_save_files;
+int delete_auto_save_files;
 
 Lisp_Object Qbuffer_live_p;
 Lisp_Object Qbuffer_or_string_p;
 	&& b->auto_save_modified != 0
 	&& BUF_SAVE_MODIFF (b) < b->auto_save_modified)
       {
-	if (Vdelete_auto_save_files != 0)
+	if (delete_auto_save_files != 0)
 	  {
 	    /* deleting the auto save file might kill b! */
 	    /* #### dmoore - fix this crap, we do this same gcpro and
 */ );
   Vkill_buffer_query_functions = Qnil;
 
-  DEFVAR_BOOL ("delete-auto-save-files", &Vdelete_auto_save_files /*
+  DEFVAR_BOOL ("delete-auto-save-files", &delete_auto_save_files /*
 *Non-nil means delete auto-save file when a buffer is saved or killed.
 */ );
-  Vdelete_auto_save_files = 1;
+  delete_auto_save_files = 1;
 }
 
 /* DOC is ignored because it is snagged and recorded externally 
 Lisp_Object Vmouse_leave_frame_hook, Qmouse_leave_frame_hook;
 Lisp_Object Vmap_frame_hook, Qmap_frame_hook;
 Lisp_Object Vunmap_frame_hook, Qunmap_frame_hook;
-int  Vallow_deletion_of_last_visible_frame;
+int  allow_deletion_of_last_visible_frame;
 #if defined (HAVE_CDE) || defined (HAVE_OFFIX_DND)
 Lisp_Object Vdrag_and_drop_functions, Qdrag_and_drop_functions;
 #endif
      deleting all frames which were either visible or iconified and thus
      losing any way of communicating with the still running XEmacs process.
      So we put it back.  */
-  if (!force && !Vallow_deletion_of_last_visible_frame &&
+  if (!force && !allow_deletion_of_last_visible_frame &&
       !other_visible_frames_internal (f, called_from_delete_device))
     error ("Attempt to delete the sole visible or iconified frame");
 
   Vunmap_frame_hook = Qnil;
 
   DEFVAR_BOOL ("allow-deletion-of-last-visible-frame",
-	       &Vallow_deletion_of_last_visible_frame /*
+	       &allow_deletion_of_last_visible_frame /*
 *Non-nil means to assume the force option to delete-frame.
 */ );
-  Vallow_deletion_of_last_visible_frame = 0;
+  allow_deletion_of_last_visible_frame = 0;
 
 #if defined (HAVE_CDE) || defined (HAVE_OFFIX_DND)
   DEFVAR_LISP ("drag-and-drop-functions", &Vdrag_and_drop_functions /*