summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2018-04-15 01:07:38 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2018-04-15 01:07:38 +0200
commitef599f6cac04ddfe09bf1e63f57c4b9fd5f63ce5 (patch)
tree8721f307b6346593cab2f4f7013426bd37b79fb1
parent1ad6184c37a0e0f537688ea7d5e6ceca5f364eaa (diff)
downloademacs-ef599f6cac04ddfe09bf1e63f57c4b9fd5f63ce5.tar.gz
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.
-rw-r--r--lisp/gnus/nnheader.el13
-rw-r--r--lisp/gnus/nntp.el4
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)))