aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-13 14:31:53 +1100
committerLars Ingebrigtsen2016-02-13 14:31:53 +1100
commit46ef01fc88964d7283b923354f4ba814d98e80a0 (patch)
tree5d6a8d120a21731ecbea3007559cc4ac86022323
parent1279f93176495759bfecf4070d0e3593e30baa50 (diff)
downloademacs-46ef01fc88964d7283b923354f4ba814d98e80a0.tar.gz
emacs-46ef01fc88964d7283b923354f4ba814d98e80a0.zip
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.
-rw-r--r--lisp/gnus/mml-sec.el4
-rw-r--r--lisp/gnus/mml-smime.el2
-rw-r--r--lisp/gnus/mml2015.el2
-rw-r--r--lisp/gnus/rfc2047.el6
-rw-r--r--lisp/gnus/rfc2231.el6
5 files changed, 10 insertions, 10 deletions
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index e23fb1a27f2..b4417507b8a 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. "
949 (if (eq 'OpenPGP protocol) 949 (if (eq 'OpenPGP protocol)
950 (epg-sign-string context (buffer-string) mode) 950 (epg-sign-string context (buffer-string) mode)
951 (epg-sign-string context 951 (epg-sign-string context
952 (replace-regexp-in-string (buffer-string) 952 (replace-regexp-in-string
953 "\n" "\r\n") 953 "\n" "\r\n" (buffer-string))
954 t)) 954 t))
955 mml-secure-secret-key-id-list nil) 955 mml-secure-secret-key-id-list nil)
956 (error 956 (error
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index e7ee6e7c889..f7cf71adf62 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -424,7 +424,7 @@ Content-Disposition: attachment; filename=smime.p7m
424 (mm-set-handle-multipart-parameter 424 (mm-set-handle-multipart-parameter
425 mm-security-handle 'gnus-info "Corrupted") 425 mm-security-handle 'gnus-info "Corrupted")
426 (throw 'error handle)) 426 (throw 'error handle))
427 (setq part (replace-regexp-in-string part "\n" "\r\n") 427 (setq part (replace-regexp-in-string "\n" "\r\n" part)
428 context (epg-make-context 'CMS)) 428 context (epg-make-context 'CMS))
429 (condition-case error 429 (condition-case error
430 (setq plain (epg-verify-string context (mm-get-part signature) part)) 430 (setq plain (epg-verify-string context (mm-get-part signature) part))
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index ca9b3777c35..309f1a77ff0 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'."
926 (mm-set-handle-multipart-parameter 926 (mm-set-handle-multipart-parameter
927 mm-security-handle 'gnus-info "Corrupted") 927 mm-security-handle 'gnus-info "Corrupted")
928 (throw 'error handle)) 928 (throw 'error handle))
929 (setq part (replace-regexp-in-string part "\n" "\r\n") 929 (setq part (replace-regexp-in-string "\n" "\r\n" part)
930 signature (mm-get-part signature) 930 signature (mm-get-part signature)
931 context (epg-make-context)) 931 context (epg-make-context))
932 (condition-case error 932 (condition-case error
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index 2862bb3a810..b05dfc1e109 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -554,7 +554,7 @@ Dynamically bind `rfc2047-encoding-type' to change that."
554 (if (or debug-on-quit debug-on-error) 554 (if (or debug-on-quit debug-on-error)
555 (signal (car err) (cdr err)) 555 (signal (car err) (cdr err))
556 (error "Invalid data for rfc2047 encoding: %s" 556 (error "Invalid data for rfc2047 encoding: %s"
557 (replace-regexp-in-string orig-text "[ \t\n]+" " ")))))))) 557 (replace-regexp-in-string "[ \t\n]+" " " orig-text))))))))
558 (unless dont-fold 558 (unless dont-fold
559 (rfc2047-fold-region b (point))) 559 (rfc2047-fold-region b (point)))
560 (goto-char (point-max)))) 560 (goto-char (point-max))))
@@ -699,8 +699,8 @@ Point moves to the end of the region."
699 (setq eword (rfc2047-encode-1 699 (setq eword (rfc2047-encode-1
700 (- b (point-at-bol)) 700 (- b (point-at-bol))
701 (replace-regexp-in-string 701 (replace-regexp-in-string
702 (buffer-substring-no-properties b e) 702 "\n\\([ \t]?\\)" "\\1"
703 "\n\\([ \t]?\\)" "\\1") 703 (buffer-substring-no-properties b e))
704 cs 704 cs
705 (or (cdr (assq encoding 705 (or (cdr (assq encoding
706 rfc2047-encode-function-alist)) 706 rfc2047-encode-function-alist))
diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el
index f5f0c818294..128779ab4c6 100644
--- a/lisp/gnus/rfc2231.el
+++ b/lisp/gnus/rfc2231.el
@@ -63,13 +63,13 @@ must never cause a Lisp error."
63 (let (mod) 63 (let (mod)
64 (when (and (string-match "\\\\\"" string) 64 (when (and (string-match "\\\\\"" string)
65 (not (string-match "\\`\"\\|[^\\]\"" string))) 65 (not (string-match "\\`\"\\|[^\\]\"" string)))
66 (setq string (replace-regexp-in-string string "\\\\\"" "\"") 66 (setq string (replace-regexp-in-string "\\\\\"" "\"" string)
67 mod t)) 67 mod t))
68 (when (and (string-match "\\\\(" string) 68 (when (and (string-match "\\\\(" string)
69 (string-match "\\\\)" string) 69 (string-match "\\\\)" string)
70 (not (string-match "\\`(\\|[^\\][()]" string))) 70 (not (string-match "\\`(\\|[^\\][()]" string)))
71 (setq string (replace-regexp-in-string string 71 (setq string (replace-regexp-in-string
72 "\\\\\\([()]\\)" "\\1") 72 "\\\\\\([()]\\)" "\\1" string)
73 mod t)) 73 mod t))
74 (or (and mod 74 (or (and mod
75 (ignore-errors 75 (ignore-errors