diff options
| author | Stefan Monnier | 2008-03-12 19:40:14 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-12 19:40:14 +0000 |
| commit | f15a9fec25936a9e45b08776747a7320b04ad3ef (patch) | |
| tree | 06cd9c00827f86a6f84bc2ca1c56b55107695db3 | |
| parent | 944c87e0619c80ea22a795fd9df4755ed0b2f7b5 (diff) | |
| download | emacs-f15a9fec25936a9e45b08776747a7320b04ad3ef.tar.gz emacs-f15a9fec25936a9e45b08776747a7320b04ad3ef.zip | |
(rfc2047-decode-string): Don't use `m'. Avoid mm-string-as-multibyte as well.
| -rw-r--r-- | lisp/gnus/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/gnus/rfc2047.el | 28 |
2 files changed, 17 insertions, 14 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index fa1f94e4753..3e18bdd9c1f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-03-12 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-03-12 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * rfc2047.el (rfc2047-decode-string): Don't use `m'. | ||
| 4 | Avoid mm-string-as-multibyte as well. | ||
| 5 | |||
| 3 | * nnweb.el (nnweb-insert-html): | 6 | * nnweb.el (nnweb-insert-html): |
| 4 | Remove use of nnheader-string-as-multibyte. | 7 | Remove use of nnheader-string-as-multibyte. |
| 5 | 8 | ||
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index 45f251d4edd..fc184666ac5 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el | |||
| @@ -1094,17 +1094,17 @@ strings are stripped." | |||
| 1094 | "Decode MIME-encoded STRING and return the result. | 1094 | "Decode MIME-encoded STRING and return the result. |
| 1095 | If ADDRESS-MIME is non-nil, strip backslashes which precede characters | 1095 | If ADDRESS-MIME is non-nil, strip backslashes which precede characters |
| 1096 | other than `\"' and `\\' in quoted strings." | 1096 | other than `\"' and `\\' in quoted strings." |
| 1097 | (let ((m (mm-multibyte-p))) | 1097 | ;; (let ((m (mm-multibyte-p))) |
| 1098 | (if (string-match "=\\?" string) | 1098 | (if (string-match "=\\?" string) |
| 1099 | (with-temp-buffer | 1099 | (with-temp-buffer |
| 1100 | ;; Fixme: This logic is wrong, but seems to be required by | 1100 | ;; We used to only call mm-enable-multibyte if `m' is non-nil, |
| 1101 | ;; Gnus summary buffer generation. The value of `m' depends | 1101 | ;; but this can't be the right criterion. Don't just revert this |
| 1102 | ;; on the current buffer, not global multibyteness or that | 1102 | ;; change if it encounters a bug. Please help me fix it |
| 1103 | ;; of the string. Also the string returned should always be | 1103 | ;; right instead. --Stef |
| 1104 | ;; multibyte in a multibyte session, i.e. the buffer should | 1104 | ;; The string returned should always be multibyte in a multibyte |
| 1105 | ;; be multibyte before `buffer-string' is called. | 1105 | ;; session, i.e. the buffer should be multibyte before |
| 1106 | (when m | 1106 | ;; `buffer-string' is called. |
| 1107 | (mm-enable-multibyte)) | 1107 | (mm-enable-multibyte) |
| 1108 | (insert string) | 1108 | (insert string) |
| 1109 | (inline | 1109 | (inline |
| 1110 | (rfc2047-decode-region (point-min) (point-max) address-mime)) | 1110 | (rfc2047-decode-region (point-min) (point-max) address-mime)) |
| @@ -1118,7 +1118,7 @@ other than `\"' and `\\' in quoted strings." | |||
| 1118 | (rfc2047-strip-backslashes-in-quoted-strings) | 1118 | (rfc2047-strip-backslashes-in-quoted-strings) |
| 1119 | (buffer-string)))) | 1119 | (buffer-string)))) |
| 1120 | ;; Fixme: As above, `m' here is inappropriate. | 1120 | ;; Fixme: As above, `m' here is inappropriate. |
| 1121 | (if (and m | 1121 | (if (and ;; m |
| 1122 | mail-parse-charset | 1122 | mail-parse-charset |
| 1123 | (not (eq mail-parse-charset 'us-ascii)) | 1123 | (not (eq mail-parse-charset 'us-ascii)) |
| 1124 | (not (eq mail-parse-charset 'gnus-decoded))) | 1124 | (not (eq mail-parse-charset 'gnus-decoded))) |
| @@ -1134,9 +1134,9 @@ other than `\"' and `\\' in quoted strings." | |||
| 1134 | (if (and (fboundp 'detect-coding-string) | 1134 | (if (and (fboundp 'detect-coding-string) |
| 1135 | ;; string is purely ASCII | 1135 | ;; string is purely ASCII |
| 1136 | (eq (detect-coding-string string t) 'undecided)) | 1136 | (eq (detect-coding-string string t) 'undecided)) |
| 1137 | string | 1137 | string |
| 1138 | (mm-decode-coding-string string mail-parse-charset)) | 1138 | (mm-decode-coding-string string mail-parse-charset)) |
| 1139 | (mm-string-as-multibyte string))))) | 1139 | (mm-string-to-multibyte string)))) ;; ) |
| 1140 | 1140 | ||
| 1141 | (defun rfc2047-decode-address-string (string) | 1141 | (defun rfc2047-decode-address-string (string) |
| 1142 | "Decode MIME-encoded STRING and return the result. | 1142 | "Decode MIME-encoded STRING and return the result. |
| @@ -1161,5 +1161,5 @@ strings are stripped." | |||
| 1161 | 1161 | ||
| 1162 | (provide 'rfc2047) | 1162 | (provide 'rfc2047) |
| 1163 | 1163 | ||
| 1164 | ;;; arch-tag: a07fe3d4-22b5-4c4a-bd89-b1f82d5d36f6 | 1164 | ;; arch-tag: a07fe3d4-22b5-4c4a-bd89-b1f82d5d36f6 |
| 1165 | ;;; rfc2047.el ends here | 1165 | ;;; rfc2047.el ends here |