Commits

Anonymous committed f636d0d

Sync VM to Kyle's last version.

Comments (0)

Files changed (14)

+2007-09-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* Sync to upstream version 7.19, Kyle's last version.
+	* Makefile (AUTHOR_VERSION): Bump. Don't do the off-by-one trick
+	Steve did for the last release, since our versions are too out of
+	sync for that to be helpful now.
+
 2007-09-16  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 7.24 released.
 # Boston, MA 02111-1307, USA.
 
 VERSION = 7.24
-AUTHOR_VERSION = 7.17
+AUTHOR_VERSION = 7.19
 MAINTAINER = Kyle Jones <kyle_jones@wonderworks.com>
 PACKAGE = vm
 PKG_TYPE = regular
Old
Old image
New
New image
 "X  	c Gray75 s backgroundToolBarColor",
 ",	c black s foregroundToolBarColor",
 "i	c Gray20",
-"@	c rgb:ff/7f/ff",
+"@	c rgb:e1/92/46",
 "T	c red",
 "t	c pink",
 "o	c black",
 	  (save-excursion
 	    (setq work-buffer (vm-make-work-buffer))
 	    (set-buffer work-buffer)
+	    (if (and vm-stunnel-program-additional-configuration-file
+		     (stringp vm-stunnel-program-additional-configuration-file)
+		     (file-readable-p
+		      vm-stunnel-program-additional-configuration-file))
+		(insert-file-contents
+		 vm-stunnel-program-additional-configuration-file))
 	    (insert "client = yes\n")
 	    (insert "RNDfile = " vm-stunnel-random-data-file "\n")
 	    (insert "RNDoverwrite = no\n")
 			 "---")
 		 (list "Take Action on MIME body ..."))))
     `(,@title
-      ["Display as Text using Default Face"
+      ["Display as Text (in default face)"
        (vm-mime-run-display-function-at-point
 	'vm-mime-display-body-as-text) t]
       ["Display using External Viewer"
       ["Feed to Shell Pipeline (discard output)"
        (vm-mime-run-display-function-at-point
 	'vm-mime-pipe-body-to-queried-command-discard-output) t]
-      ["Delete object" vm-delete-mime-object t])))
+      ["Attach to Message Composition Buffer"
+       vm-mime-attach-object-from-message t]
+      ["Delete" vm-delete-mime-object t])))
 
 (defvar vm-menu-url-browser-menu
   (let ((title (if (vm-menu-fsfemacs19-menus-p)
 		      (vm-mime-can-convert type)
 		      (setq new-layout
 			    (vm-mime-convert-undisplayable-layout layout)))
+		 ;; a button should always go away if we're doing
+		 ;; a conversion.
+		 (if extent
+		     (vm-set-extent-property extent 'vm-mime-disposable t))
 		 (vm-decode-mime-layout new-layout))
 		(t (and extent (vm-mime-rewrite-failed-button
 				extent
 	(coding-system-for-read (vm-binary-coding-system))
 	(coding-system-for-write (vm-binary-coding-system))
 	(append-file t)
-	process	tempfile cache end suffix)
+	process	tempfile cache end suffix basename)
     (setq cache (get (vm-mm-layout-cache layout)
 		     'vm-mime-display-external-generic)
 	  process (nth 0 cache)
 	     (setq suffix (vm-mime-extract-filename-suffix layout)
 		   suffix (or suffix
 			      (vm-mime-find-filename-suffix-for-type layout)))
-	     (setq tempfile (vm-make-tempfile suffix))
+	     (setq basename
+		   (or (vm-mime-get-disposition-parameter layout "filename")
+		       (vm-mime-get-parameter layout "name")))
+	     (setq tempfile (vm-make-tempfile suffix basename))
 	     (vm-register-message-garbage-files (list tempfile))
 	     (let ((buffer-file-type buffer-file-type)
 		   (selective-display nil)
 		     (setq o (make-overlay start (point) nil t nil))
 		     (overlay-put o 'vm-mime-layout layout)
 		     (overlay-put o 'vm-mime-disposable t)
-		     (overlay-put o 'vm-image vm-menu-fsfemacs-image-menu)
+		     (if vm-use-menus
+			 (overlay-put o 'vm-image vm-menu-fsfemacs-image-menu))
 		     (save-excursion
 		       (set-buffer (process-buffer process))
 		       (set (make-local-variable 'vm-image-list) image-list)
 		 (overlay-put o 'evaporate t)
 		 (overlay-put o 'vm-mime-layout layout)
 		 (overlay-put o 'vm-mime-disposable t)
-		 (overlay-put o 'vm-image vm-menu-fsfemacs-image-menu))))
+		 (if vm-use-menus
+		     (overlay-put o 'vm-image vm-menu-fsfemacs-image-menu)))))
 	t )
     nil ))
 
 		(setq o (make-overlay i-start (point) nil t nil))
 		(overlay-put o 'vm-mime-layout layout)
 		(overlay-put o 'vm-mime-disposable t)
-		(overlay-put o 'vm-image vm-menu-fsfemacs-image-menu)
+		(if vm-use-menus
+		    (overlay-put o 'vm-image vm-menu-fsfemacs-image-menu))
 		(if process
 		    (save-excursion
 		      (set-buffer (process-buffer process))
 	 (extent-at (point) nil 'vm-mime-layout))))
 
 (defun vm-mime-run-display-function-at-point (&optional function dispose)
+  "Display the MIME object at point according to its type."
   (interactive)
   ;; save excursion to keep point from moving.  its motion would
   ;; drag window point along, to a place arbitrarily far from
 		      e))))))
 
 (defun vm-mime-reader-map-save-file ()
+  "Write the MIME object at point to a file."
   (interactive)
   ;; make sure point doesn't move, we need it to stay on the tag
   ;; if the user wants to delete after saving.
     file ))
 
 (defun vm-mime-reader-map-save-message ()
+  "Save the MIME object at point to a folder."
   (interactive)
   ;; make sure point doesn't move, we need it to stay on the tag
   ;; if the user wants to delete after saving.
 	    (error nil))))))
 
 (defun vm-mime-reader-map-pipe-to-command ()
+  "Pipe the MIME object at point to a shell command."
   (interactive)
   (vm-mime-run-display-function-at-point
    'vm-mime-pipe-body-to-queried-command))
 
 (defun vm-mime-reader-map-pipe-to-printer ()
+  "Print the MIME object at point."
   (interactive)
   (vm-mime-run-display-function-at-point 'vm-mime-send-body-to-printer))
 
 (defun vm-mime-reader-map-display-using-external-viewer ()
+  "Display the MIME object at point with an external viewer."
   (interactive)
   (vm-mime-run-display-function-at-point
    'vm-mime-display-body-using-external-viewer))
 
 (defun vm-mime-reader-map-display-using-default ()
+  "Display the MIME object at point using the `default' face."
   (interactive)
   (vm-mime-run-display-function-at-point 'vm-mime-display-body-as-text))
 
 (defun vm-mime-reader-map-display-object-as-type ()
+  "Display the MIME object at point as some other type."
   (interactive)
   (vm-mime-run-display-function-at-point 'vm-mime-display-object-as-type))
 
 			    (coding-system-get
 			     (console-tty-output-coding-system)
 			     'alias-coding-systems))
-			   (console-tty-output-coding-system))))
+                           (coding-system-base
+                            (console-tty-output-coding-system)))))
 	 (or (eq ourtermcs (car 
 			    (cdr 
 			     (vm-string-assoc 
 ;;	      (t description))))))
 
 (defun vm-delete-mime-object (&optional saved-file)
-  "Deletes the contents of MIME object referred to by the MIME
-button at point.  The MIME object is replaced by a text/plain
-object that briefly describes what was deleted."
+  "Delete the contents of MIME object referred to by the MIME button at point.
+The MIME object is replaced by a text/plain object that briefly
+describes what was deleted."
   (interactive)
   (vm-follow-summary-cursor)
   (vm-select-folder-buffer)
       (vm-set-extent-property ee (car props) (car (cdr props)))
       (setq props (cdr (cdr props))))))
 
