From: morioka Date: Sat, 25 May 1996 20:47:32 +0000 (+0000) Subject: (mime-editor/normalize-body): fixed. X-Git-Tag: Hokutetsu-Ishikawa-new~391 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d03a08c5350626b8935efc4475ffda42f1c2f27;p=elisp%2Fsemi.git (mime-editor/normalize-body): fixed. (mime-editor/content-end): Used function `invisible-p' and `next-visible-point'. --- diff --git a/mime-edit.el b/mime-edit.el index 7355461..59de222 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.11 $ +;;; Version: $Revision: 0.12 $ ;;; 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.11 1996-05-25 20:05:20 morioka Exp $") + "$Id: mime-edit.el,v 0.12 1996-05-25 20:47:32 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -1142,34 +1142,15 @@ Optional argument ENCODING specifies an encoding method such as base64." (if (mime-editor/goto-tag) (let ((top (point))) (goto-char (match-end 0)) - (cond ((and (= (save-excursion - (beginning-of-line) - (point)) - (save-excursion - (goto-char beg) - (beginning-of-line) - (point))) ;Must be on the same line. - (= (following-char) ?\^M) - ) - (end-of-line) - (point) - ) - ((get-text-property (point) 'invisible) - (while (and (let ((p (next-property-change (point)))) - (and p (goto-char p)) - ) - (get-text-property (point) 'invisible) - )) - (point) - ) - (t - ;; Move to the end of this text. - (if (re-search-forward mime-editor/tag-regexp nil 'move) - ;; Don't forget a multiline tag. - (goto-char (match-beginning 0)) - ) - (point) - ))) + (if (invisible-p (point)) + (next-visible-point (point)) + ;; Move to the end of this text. + (if (re-search-forward mime-editor/tag-regexp nil 'move) + ;; Don't forget a multiline tag. + (goto-char (1- (match-beginning 0))) + ) + (point) + )) ;; Assume the message begins with text/plain. (goto-char (mime-editor/content-beginning)) (if (re-search-forward mime-editor/tag-regexp nil 'move) @@ -1982,9 +1963,11 @@ Content-Transfer-Encoding: 7bit ) (goto-char (1+ end)) (or (looking-at mime-editor/beginning-tag-regexp) + (eobp) (insert (mime-make-text-tag) "\n") ) (visible-region beg end) + (goto-char beg) ) (cond ((mime-test-content-type contype "message")