From ef599f6cac04ddfe09bf1e63f57c4b9fd5f63ce5 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 15 Apr 2018 01:07:38 +0200 Subject: [PATCH] Remove calls from string-to-multibyte in nnheader/nntp * lisp/gnus/nntp.el (nntp-copy-to-buffer): Apparently `insert' now behaves more like string-make-multibyte, but it now behaves more like string-to-multibyte, so remove that call here. I'm not quite sure I follow that logic, but apparently there are no ill effects. * lisp/gnus/nnheader.el (nnheader-insert-buffer-substring): Ditto. --- lisp/gnus/nnheader.el | 13 +++++-------- lisp/gnus/nntp.el | 4 +--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 34b4137e935..b9ce20413fb 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -1071,14 +1071,11 @@ See `find-file-noselect' for the arguments." (defmacro nnheader-insert-buffer-substring (buffer &optional start end) "Copy string from unibyte buffer to multibyte current buffer." - `(if enable-multibyte-characters - (insert (with-current-buffer ,buffer - (string-to-multibyte - ,(if (or start end) - `(buffer-substring (or ,start (point-min)) - (or ,end (point-max))) - '(buffer-string))))) - (insert-buffer-substring ,buffer ,start ,end))) + `(insert (with-current-buffer ,buffer + ,(if (or start end) + `(buffer-substring (or ,start (point-min)) + (or ,end (point-max))) + '(buffer-string))))) (defvar nnheader-last-message-time '(0 0)) (defun nnheader-message-maybe (&rest args) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 784240f4ff9..be9e4955105 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -342,9 +342,7 @@ retried once before actually displaying the error report." `(let ((string (buffer-substring ,start ,end))) (with-current-buffer ,buffer (erase-buffer) - (insert (if enable-multibyte-characters - (string-to-multibyte string) - string)) + (insert string) (goto-char (point-min)) nil))) -- 2.39.2