From: tmorioka Date: Sat, 1 Mar 1997 02:30:29 +0000 (+0000) Subject: (mime-edit-make-boundary): New function. X-Git-Tag: Hokutetsu-Ishikawa-new~214 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=496c375ed21cef9342db75982651ec239c6fd38f;p=elisp%2Fsemi.git (mime-edit-make-boundary): New function. (mime-edit-translate-body, mime-edit-translate-region): Use `mime-edit-make-boundary'. --- diff --git a/mime-edit.el b/mime-edit.el index ff450db..290784b 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -7,7 +7,7 @@ ;; Maintainer: MORIOKA Tomohiko ;; Created: 1994/08/21 renamed from mime.el ;; Renamed: 1997/2/21 from tm-edit.el -;; Version: $Revision: 0.50 $ +;; Version: $Revision: 0.51 $ ;; Keywords: MIME, multimedia, multilingual, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -121,7 +121,7 @@ ;;; (defconst mime-edit-RCS-ID - "$Id: mime-edit.el,v 0.50 1997-03-01 02:12:48 tmorioka Exp $") + "$Id: mime-edit.el,v 0.51 1997-03-01 02:30:29 tmorioka Exp $") (defconst mime-edit-version (get-version-string mime-edit-RCS-ID)) @@ -1731,14 +1731,16 @@ Content-Transfer-Encoding: 7bit arg)))) str "") ) +(defun mime-edit-make-boundary () + (concat mime-multipart-boundary "_" + (replace-space-with-underline (current-time-string)) + )) + (defun mime-edit-translate-body () "Encode the tagged MIME body in current buffer in MIME compliant message." (interactive) (save-excursion - (let ((boundary - (concat mime-multipart-boundary "_" - (replace-space-with-underline (current-time-string)) - )) + (let ((boundary (mime-edit-make-boundary)) (i 1) ret) (while (mime-edit-process-multipart-1 @@ -1810,11 +1812,9 @@ Content-Transfer-Encoding: 7bit t))) (defun mime-edit-translate-region (beg end &optional boundary multipart) - (if (null boundary) - (setq boundary - (concat mime-multipart-boundary "_" - (replace-space-with-underline (current-time-string)))) - ) + (or boundary + (setq boundary (mime-edit-make-boundary)) + ) (save-excursion (save-restriction (narrow-to-region beg end)