From 68b65338d4d2d9c2f8b198271276873a74cef120 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 28 May 1996 02:52:49 +0000 Subject: [PATCH] (mime-editor/multipart-beginning-regexp): Don't require begging new-line. (defconst mime-editor/multipart-end-regexp): Don't require begging new-line. (mime-editor/find-inmost): modified for new enclosure tag rule. (mime-editor/translate-region): modified for new enclosure tag rule. (mime-editor/enclose-region): modified for new enclosure tag rule. --- mime-edit.el | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/mime-edit.el b/mime-edit.el index 3c2cfb9..42fdb75 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -9,7 +9,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/08/21 renamed from mime.el by UMEDA Masanobu; ;;; 1996/05/24 renamed from tm-edit.el -;;; Version: $Revision: 0.14 $ +;;; Version: $Revision: 0.15 $ ;;; Keywords: mail, news, MIME, multimedia, multilingual ;;; ;;; This file is part of SEMI (September, Emacs MIME Interface) @@ -123,7 +123,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: mime-edit.el,v 0.14 1996-05-26 05:04:20 morioka Exp $") + "$Id: mime-edit.el,v 0.15 1996-05-28 02:52:49 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -478,9 +478,9 @@ Each elements are regexp of field-name. [mime-edit.el]") (defconst mime-editor/quoted-single-part-tag-regexp (concat "- " (substring mime-editor/single-part-tag-regexp 1))) -(defconst mime-editor/multipart-beginning-regexp "^--<<\\([^<>]+\\)>>-{\n") +(defconst mime-editor/multipart-beginning-regexp "--<<\\([^<>]+\\)>>-{\n") -(defconst mime-editor/multipart-end-regexp "^--}-<<\\([^<>]+\\)>>\n") +(defconst mime-editor/multipart-end-regexp "--}-<<\\([^<>]+\\)>>\n") (defconst mime-editor/beginning-tag-regexp (regexp-or mime-editor/single-part-tag-regexp @@ -1414,7 +1414,7 @@ while if FLAG is `\\^M' (control-M) the text is hidden." (be (match-end 0)) (type (buffer-substring (match-beginning 1)(match-end 1))) end-exp eb ee) - (setq end-exp (format "^--}-<<%s>>\n" type)) + (setq end-exp (format "--}-<<%s>>\n" type)) (widen) (if (re-search-forward end-exp nil t) (progn @@ -1934,10 +1934,8 @@ Content-Transfer-Encoding: 7bit (setq encoding "7bit") ;; Insert the trailer. (goto-char (point-max)) - (if multipart - (insert "--" boundary "--\n") - (insert "\n--" boundary "--\n") - ))) + (insert "\n--" boundary "--\n") + )) (list contype encoding boundary nparts) )))) @@ -2142,24 +2140,18 @@ a recording host instead of local host." (defun mime-editor/enclose-region (type beg end) (save-excursion (goto-char beg) - (let ((current (point)) - need-new-line) - (or (bolp) - (setq need-new-line t)) + (let ((current (point))) (save-restriction (narrow-to-region beg end) - (if need-new-line - (insert "\n") - ) (insert (format "--<<%s>>-{\n" type)) (goto-char (point-max)) - (insert (format "\n--}-<<%s>>\n" type)) + (insert (format "--}-<<%s>>\n" type)) (goto-char (point-max)) ) - (if (and (not (looking-at mime-editor/single-part-tag-regexp)) - (not (eobp))) + (or (looking-at mime-editor/beginning-tag-regexp) + (eobp) (insert (mime-make-text-tag) "\n") - ) + ) ))) (defun mime-editor/enclose-quote-region (beg end) -- 1.7.10.4