-(defun vm-make-tempfile (&optional filename-suffix)
+(defun vm-make-tempfile (&optional filename-suffix proposed-filename)
   (let ((modes (default-file-modes))
-	(file (vm-make-tempfile-name filename-suffix)))
+	(file (vm-make-tempfile-name filename-suffix proposed-filename)))
     (unwind-protect
 	(progn
 	  (set-default-file-modes (vm-octal 600))
       (set-default-file-modes modes))
     file ))
 
-(defun vm-make-tempfile-name (&optional filename-suffix)
-  (let ((done nil) filename)
-    (while (not done)
-      (setq filename (convert-standard-filename
-		      (expand-file-name (format "vm%d%d%s"
-						vm-tempfile-counter
-						(random 100000000)
-						(or filename-suffix ""))
-					vm-temp-file-directory))
-	    vm-tempfile-counter (1+ vm-tempfile-counter)
-	    done (not (file-exists-p filename))))
+(defun vm-make-tempfile-name (&optional filename-suffix proposed-filename)
+  (let (filename)
+    (cond ((and (stringp proposed-filename)
+		(not (file-exists-p
+		      (setq filename (convert-standard-filename
+				      (expand-file-name
+				       proposed-filename
+				       vm-temp-file-directory))))))
+	   t )
+	  ((stringp proposed-filename)
+	   (let ((done nil))
+	     (while (not done)
+	       (setq filename (convert-standard-filename
+			       (expand-file-name
+				(format "%d-%s"
+					vm-tempfile-counter
+					proposed-filename)
+				vm-temp-file-directory))
+		     vm-tempfile-counter (1+ vm-tempfile-counter))
+	       done (not (file-exists-p filename)))))
+	  (t
+	   (let ((done nil))
+	     (while (not done)
+	       (setq filename (convert-standard-filename
+			       (expand-file-name
+				(format "vm%d%d%s"
+					vm-tempfile-counter
+					(random 100000000)
+					(or filename-suffix ""))
+				vm-temp-file-directory))
+		     vm-tempfile-counter (1+ vm-tempfile-counter)
+		     done (not (file-exists-p filename)))))))
     filename ))
 
 (defun vm-make-work-buffer (&optional name)
 		  (t (vm-line-ending-coding-system))))
 	(and work-buffer (kill-buffer work-buffer))))))
 
