[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ad2c4d3 3/3: Rewrite string-as-unibyte/string-as-mu
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master ad2c4d3 3/3: Rewrite string-as-unibyte/string-as-multibyte logic in nnmail |
Date: |
Sat, 14 Apr 2018 18:24:21 -0400 (EDT) |
branch: master
commit ad2c4d3c6166b6a02e6256f3aff171fbf5a2c80b
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Rewrite string-as-unibyte/string-as-multibyte logic in nnmail
* lisp/gnus/nnmail.el (nnmail-insert-xref): Rewrite
string-as-unibyte/string-as-multibyte logic and confirm that the
result is the same in both multibyte and unibyte buffers after the
change.
---
lisp/gnus/nnmail.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 249bd65..d751f18 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1250,10 +1250,10 @@ Return the number of characters in the body."
(insert (format "Xref: %s" (system-name)))
(while group-alist
(insert (if (mm-multibyte-p)
- (string-as-multibyte
- (format " %s:%d" (caar group-alist) (cdar group-alist)))
- (string-as-unibyte
- (format " %s:%d" (caar group-alist) (cdar group-alist)))))
+ (format " %s:%d" (caar group-alist) (cdar group-alist))
+ (encode-coding-string
+ (format " %s:%d" (caar group-alist) (cdar group-alist))
+ 'utf-8)))
(setq group-alist (cdr group-alist)))
(insert "\n")))