emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104438: * lisp/gnus/mml1991.el (mml1


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104438: * lisp/gnus/mml1991.el (mml1991-mailcrypt-encrypt): Remove use of ill-designed
Date: Mon, 30 May 2011 14:21:59 -0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104438
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2011-05-30 14:21:59 -0300
message:
  * lisp/gnus/mml1991.el (mml1991-mailcrypt-encrypt): Remove use of ill-designed
  mm-with-unibyte-current-buffer.  The buffer should not contain any
  multibyte chars anyway at this stage.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/mml1991.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-05-29 23:28:45 +0000
+++ b/lisp/gnus/ChangeLog       2011-05-30 17:21:59 +0000
@@ -1,3 +1,9 @@
+2011-05-30  Stefan Monnier  <address@hidden>
+
+       * mml1991.el (mml1991-mailcrypt-encrypt): Remove use of ill-designed
+       mm-with-unibyte-current-buffer.  The buffer should not contain any
+       multibyte chars anyway at this stage.
+
 2011-05-29  Lars Magne Ingebrigtsen  <address@hidden>
 
        * shr.el (shr-urlify): Use shr-add-font to make underlines be less ugly

=== modified file 'lisp/gnus/mml1991.el'
--- a/lisp/gnus/mml1991.el      2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/mml1991.el      2011-05-30 17:21:59 +0000
@@ -137,33 +137,32 @@
     (while (looking-at "^Content[^ ]+:") (forward-line))
     (unless (bobp)
       (delete-region (point-min) (point)))
-    (mm-with-unibyte-current-buffer
-      (with-temp-buffer
-       (inline (mm-disable-multibyte))
-       (setq cipher (current-buffer))
-       (insert-buffer-substring text)
-       (unless (mc-encrypt-generic
-                (or
-                 (message-options-get 'message-recipients)
-                 (message-options-set 'message-recipients
-                                      (read-string "Recipients: ")))
-                nil
-                (point-min) (point-max)
-                (message-options-get 'message-sender)
-                'sign)
-         (unless (> (point-max) (point-min))
-           (pop-to-buffer result-buffer)
-           (error "Encrypt error")))
-       (goto-char (point-min))
-       (while (re-search-forward "\r+$" nil t)
-         (replace-match "" t t))
-       (set-buffer text)
-       (delete-region (point-min) (point-max))
-       ;;(insert "Content-Type: application/pgp-encrypted\n\n")
-       ;;(insert "Version: 1\n\n")
-       (insert "\n")
-       (insert-buffer-substring cipher)
-       (goto-char (point-max))))))
+    (with-temp-buffer
+      (inline (mm-disable-multibyte))
+      (setq cipher (current-buffer))
+      (insert-buffer-substring text)
+      (unless (mc-encrypt-generic
+               (or
+                (message-options-get 'message-recipients)
+                (message-options-set 'message-recipients
+                                     (read-string "Recipients: ")))
+               nil
+               (point-min) (point-max)
+               (message-options-get 'message-sender)
+               'sign)
+        (unless (> (point-max) (point-min))
+          (pop-to-buffer result-buffer)
+          (error "Encrypt error")))
+      (goto-char (point-min))
+      (while (re-search-forward "\r+$" nil t)
+        (replace-match "" t t))
+      (set-buffer text)
+      (delete-region (point-min) (point-max))
+      ;;(insert "Content-Type: application/pgp-encrypted\n\n")
+      ;;(insert "Version: 1\n\n")
+      (insert "\n")
+      (insert-buffer-substring cipher)
+      (goto-char (point-max)))))
 
 ;; pgg wrapper
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]