emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 46ef01f: Fix encoding problem introduced by previou


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 46ef01f: Fix encoding problem introduced by previous patch series
Date: Sat, 13 Feb 2016 03:32:21 +0000

branch: master
commit 46ef01fc88964d7283b923354f4ba814d98e80a0
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Fix encoding problem introduced by previous patch series
    
    * 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   |    4 ++--
 lisp/gnus/mml-smime.el |    2 +-
 lisp/gnus/mml2015.el   |    2 +-
 lisp/gnus/rfc2047.el   |    6 +++---
 lisp/gnus/rfc2231.el   |    6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index e23fb1a..b441750 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -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
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index e7ee6e7..f7cf71a 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -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))
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index ca9b377..309f1a7 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -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
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index 2862bb3..b05dfc1 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -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))
diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el
index f5f0c81..128779a 100644
--- a/lisp/gnus/rfc2231.el
+++ b/lisp/gnus/rfc2231.el
@@ -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



reply via email to

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