From eafc2ce92faef90be8b817bda0086835f7afa36f Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 11 Jan 1998 17:01:50 +0000 Subject: [PATCH] mel of MEL 1.9. --- mel-q.el | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/mel-q.el b/mel-q.el index ae3e38a..23475bf 100644 --- a/mel-q.el +++ b/mel-q.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: mel-q.el,v 1.8 1995/08/27 19:29:17 morioka Exp $ +;;; $Id: mel-q.el,v 1.9 1995/09/09 05:14:23 morioka Exp $ ;;; ;;; @ constants @@ -106,30 +106,22 @@ external decoder is called.") (save-restriction (narrow-to-region beg end) (goto-char (point-min)) - (while (re-search-forward "^.*$" nil t) - (replace-match - (quoted-printable-encode-string - (buffer-substring (match-beginning 0)(match-end 0)) - )) - )))) - -(defun quoted-printable-internal-decode-region (beg end) - (save-excursion - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (while (re-search-forward "=\n" nil t) - (replace-match "") - ) - (goto-char (point-min)) - (let (b e str) - (while (re-search-forward quoted-printable-octet-regexp nil t) - (setq b (match-beginning 0)) - (setq e (match-end 0)) - (setq str (buffer-substring b e)) - (delete-region b e) - (insert (quoted-printable-decode-string str)) - )) + (catch 'tag + (let (b e str) + (while t + (beginning-of-line) (setq b (point)) + (end-of-line) (setq e (point)) + (if (< b e) + (progn + (setq str (buffer-substring b e)) + (delete-region b e) + (insert (quoted-printable-encode-string str)) + )) + (if (eobp) + (throw 'tag nil) + ) + (forward-char 1) + ))) ))) (cond ((boundp 'MULE) -- 1.7.10.4