mm-util.el (mm-find-buffer-file-coding-system): Don't forget to kill the temp buffer.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 20 Jan 2011 23:39:24 +0000 (23:39 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 20 Jan 2011 23:39:24 +0000 (23:39 +0000)
message.el (message-mailer-swallows-blank-line): Use with-temp-buffer.

lisp/ChangeLog
lisp/message.el
lisp/mm-util.el

index c34c4ea..2ff2d9a 100644 (file)
@@ -1,3 +1,9 @@
+2011-01-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mm-util.el (mm-find-buffer-file-coding-system): Don't forget to kill
+       the temp buffer.
+       * message.el (message-mailer-swallows-blank-line): Use with-temp-buffer.
+
 2011-01-20  Julien Danjou  <julien@danjou.info>
 
        * mm-decode.el (mm-inline-media-tests): Add text/x-sh.
index f514fd7..7f83f0a 100644 (file)
@@ -1228,14 +1228,11 @@ called and its result is inserted."
   (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)"
                         system-configuration)
           (file-readable-p "/etc/sendmail.cf")
-          (let ((buffer (get-buffer-create " *temp*")))
-            (unwind-protect
-                (with-current-buffer buffer
-                  (insert-file-contents "/etc/sendmail.cf")
-                  (goto-char (point-min))
-                  (let ((case-fold-search nil))
-                    (re-search-forward "^OR\\>" nil t)))
-              (kill-buffer buffer))))
+          (with-temp-buffer
+             (insert-file-contents "/etc/sendmail.cf")
+             (goto-char (point-min))
+             (let ((case-fold-search nil))
+               (re-search-forward "^OR\\>" nil t))))
       ;; According to RFC822, "The field-name must be composed of printable
       ;; ASCII characters (i. e., characters that have decimal values between
       ;; 33 and 126, except colon)", i. e., any chars except ctl chars,
index 99766e6..4012a7f 100644 (file)
@@ -1604,7 +1604,7 @@ gzip, bzip2, etc. are allowed."
        (insert decomp)
        (setq filename (file-name-sans-extension filename)))
       (goto-char (point-min))
-      (prog1
+      (unwind-protect
          (cond
           ((boundp 'set-auto-coding-function) ;; Emacs
            (if filename