]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove calls from string-to-multibyte in nnheader/nntp
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 23:07:38 +0000 (01:07 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 23:07:38 +0000 (01:07 +0200)
* 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
lisp/gnus/nntp.el

index 34b4137e935339d3e22a9a567d16ef61001ab4a0..b9ce20413fb5e0a94ef3443626a65cb2310d0b80 100644 (file)
@@ -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)
index 784240f4ff9ce6588b7e7a939393edd1b1fc1452..be9e49551051952a5fd1be29f39f15487b8428a8 100644 (file)
@@ -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)))