* qp.el (quoted-printable-encode-region): Bind tab-width to 1. Set limit to 76.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 10 May 2000 16:23:28 +0000 (16:23 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 10 May 2000 16:23:28 +0000 (16:23 +0000)
lisp/ChangeLog
lisp/qp.el

index 936ba01..a7238c6 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-10 12:17:58  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * qp.el (quoted-printable-encode-region): Bind tab-width to 1. Set
+       limit to 76.
+
 2000-05-10 09:11:48  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnslashdot.el (nnslashdot-sid-strip): New function.
index 93c3f7e..ea2a818 100644 (file)
@@ -115,23 +115,24 @@ encode lines starting with \"From\"."
             (delete-char 1)))))
       (when (or fold mm-use-ultra-safe-encoding)
        ;; Fold long lines.
-       (goto-char (point-min))
-       (while (not (eobp))
-         ;; In ultra-safe mode, encode "From " at the beginning of a
-         ;; line.
-         (when mm-use-ultra-safe-encoding
-           (beginning-of-line)
-           (when (looking-at "From ")
-             (replace-match "From=20" nil t)))
-         (end-of-line)
-         (while (> (current-column) 72)
-           (beginning-of-line)
-           (forward-char 71);; 71 char plus an "="
-           (search-backward "=" (- (point) 2) t)
-           (insert "=\n")
-           (end-of-line))
-         (unless (eobp)
-           (forward-line)))))))
+       (let ((tab-width 1)) ;; HTAB is one character.
+         (goto-char (point-min))
+         (while (not (eobp))
+           ;; In ultra-safe mode, encode "From " at the beginning of a
+           ;; line.
+           (when mm-use-ultra-safe-encoding
+             (beginning-of-line)
+             (when (looking-at "From ")
+               (replace-match "From=20" nil t)))
+           (end-of-line)
+           (while (> (current-column) 76) ;; tab-width must be 1.
+             (beginning-of-line)
+             (forward-char 75);; 75 chars plus an "="
+             (search-backward "=" (- (point) 2) t)
+             (insert "=\n")
+             (end-of-line))
+           (unless (eobp)
+             (forward-line))))))))
 
 (defun quoted-printable-encode-string (string)
   "QP-encode STRING and return the results."