Commits

Anonymous committed bc29462

Sync VM to version 6.92

Comments (0)

Files changed (9)

+2001-04-08  Steve Youngs  <youngs@xemacs.org>
+
+	* Sync with VM-6.92
+
 2001-03-03  Steve Youngs  <youngs@xemacs.org>
 
 	* Sync with VM-6.91
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 6.91
-AUTHOR_VERSION = 6.91
+VERSION = 6.92
+AUTHOR_VERSION = 6.92
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = vm
 PKG_TYPE = regular
 			  (vm-increment count))
 		      (setq response (cdr response))))
 		  (vm-store-folder-totals source (list count 0 0 0))
-		  (throw 'done (not (eq count 0))))
+		  (throw 'end-of-session (not (eq count 0))))
 		(not (equal 0 (car select)))))
 	  (setq vm-imap-retrieved-messages retrieved))
       (and process (vm-imap-end-session process)))))
 			description (vm-get-header-contents
 				     m "Content-Description:")
 			description (and description
-					 (if (string-match "^[ \t\n]$"
+					 (if (string-match "^[ \t\n]*$"
 							   description)
 					     nil
 					   description))
 		    id (car (vm-mime-parse-content-header id))
 		    description (vm-mime-get-header-contents
 				 "Content-Description:")
-		    description (and description (if (string-match "^[ \t\n]+$"
+		    description (and description (if (string-match "^[ \t\n]*$"
 								   description)
 						     nil
 						   description))
     (if (and (processp process) (eq (process-status process) 'run))
 	t
       (cond ((or (null tempfile) (null (file-exists-p tempfile)))
-	     (setq start (point))
-	     (vm-mime-insert-mime-body layout)
-	     (setq end (point-marker))
-	     (vm-mime-transfer-decode-region layout start end)
+	     (cond (vm-fsfemacs-mule-p
+		    (let (work-buffer (target (current-buffer)))
+		      (unwind-protect
+			  (progn
+			    (setq work-buffer (vm-make-work-buffer))
+			    (set-buffer work-buffer)
+			    (vm-mime-insert-mime-body layout)
+			    (vm-mime-transfer-decode-region layout
+							    (point-min)
+							    (point-max))
+			    (set-buffer-multibyte t)
+			    (set-buffer target)
+			    (setq start (point))
+			    (insert-buffer-substring work-buffer)
+			    (setq end (point-marker)))
+			(and work-buffer (kill-buffer work-buffer)))))
+		   (t
+		    (setq start (point))
+		    (vm-mime-insert-mime-body layout)
+		    (setq end (point-marker))
+		    (vm-mime-transfer-decode-region layout start end)))
 	     (setq suffix (vm-mime-extract-filename-suffix layout))
 	     (setq tempfile (vm-make-tempfile-name suffix))
 	     (let ((buffer-file-type buffer-file-type)
 
 (defun vm-mime-charset-internally-displayable-p (name)
   (cond ((and vm-xemacs-mule-p (memq (device-type) '(x mswindows)))
-	 (vm-string-assoc name vm-mime-mule-charset-to-coding-alist))
+	 (or (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)
+	     (vm-mime-default-face-charset-p name)))
 	((and vm-fsfemacs-mule-p (memq window-system '(x win32 w32)))
-	 (vm-string-assoc name vm-mime-mule-charset-to-coding-alist))
+	 (or (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)
+	     (vm-mime-default-face-charset-p name)))
 	((vm-multiple-fonts-possible-p)
 	 (or (vm-mime-default-face-charset-p name)
 	     (vm-string-assoc name vm-mime-charset-font-alist)))
 	  (setq o (vm-mm-layout m))
 	  (if (not (vectorp o))
 	      nil
-	    (setq o (vm-mime-find-leaf-content-id id))
+	    (setq o (vm-mime-find-leaf-content-id o id))
 	    (if (null o)
 		nil
 	      ;; if we found it, end the search loop
 		       ;; by insert-file-contents.  The
 		       ;; value we bind to it to here isn't important.
 		       (buffer-file-coding-system (vm-binary-coding-system)))
-		   (condition-case data
-		       (insert-file-contents object)
-		     (error
-		      ;; font-lock could signal this error in FSF
-		      ;; Emacs versions prior to 21.0.  Catch it
-		      ;; and ignore it.
-		      (if (equal data '(error "Invalid search bound (wrong side of point)"))
-			  nil
-			(signal (car data) (cdr data))))))))
+		   (insert-file-contents object))))
 	  ;; gather information about the object from the extent.
 	  (if (setq already-mimed (extent-property e 'vm-mime-encoded))
 	      (setq layout (vm-mime-parse-entity
 		       ;; For NTEmacs 19: need to do this to make
 		       ;; sure CRs aren't eaten.
 		       (file-name-buffer-file-type-alist '(("." . t))))
-		   (insert-file-contents object))
+		   (condition-case data
+		       (insert-file-contents object)
+		     (error
+		      ;; font-lock could signal this error in FSF
+		      ;; Emacs versions prior to 21.0.  Catch it
+		      ;; and ignore it.
+		      (if (equal data '(error "Invalid search bound (wrong side of point)"))
+			  nil
+			(signal (car data) (cdr data))))))
 		 (goto-char (point-max))
 		 (delete-char -1)))
 	  ;; gather information about the object from the extent.
   (let ((done nil)
 	(buffer-read-only nil)
 	(fill-column vm-paragraph-fill-column)
-	;; user doesn't want long line, so set this to zero for them.
+	;; user doesn't want long lines, so set this to zero for them.
 	(filladapt-fill-column-forward-fuzz 0))
     (save-excursion
       (vm-save-restriction
        (while (not done)
 	 (re-search-forward "$" end t)
 	 (if (>= (current-column) len)
-	     (fill-paragraph nil))
+	     ;; ignore errors
+	     (condition-case nil
+		 (fill-paragraph nil)
+	       (error nil)))
 	 (forward-line)
 	 (setq done (>= (point) end)))))))
 
 (defun vm-mode (&optional read-only)
   "Major mode for reading mail.
 
-This is VM 6.91.
+This is VM 6.92.
 
 Commands:
    h - summarize folder contents
 ;; The date format recognized here is the one specified in RFC 822.
 ;; Some slop is allowed e.g. dashes between the monthday, month and year
 ;; because such malformed headers have been observed.
-"\\(\\([a-z][a-z][a-z]\\),\\)?[ \t\n]*\\([0-9][0-9]?\\)[ \t\n---]*\\([a-z][a-z][a-z]\\)[ \t\n---]*\\([0-9]*[0-9][0-9]\\)[ \t\n]*\\([0-9:]+\\)[ \t\n]*\\([a-z][a-z]?[a-z]?\\|[---+]?[0-9][0-9][0-9][0-9]\\)"
+"\\(\\([a-z][a-z][a-z]\\),\\)?[ \t\n]*\\([0-9][0-9]?\\)[ \t\n---]*\\([a-z][a-z][a-z]\\)[ \t\n---]*\\([0-9]*[0-9][0-9]\\)[ \t\n]*\\([0-9:]+\\)[ \t\n]*\\([a-z][a-z]?[a-z]?\\|\\(-\\|\\+\\)[01][0-9][0-9][0-9]\\)"
        date)
       (if (match-beginning 2)
 	  (vm-su-do-weekday m (substring date (match-beginning 2)
      ((string-match
 ;; UNIX ctime(3) format, with slop allowed in the whitespace, and we allow for
 ;; the possibility of a timezone at the end.
-"\\([a-z][a-z][a-z]\\)[ \t\n]*\\([a-z][a-z][a-z]\\)[ \t\n]*\\([0-9][0-9]?\\)[ \t\n]*\\([0-9:]+\\)[ \t\n]*\\([0-9][0-9][0-9][0-9]\\)[ \t\n]*\\([a-z][a-z]?[a-z]?\\|[---+][0-9][0-9][0-9][0-9]\\)?"
+"\\([a-z][a-z][a-z]\\)[ \t\n]*\\([a-z][a-z][a-z]\\)[ \t\n]*\\([0-9][0-9]?\\)[ \t\n]*\\([0-9:]+\\)[ \t\n]*\\([0-9][0-9][0-9][0-9]\\)[ \t\n]*\\([a-z][a-z]?[a-z]?\\|\\(-\\|\\+\\)[01][0-9][0-9][0-9]\\)?"
        date)
       (vm-su-do-weekday m (substring date (match-beginning 1)
 				     (match-end 1)))
   (let ((mail-use-rfc822 t) i names addresses to cc all list full-name)
     (setq to (or (vm-get-header-contents m "To:" ", ")
 		 (vm-get-header-contents m "Apparently-To:" ", ")
+		 (vm-get-header-contents m "Newsgroups:" ", ")
 		 ;; desperation....
 		 (user-login-name))
 	  cc (vm-get-header-contents m "Cc:" ", ")
 
 (provide 'vm-version)
 
-(defconst vm-version "6.91"
+(defconst vm-version "6.92"
   "Version number of VM.")
 
 (defun vm-version ()
 @setfilename vm.info
 @settitle VM User's Manual
 @c @direntry
-@c * VM::			A mail reader
+@c * VM::			A mail reader.
 @c @end direntry
 @iftex
 @finalout