+(defun vm-new-folder-line-ending-coding-system ()
+  (cond ((eq vm-default-new-folder-line-ending-type nil)
+	 (vm-line-ending-coding-system))
+	((eq vm-default-new-folder-line-ending-type 'lf)
+	 (if vm-fsfemacs-mule-p 'raw-text-unix 'no-conversion-unix))
+	((eq vm-default-new-folder-line-ending-type 'crlf)
+	 (if vm-fsfemacs-mule-p 'raw-text-dos 'no-conversion-dos))
+	((eq vm-default-new-folder-line-ending-type 'cr)
+	 (if vm-fsfemacs-mule-p 'raw-text-mac 'no-conversion-mac))
+	(t
+	 (vm-line-ending-coding-system))))
+
 (defun vm-collapse-whitespace ()
   (goto-char (point-min))
   (while (re-search-forward "[ \t\n]+" nil 0)
 	 (x-own-selection-internal 'CLIPBOARD url)))
   (message "Sending URL to X Clipboard... done"))
 
+;; this code courtesy Thomas F. Burdick
+(defun vm-mouse-send-url-to-safari (url)
+  "Sends URL to Safari, using Apple's Open Scripting Architecture."
+  (message "Sending URL to Safari...")
+  (with-temp-buffer
+    (insert "tell application \"Safari\"\n")
+    (insert " activate\n")
+    (insert " make new document at the beginning of documents\n")
+    (insert (format " set the URL of the front document to \"%s\"\n" url))
+    (insert "end tell\n")
+    (call-process-region (point-min) (point-max) "/usr/bin/osascript"))
+  (message "Sending URL to Safari... done"))
+
 (defun vm-mouse-install-mouse ()
   (cond ((vm-mouse-xemacs-mouse-p)
 	 (if (null (lookup-key vm-mode-map 'button2))
 
 (defvar select-safe-coding-system-function)
 
+(defvar coding-system-for-write)
+
 (defun vm-mail-send ()
   "Just like mail-send except that VM flags the appropriate message(s)
 as replied to, forwarded, etc, if appropriate."
       ;;
       ;; also protect value of this-command from minibuffer reads
       (let ((this-command this-command)
+	    ;; set up coding-system-for-write so that FCC uses
+	    ;; the correct coding system to save the message into
+	    ;; a folder.
+	    (coding-system-for-write
+	     (if (stringp mail-archive-file-name)
+		 (vm-get-file-line-ending-coding-system
+		  mail-archive-file-name)
+	       (and (boundp 'coding-system-for-write)
+		    coding-system-for-write)))
 	    ;; For Emacs 21.
 	    (mail-send-nonascii t)
 	    (sendmail-coding-system (vm-binary-coding-system))
 		(list this-command 'composing-message))
     (if (null to)
 	(mail-position-on-field "To"))
-    (if (boundp 'post-command-idle-hook)
-	(add-hook 'post-command-idle-hook
-		   'vm-update-composition-buffer-name t)
-      (add-hook 'post-command-hook 'vm-update-composition-buffer-name t))
+    (cond ((and vm-xemacs-p
+		(fboundp 'start-itimer)
+		(null (get-itimer "vm-rename-mail"))
+	   (start-itimer "vm-rename-mail"
+			 'vm-update-composition-buffer-name
+			 1.5 1.5 t)))
+	  ((and (fboundp 'run-with-idle-timer)
+		(null vm-update-composition-buffer-name-timer))
+	   (setq vm-update-composition-buffer-name-timer
+		 (run-with-idle-timer 1.5 t 'vm-update-composition-buffer-name))))
     (run-hooks 'mail-setup-hook)))
 
 (defun vm-reply-other-frame (count)
 	(error "Folder %s is being visited, cannot save." folder))
     (let ((mlist (vm-select-marked-or-prefixed-messages count))
 	  (coding-system-for-write
-	   (vm-get-file-line-ending-coding-system folder))
+	   (if (file-exists-p folder)
+	       (vm-get-file-line-ending-coding-system folder)
+	     (vm-new-folder-line-ending-coding-system)))
 	  (oldmodebits (and (fboundp 'default-file-modes)
 			    (default-file-modes)))
 	  (m nil) (count 0) folder-buffer target-type)
 (defun vm-mode (&optional read-only)
   "Major mode for reading mail.
 
-This is VM 7.17.
+This is VM 7.19.
 
 Commands:
    h - summarize folder contents
              that match those selectors.
        M ? - partial help for mark commands
 
- W S - save the current window configuration to a name
- W D - delete a window configuration
- W W - apply a configuration
- W ? - help for the window configuration commands
+   W - prefix for window configuration commands:
+       W S - save the current window configuration to a name
+       W D - delete a window configuration
+       W W - apply a configuration
+       W ? - help for the window configuration commands
 
- V V - visit a virtual folder (must be defined in vm-virtual-folder-alist)
- V C - create a virtual folder composed of a subset of the
-       current folder's messages.
- V A - create a virtual folder containing all the messages in the current
-       folder with the same author as the current message.
- V S - create a virtual folder containing all the messages in the current
-       folder with the same subject as the current message.
- V X - apply the selectors of a named virtual folder to the
-       messages in the current folder and create a virtual folder
-       containing the selected messages.
- V M - toggle whether this virtual folder's messages mirror the
-       underlying real messages' attributes.
- V ? - help for virtual folder commands
+   V - prefix for virtual folder commands:
+       V V - visit a virtual folder (folder must be defined in
+             vm-virtual-folder-alist)
+       V C - create a virtual folder composed of a subset of
+             the current folder's messages.
+       V A - create a virtual folder containing all the messages in
+             the current folder with the same author as the current message.
+       V S - create a virtual folder containing all the messages in
+             the current folder with the same subject as the current message.
+       V X - apply the selectors of a named virtual folder to the messages in
+             the current folder and create a virtual folder
+             containing the selected messages.
+       V M - toggle whether this virtual folder's messages mirror the
+             underlying real messages' attributes.
+       V ? - help for virtual folder commands
 
  C-_ - undo, special undo that retracts the most recent
              changes in message attributes and labels.  Expunges,
 
    a - set message attributes
 
- l a - add labels to message
- l d - delete labels from message
+   l - prefix for label commands:
+       l a - add labels to message
+       l d - delete labels from message
 
    $ - prefix for MIME commands.  Position the cursor over a MIME
        tag and use these keystrokes to operate on a MIME object.
 
-       $ s - save the MIME object
-       $ p - print the MIME object
-       $ | - pipe the MIME object to a shell command.
+       RET   - display the MIME object according to its type.
+       $ s   - save the MIME object
+       $ p   - print the MIME object
+       $ |   - pipe the MIME object to a shell command.
        $ RET - display the MIME object's text using the \"default\" face.
-       $ e - display the MIME object with an external viewer.
-       $ d - delete the MIME object from the message.
+       $ e   - display the MIME object with an external viewer.
+       $ d   - delete the MIME object from the message.
+       $ v   - display the MIME object as some other type.
+       $ w   - write the MIME object to a file.
+       $ a   - attach the MIME object to a composition buffer.
 
    L - reload your VM init file, ~/.vm
 
     ;; hack around it!
     (setq vm-faked-defcustom t)
     (defmacro defgroup (&rest args) nil)
-    (defmacro defcustom (var value doc &rest args)
+    (defmacro defcustom (var value doc &rest args) 
       (` (defvar (, var) (, value) (, doc))))))
 
 (defgroup vm nil
 				 (list vm-spool-files))))))
 
 (defcustom vm-spool-files nil
-  "*If non-nil this variable's value should be a list of strings
+  "*If non-nil this variable's value should be a list of strings 
 or a list of lists.
 
 If the value is a list of strings, the strings should name files
     You must have the ssh program installed and the variable
     `vm-ssh-program' must name it in order for IMAP over SSH to
     work.  SSH must be able to authenticate without a password,
-    which means you must be using .shosts authentication or RSA.
+    which means you must be using .shosts authentication or
+    public key user authentication.
 
     HOST is the host name of the IMAP server.
 
     you should have access to the maildrop.  Acceptable values
     are \"preauth\", \"login\" and \"cram-md5\".  \"preauth\"
     causes VM to skip the authentication stage of the protocol
-    with the assumption that the session was authenticated some
-    externally way.  \"login\", tells VM to use the IMAP LOGIN
+    with the assumption that the session was authenticated in some
+    external way.  \"login\", tells VM to use the IMAP LOGIN
     command for authentication, which sends your username and
     password in cleartext to the server.  \"cram-md5\" is a
     challenge response system that convinces the server of your
 Example:
  (setq vm-imap-server-list
       '(
-	 \"imap-ssl:mail.foocorp.com:993:inbox:login:becky:*\"
-	 \"imap:crickle.lex.ky.us:143:inbox:login:becky:*\"
+         \"imap-ssl:mail.foocorp.com:993:inbox:login:becky:*\"
+         \"imap:crickle.lex.ky.us:143:inbox:login:becky:*\"
        )
  )"
   :type '(repeat string))
 setting the variable `vm-default-From_-folder-type' to either From_
 or BellFrom_."
   :type '(choice (const From_)
-		(const BellFrom_)))
+		 (const BellFrom_)))
+
+(defcustom vm-default-new-folder-line-ending-type nil
+  "*Value must be a symbol that specifies the line ending convention
+to use for new folders.  Text files under UNIXish and Windows
+systems use different characters to indicate the end of a line.
+UNIXish systems use a single linefeed character, Windows uses a
+carriage return followed by a line feed.  The value of this
+variable tells VM which to use.
+
+`nil' means use the line ending convention of the local system;
+CRLF if you're on a Windows system, LF for UNIXish systems.
+`crlf' means use CRLF.
+`lf' mean use LF.
+`cr' means use CR (old Macs use this)."
+  :type '(choice (const nil)
+		 (const crlf)
+		 (const cr)
+		 (const lf)))
 
 (defcustom vm-check-folder-types t
   "*Non-nil value causes VM to check folder and message types for
 `vm-invisible-header-regexp'.  In this case `vm-visible-headers'
 specifies the order in which headers are displayed.  Headers not
 matching `vm-visible-headers' are displayed last."
-  :type '(repeat regexp))
+  :type '(list regexp))
 
 (defcustom vm-invisible-header-regexp nil
   "*Non-nil value should be a regular expression that tells what headers
 A value of t causes VM to display as much of the message as will
 fit in the window associated with the folder buffer.
 
-A nil value causes VM not to preview messages; no text lines are hidden and
+A nil value causes VM not to preview messages; no text lines are hidden and 
 messages are immediately flagged as read."
   :type '(choice boolean integer))
 
 
  (setq vm-mime-external-content-types-alist
        '(
-	 (\"text/html\"	\"netscape\")
-	 (\"image/gif\"	\"xv\")
-	 (\"image/jpeg\"	\"xv\")
-	 (\"video/mpeg\"	\"mpeg_play\")
-	 (\"video\"		\"xanim\")
+	 (\"text/html\" 	\"netscape\")
+	 (\"image/gif\" 	\"xv\")
+	 (\"image/jpeg\" 	\"xv\")
+	 (\"video/mpeg\" 	\"mpeg_play\")
+	 (\"video\" 		\"xanim\")
 	)
  )
 
 
   ((TYPE . FORMAT) (TYPE . FORMAT) ...)
 
-The list is searched sequentially and the FORMAT corresponding to
+The list is searched sequentially and the FORMAT corresponding to 
 the first TYPE that matches the type of the button's object is
 used.
 
    s - an empty string if %n would display \"1\", otherwise
        \"s\".
    t - the content type of the object, e.g. \"text/enriched\".
-   T - for message/partial objects, the total number of expected
+   T - for message/partial objects, the total number of expected 
        parts.  \"?\" is displayed if the object doesn't specify
        the total number of parts expected.
    x - the content type of the external body of a message/external-body
        the field width and precision for the concatentation of
        group of format specifiers.  Example: \"%.35(%d, %t, %f%)\"
        specifies a maximum display width of 35 characters for the
-       concatenation of the content description, content type and
+       concatenation of the content description, content type and 
        suggested file name.
    ) - ends a group.
 
     ("\\.tiff?$"	.	"image/tiff")
     ("\\.html?$"	.	"text/html")
     ("\\.au$"		.	"audio/basic")
-    ("\\.mpe?g$"	.	"video/mpeg")
-    ("\\.mov$"		.	"video/quicktime")
+    ("\\.mpe?g$" 	.	"video/mpeg")
+    ("\\.mov$" 		.	"video/quicktime")
     ("\\.e?ps$"		.	"application/postscript")
     ("\\.pdf$"		.	"application/pdf")
     ("\\.xls$"		.	"application/vnd.ms-excel")
     ("\\.ppt$"		.	"application/vnd.ms-powerpoint")
    )
   "*Alist used to guess a MIME content type based on a file name.
-The list format is
+The list format is 
 
   ((REGEXP . TYPE) ...)
 
     ("application/zip"		.	".zip")
    )
   "*Alist used to select a filename suffix for MIME object temporary files.
-The list format is
+The list format is 
 
   ((TYPE . SUFFIX) ...)
 
 The recognized SELECTORs are:
 
    author          - matches message if ARG matches the author; ARG should be a
-		     regular expression.
+                     regular expression.
    author-or-recipient
 		   - matches message if ARG matches the author of
 		     the message or any of its recipients; ARG
 		     should be a regular expression.
    and             - matches the message if all its argument
-		     selectors match the message.  Example:
-			(and (author \"Derek McGinty\") (new))
-		     matches all new messages from Derek McGinty.
-		     `and' takes any number of arguments.
+                     selectors match the message.  Example:
+                        (and (author \"Derek McGinty\") (new))
+                     matches all new messages from Derek McGinty.
+                     `and' takes any number of arguments. 
    any             - matches any message.
    deleted         - matches message if it is flagged for deletion.
    edited          - matches message if it has been edited.
    forwarded       - matches message if it has been forwarded using
 		     a variant of `vm-forward-message' or `vm-send-digest'.
    header          - matches message if ARG matches any part of the header
-		     portion of the message; ARG should be a
-		     regular expression.
+                     portion of the message; ARG should be a
+                     regular expression. 
    header-or-text  - matches message if ARG matches any part of the
 		     headers or the text portion of the message;
 		     ARG should be a regular expression.
    label           - matches message if message has a label named ARG.
    less-chars-than - matches message if message has less than ARG
-		     characters.  ARG should be a number.
+                     characters.  ARG should be a number.
    less-lines-than - matches message if message has less than ARG
-		     lines.  ARG should be a number.
+                     lines.  ARG should be a number.
    more-chars-than - matches message if message has more than ARG
-		     characters.  ARG should be a number.
+                     characters.  ARG should be a number.
    more-lines-than - matches message if message has more than ARG
-		     lines.  ARG should be a number.
+                     lines.  ARG should be a number.
    marked          - matches message if it is marked, as with `vm-mark-message'.
    new             - matches message if it is new.
    not             - matches message only if its selector argument
-		     does NOT match the message.  Example:
-		       (not (deleted))
-		     matches messages that are not deleted.
+                     does NOT match the message.  Example:
+                       (not (deleted))
+                     matches messages that are not deleted.
    or              - matches the message if any of its argument
-		     selectors match the message.  Example:
-			(or (author \"Dave Weckl\") (subject \"drum\"))
-		     matches messages from Dave Weckl or messages
-		     with the word \"drum\" in their Subject header.
-		     `or' takes any number of arguments.
+                     selectors match the message.  Example:
+                        (or (author \"Dave Weckl\") (subject \"drum\"))
+                     matches messages from Dave Weckl or messages
+                     with the word \"drum\" in their Subject header.
+                     `or' takes any number of arguments.
    read            - matches message if it is neither new nor unread.
    recent	   - matches message if it is new.
    recipient       - matches message if ARG matches any part of the recipient
-		     list of the message.  ARG should be a regular expression.
+                     list of the message.  ARG should be a regular expression.
    redistributed   - matches message if it has been redistributed using
 		     `vm-resend-message'.
    replied         - matches message if it has been replied to.
    sent-after      - matches message if it was sent after the date ARG.
-		     A fully specified date looks like this:
-		       \"31 Dec 1999 23:59:59 GMT\"
-		     although the parts can appear in any order.
-		     You can leave out any part and it will
-		     default to the current date's value for that
-		     part, with the exception of the hh:mm:ss
-		     part which defaults to midnight.
+                     A fully specified date looks like this:
+                       \"31 Dec 1999 23:59:59 GMT\"
+                     although the parts can appear in any order.
+                     You can leave out any part and it will
+                     default to the current date's value for that
+                     part, with the exception of the hh:mm:ss
+                     part which defaults to midnight.
    sent-before     - matches message if it was sent before the date ARG.
-		     A fully specified date looks like this:
-		       \"31 Dec 1999 23:59:59 GMT\"
-		     although the parts can appear in any order.
-		     You can leave out any part and it will
-		     default to the current date's value for that
-		     part, with the exception of the hh:mm:ss
-		     part which defaults to midnight.
+                     A fully specified date looks like this:
+                       \"31 Dec 1999 23:59:59 GMT\"
+                     although the parts can appear in any order.
+                     You can leave out any part and it will
+                     default to the current date's value for that
+                     part, with the exception of the hh:mm:ss
+                     part which defaults to midnight.
    subject         - matches message if ARG matches any part of the message's
-		     subject; ARG should be a regular expression.
+                     subject; ARG should be a regular expression.
    text            - matches message if ARG matches any part of the text
-		     portion of the message; ARG should be a
-		     regular expression.
+                     portion of the message; ARG should be a
+                     regular expression.
    unanswered	   - matches message if it has not been replied to.
 		     Same as the `unreplied' selector.
    undeleted	   - matches message if it has not been deleted.
   :type 'boolean)
 
 (defcustom vm-digest-preamble-format "\"%s\" (%F)"
-  "*String which specifies the format of the preamble lines generated by
+  "*String which specifies the format of the preamble lines generated by 
 `vm-send-digest' when it is invoked with a prefix argument.  One
 line will be generated for each message put into the digest.  See the
 documentation for the variable `vm-summary-format' for information
        the field width and precision for the concatentation of
        group of format specifiers.  Example: \"%.35(%d, %t, %f%)\"
        specifies a maximum display width of 35 characters for the
-       concatenation of the content description, content type and
+       concatenation of the content description, content type and 
        suggested file name.
    ) - ends a group.
 
 Consider this variable experimental; it may not be supported forever."
   :type 'sexp)
 
-(defcustom vm-use-menus
+(defcustom vm-use-menus 
   (nconc (list 'folder 'motion 'send 'mark 'label 'sort 'virtual)
 	 (cond ((string-match ".*-.*-\\(win95\\|nt\\)" system-configuration)
 		nil)
 object itself.  The specification should be a list of symbols
 with the following meanings
 
-	lynx - means VM should try to use the lynx program.
-	wget - means VM should try to use the wget program.
-	 w3m - means VM should try to use the w3m program.
+        lynx - means VM should try to use the lynx program.
+        wget - means VM should try to use the wget program.
+         w3m - means VM should try to use the w3m program.
        fetch - means VM should try to use the fetch program.
-	curl - means VM should try to use the curl program.
+        curl - means VM should try to use the curl program.
 
 The list can contain all these values and VM will try them all,
 but not in any particular order, except that the url-w3 method
   :type 'hook)
 
 (defcustom vm-mime-display-function nil
-  "*If non-nil, this should name a function to be called inside
+  "*If non-nil, this should name a function to be called inside 
 `vm-decode-mime-message' to do the MIME display the current
 message.  The function is called with no arguments, and at the
 time of the call the current buffer will be the `presentation'
   :type '(repeat string))
 
 (defcustom vm-konqueror-client-program "kfmclient"
-  "*Name of program to use to issue requests to Konqueror.
+  "*Name of program to use to issue requests to Konqueror. 
 `vm-mouse-send-url-to-konqueror' uses this."
   :type 'string)
 
 (defcustom vm-stunnel-program-switches nil
   "*List of command line switches to pass to stunnel.
 Leave this set to nil unless you understand how VM uses stunnel
-and know that you need to change something to get stunnel working."
-  :type '(repeat string))
+and know that you need to change something to get stunnel working.
+This variable is ignored if you're running stunnel version 4 or
+later versions, since those versions of stunnel are configurable
+only with a configuration file."
+  :type '(list string))
+
+(defcustom vm-stunnel-program-additional-configuration-file nil
+  "*Name of a configuration file to append to the config file VM creates
+when using stunnel version 4 or later.  Leave this set to nil
+unless you understand how VM uses stunnel and know that you need
+to change something to get stunnel working.
+
+For stunnel version 4 and beyond stunnel relies on a configuration
+file to tell it what to do.  VM builts te ncessary configuration
+file for each instance of stunnel that it runs.  If you have extra
+configuration options you want stunnel to use, put them in a file
+and set vm-stunnel-program-additional-configuration-file to the
+name of that file.
+
+This variable is ignored if you're running stunnel versions prior
+to version 4 as VM uses command line argument to control stunnel
+in those cases."
+  :type 'string)
 
 (defcustom vm-stunnel-random-data-method 'generate
   "*Specifies what VM should do about sending the PRNG.
     (define-key map "M" (make-sparse-keymap))
     (define-key map "MN" 'vm-next-command-uses-marks)
     (define-key map "Mn" 'vm-next-command-uses-marks)
-    (define-key map "MM" 'vm-mark-message)
+    (define-key map "MM" 'vm-mark-message) 
     (define-key map "MU" 'vm-unmark-message)
     (define-key map "Mm" 'vm-mark-all-messages)
     (define-key map "Mu" 'vm-clear-all-marks)
 (defvar vm-folders-summary-mode-map vm-mode-map
   "Keymap for VM Folders Summary mode")
 
-(defvar vm-mail-mode-map
+(defvar vm-mail-mode-map 
   (let ((map (make-sparse-keymap)))
     (define-key map "\C-c\C-v" vm-mode-map)
     (define-key map "\C-c\C-p" 'vm-preview-composition)
 
 (defvar vm-mime-reader-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "$a" 'vm-mime-attach-object-from-message)
-    (define-key map "$s" 'vm-mime-reader-map-save-message)
-    (define-key map "$w" 'vm-mime-reader-map-save-file)
-    (define-key map "$|" 'vm-mime-reader-map-pipe-to-command)
-    (define-key map "$p" 'vm-mime-reader-map-pipe-to-printer)
+    (define-key map "\r" 'vm-mime-run-display-function-at-point)
     (define-key map "$\r" 'vm-mime-reader-map-display-using-default)
-    (define-key map "$d" 'vm-delete-mime-object)
     (define-key map "$e" 'vm-mime-reader-map-display-using-external-viewer)
     (define-key map "$v" 'vm-mime-reader-map-display-object-as-type)
-    (define-key map "\r" 'vm-mime-run-display-function-at-point)
+    (define-key map "$w" 'vm-mime-reader-map-save-file)
+    (define-key map "$s" 'vm-mime-reader-map-save-message)
+    (define-key map "$p" 'vm-mime-reader-map-pipe-to-printer)
+    (define-key map "$|" 'vm-mime-reader-map-pipe-to-command)
+    (define-key map "$a" 'vm-mime-attach-object-from-message)
+    (define-key map "$d" 'vm-delete-mime-object)
     (cond ((vm-mouse-xemacs-mouse-p)
 	   (define-key map 'button3 'vm-menu-popup-mime-dispose-menu)))
     (cond ((fboundp 'set-keymap-name)
 	  )
 	 ))
   "Alist that maps MIME character sets to MULE coding systems.")
-
+	  
 (defvar vm-mime-mule-charset-to-charset-alist
   '(
     (latin-iso8859-1	"iso-8859-1")
 (defvar vm-stunnel-random-data-file nil)
 (defvar vm-stunnel-configuration-file nil)
 (defvar vm-fsfemacs-cached-scroll-bar-width nil)
+(defvar vm-update-composition-buffer-name-timer nil)
 
 (cond (vm-faked-defcustom
        (fmakunbound 'defcustom)
 ;;(provide 'vm)
 ;;(provide 'vm-version)
 
-(defconst vm-version "7.17"
+(defconst vm-version "7.19"
   "Version number of VM.")
 
 (defun vm-version ()
 @sp 6
 @center @titlefont{VM User's Manual}
 @sp 4
-@center VM Version 7.17
+@center VM Version 7.19
 @sp 5
 @center Kyle E. Jones
 @center @t{kyle_jones@@wonderworks.com}