From: Lars Ingebrigtsen Date: Sat, 14 Apr 2018 21:54:07 +0000 (+0200) Subject: Remove two string-as-unibyte in gnus-srvr.el X-Git-Tag: emacs-27.0.90~5206 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4b0c425047b61b306e7775bae11bd0edd78a7c96;p=emacs.git Remove two string-as-unibyte in gnus-srvr.el * lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): We do not seem to need the string-as-unibyte here: We read a multibyte string from the *nntpd* buffer and then decode it later, and this apparently by some strange magic leads to the correct results in my test cases. --- diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 94fd21b9204..dfca5e9d2cb 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -808,12 +808,11 @@ claim them." (while (not (eobp)) (ignore-errors (push (cons - (string-as-unibyte - (buffer-substring - (point) - (progn - (skip-chars-forward "^ \t") - (point)))) + (buffer-substring + (point) + (progn + (skip-chars-forward "^ \t") + (point))) (let ((last (read cur))) (cons (read cur) last))) groups)) @@ -821,19 +820,18 @@ claim them." (while (not (eobp)) (ignore-errors (push (cons - (string-as-unibyte - (if (eq (char-after) ?\") - (read cur) - (let ((p (point)) (name "")) - (skip-chars-forward "^ \t\\\\") - (setq name (buffer-substring p (point))) - (while (eq (char-after) ?\\) - (setq p (1+ (point))) - (forward-char 2) - (skip-chars-forward "^ \t\\\\") - (setq name (concat name (buffer-substring - p (point))))) - name))) + (if (eq (char-after) ?\") + (read cur) + (let ((p (point)) (name "")) + (skip-chars-forward "^ \t\\\\") + (setq name (buffer-substring p (point))) + (while (eq (char-after) ?\\) + (setq p (1+ (point))) + (forward-char 2) + (skip-chars-forward "^ \t\\\\") + (setq name (concat name (buffer-substring + p (point))))) + name)) (let ((last (read cur))) (cons (read cur) last))) groups))