Synch to No Gnus 200411282151.
[elisp/gnus.git-] / lisp / gnus-msg.el
index 5101576..50c625c 100644 (file)
@@ -307,6 +307,7 @@ If nil, Gnus will never ask for confirmation if replying to mail."
   "If non-nil, Gnus tries to suggest a default address to resend to.
 If nil, the address field will always be empty after invoking
 `gnus-summary-resend-message'."
+  :version "21.4"
   :group 'gnus-message
   :type 'boolean)
 
@@ -1784,7 +1785,8 @@ The source file has to be in the Emacs load path."
     ;; Remove any control chars - they seem to cause trouble for some
     ;; mailers.  (Byte-compiled output from the stuff above.)
     (goto-char point)
-    (while (re-search-forward "[\000-\010\013-\037\200-\237]" nil t)
+    (while (re-search-forward (string-as-multibyte
+                              "[\000-\010\013-\037\200-\237]") nil t)
       (replace-match (format "\\%03o" (string-to-char (match-string 0)))
                     t t))
     ;; Break MIME tags purposely.
@@ -2163,10 +2165,12 @@ this is a reply."
       (when (and filep v)
        (setq v (with-temp-buffer
                  (insert-file-contents v)
-                 (goto-char (point-max))
-                 (while (bolp)
-                   (delete-char -1))
-                 (buffer-string))))
+                 (buffer-substring (point-min)
+                                   (progn
+                                     (goto-char (point-max))
+                                     (if (zerop (skip-chars-backward "\n"))
+                                         (point)
+                                       (1+ (point))))))))
       (if (eq element 'import)
          (progn
            (if (member v stack)