aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/rfc2047.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el
index e3315120d82..a02201ec323 100644
--- a/lisp/mail/rfc2047.el
+++ b/lisp/mail/rfc2047.el
@@ -732,12 +732,19 @@ Point moves to the end of the region."
732 (save-restriction 732 (save-restriction
733 (narrow-to-region b e) 733 (narrow-to-region b e)
734 (goto-char (point-min)) 734 (goto-char (point-min))
735 (let ((break nil) 735 (let* ((break nil)
736 (qword-break nil) 736 (qword-break nil)
737 (first t) 737 (bol (save-restriction
738 (bol (save-restriction 738 (widen)
739 (widen) 739 (line-beginning-position)))
740 (point-at-bol)))) 740 ;; This function is either called with the Header: name in
741 ;; the region or not. If it's not in the region, then we
742 ;; may already have a space.
743 (first (or (= bol (point))
744 (save-restriction
745 (widen)
746 (save-excursion
747 (not (re-search-backward "[ \t]" bol t)))))))
741 (while (not (eobp)) 748 (while (not (eobp))
742 (when (and (or break qword-break) 749 (when (and (or break qword-break)
743 (> (- (point) bol) 76)) 750 (> (- (point) bol) 76))