]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix encoding problem introduced by previous patch series
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Feb 2016 03:31:53 +0000 (14:31 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Feb 2016 03:31:53 +0000 (14:31 +1100)
* lisp/gnus/rfc2047.el: Ditto (bug#22648).

* lisp/gnus/rfc2231.el: Fix problem created by the
mm-replace-in-string conversion.

lisp/gnus/mml-sec.el
lisp/gnus/mml-smime.el
lisp/gnus/mml2015.el
lisp/gnus/rfc2047.el
lisp/gnus/rfc2231.el

index e23fb1a27f21cdf87bc7dbe2d141f487b80b0002..b4417507b8a41368a8436752f82a645ff574b9d7 100644 (file)
@@ -949,8 +949,8 @@ If no one is selected, symmetric encryption will be performed.  "
              (if (eq 'OpenPGP protocol)
                  (epg-sign-string context (buffer-string) mode)
                (epg-sign-string context
-                                (replace-regexp-in-string (buffer-string)
-                                                          "\n" "\r\n")
+                                (replace-regexp-in-string
+                                 "\n" "\r\n" (buffer-string))
                                 t))
              mml-secure-secret-key-id-list nil)
       (error
index e7ee6e7c8890181f40a668d119f9398b68f92b97..f7cf71adf62538b89b0b0c1e97ad81b01f307ad4 100644 (file)
@@ -424,7 +424,7 @@ Content-Disposition: attachment; filename=smime.p7m
        (mm-set-handle-multipart-parameter
         mm-security-handle 'gnus-info "Corrupted")
        (throw 'error handle))
-      (setq part (replace-regexp-in-string part "\n" "\r\n")
+      (setq part (replace-regexp-in-string "\n" "\r\n" part)
            context (epg-make-context 'CMS))
       (condition-case error
          (setq plain (epg-verify-string context (mm-get-part signature) part))
index ca9b3777c35948475c165674c895d77310a65647..309f1a77ff0004577bd9d70909be0af052cb1525 100644 (file)
@@ -926,7 +926,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
        (mm-set-handle-multipart-parameter
         mm-security-handle 'gnus-info "Corrupted")
        (throw 'error handle))
-      (setq part (replace-regexp-in-string part "\n" "\r\n")
+      (setq part (replace-regexp-in-string "\n" "\r\n" part)
            signature (mm-get-part signature)
            context (epg-make-context))
       (condition-case error
index 2862bb3a810598d3c533d5cf94fa049506970ccb..b05dfc1e109b1ae2ca0e99e3b84c5b66c9205419 100644 (file)
@@ -554,7 +554,7 @@ Dynamically bind `rfc2047-encoding-type' to change that."
             (if (or debug-on-quit debug-on-error)
                 (signal (car err) (cdr err))
               (error "Invalid data for rfc2047 encoding: %s"
-                     (replace-regexp-in-string orig-text "[ \t\n]+" " "))))))))
+                     (replace-regexp-in-string "[ \t\n]+" " " orig-text))))))))
     (unless dont-fold
       (rfc2047-fold-region b (point)))
     (goto-char (point-max))))
@@ -699,8 +699,8 @@ Point moves to the end of the region."
             (setq eword (rfc2047-encode-1
                          (- b (point-at-bol))
                          (replace-regexp-in-string
-                          (buffer-substring-no-properties b e)
-                          "\n\\([ \t]?\\)" "\\1")
+                          "\n\\([ \t]?\\)" "\\1"
+                          (buffer-substring-no-properties b e))
                          cs
                          (or (cdr (assq encoding
                                         rfc2047-encode-function-alist))
index f5f0c8182942d9fa6efb7a67038d7bbae00a025b..128779ab4c6946830bf3dec2bbc00943a1fd6bdf 100644 (file)
@@ -63,13 +63,13 @@ must never cause a Lisp error."
          (let (mod)
            (when (and (string-match "\\\\\"" string)
                       (not (string-match "\\`\"\\|[^\\]\"" string)))
-             (setq string (replace-regexp-in-string string "\\\\\"" "\"")
+             (setq string (replace-regexp-in-string "\\\\\"" "\"" string)
                    mod t))
            (when (and (string-match "\\\\(" string)
                       (string-match "\\\\)" string)
                       (not (string-match "\\`(\\|[^\\][()]" string)))
-             (setq string (replace-regexp-in-string string
-                                                    "\\\\\\([()]\\)" "\\1")
+             (setq string (replace-regexp-in-string
+                           "\\\\\\([()]\\)" "\\1" string)
                    mod t))
            (or (and mod
                     (ignore-errors